forked from Gitlink/forgeplus-react
Merge branch 'gitlink_server_issue' of http://106.75.45.236:3000/Gitlink/forgeplus-react into gitlink_server_issue
This commit is contained in:
commit
4342977f5f
|
|
@ -43,6 +43,7 @@ function Details(props){
|
|||
const [ due_date, setDueDate ] = useState("");
|
||||
const [ commentReload, setCommentReload] = useState(undefined);
|
||||
const [ editFlag , setEditFlag ] = useState(false);
|
||||
const [ amountEditFlag , setAmountEditFlag ] = useState(false);
|
||||
|
||||
const [ assigner_choose , setAssigner_choose ] = useState([]);
|
||||
const [ prioritie_choose , setPrioritie_choose ] = useState([]);
|
||||
|
|
@ -52,12 +53,12 @@ function Details(props){
|
|||
const [ branch_choose , setBranch_choose ] = useState([]);
|
||||
const [ rewardAmount , setRewardAmount ] = useState(undefined);
|
||||
const [ rewardFlag , setRewardFlag ] = useState(false);
|
||||
|
||||
const pathname = props.history.location.pathname;
|
||||
const permission = props && props.projectDetail && props.projectDetail.permission;
|
||||
let colors = ["#1abcb1","#28be6c","#e67e22","#db3d1d"];
|
||||
const ref = useRef(null);
|
||||
|
||||
const {projectDetail , open_blockchain} = props;
|
||||
const {projectDetail , open_blockchain } = props;
|
||||
useEffect(()=>{
|
||||
if(pathname === `/${owner}/${projectsId}/issues/${index}/copy`){
|
||||
setEdit(true);
|
||||
|
|
@ -88,8 +89,10 @@ function Details(props){
|
|||
let data = result.data;
|
||||
setDetails(data);
|
||||
let per = data && !data.user_permission;
|
||||
console.log(per);
|
||||
setEditFlag(per);
|
||||
|
||||
setAmountEditFlag(data.pull_fixed);
|
||||
|
||||
setAssigner_choose(data.assigners);
|
||||
if(data.priority && data.priority.id){
|
||||
setPrioritie_choose([{...data.priority,color:colors[data.priority.id-1]}]);
|
||||
|
|
@ -490,7 +493,7 @@ function Details(props){
|
|||
value={rewardAmount}
|
||||
onChange={changeAmount}
|
||||
className="borderNo mt5"
|
||||
disabled={editFlag}
|
||||
disabled={amountEditFlag}
|
||||
/>
|
||||
</li>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue