This commit is contained in:
caishi 2023-03-10 15:36:54 +08:00
parent 2ec69c4322
commit 9fb640e9a4
1 changed files with 6 additions and 4 deletions

View File

@ -58,7 +58,7 @@ function Details(props){
const permission = props && props.projectDetail && props.projectDetail.permission;
let colors = ["#1abcb1","#28be6c","#e67e22","#db3d1d"];
const {projectDetail , open_blockchain } = props;
const {projectDetail , open_blockchain ,current_user } = props;
useEffect(()=>{
if(pathname === `/${owner}/${projectsId}/issues/${index}/copy`){
setEdit(true);
@ -91,7 +91,9 @@ function Details(props){
let per = data && !data.user_permission;
setEditFlag(per);
setAmountEditFlag(data.pull_fixed);
const aut = current_user && data.author && (data.author.login === current_user.login);
const con = data.pull_fixed === false && aut;
setAmountEditFlag(con);
setAssigner_choose(data.assigners);
if(data.priority && data.priority.id){
@ -340,7 +342,7 @@ function Details(props){
}
}
function changeAmount(value){
if(editFlag ){
if(amountEditFlag){
setRewardAmount(value);
}else{
setRewardAmount(rewardAmount);
@ -493,7 +495,7 @@ function Details(props){
value={rewardAmount}
onChange={changeAmount}
className="borderNo mt5"
disabled={amountEditFlag}
disabled={!amountEditFlag}
/>
</li>
}