Skip to content

Commit

Permalink
revert task request edition when resolution is paused
Browse files Browse the repository at this point in the history
  • Loading branch information
Galiley committed Feb 17, 2025
1 parent 03aed02 commit 9ef22ad
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ export class TaskComponent implements OnInit, OnDestroy {
return !!meta?.user_is_admin;
}));

readonly canEditRequest$ = combineLatest([this.task$, this._isResolver$]).pipe(map(([task, isResolver]) => {
if (!['TODO', 'PAUSED'].includes(task?.state)) {
return false;
readonly canEditRequest$ = combineLatest([this.task$, this.resolution$, this._isResolver$]).pipe(map(([task, resolution, isResolver]) => {
if (['TODO', 'PAUSED'].includes(task?.state)) {
return isResolver
} else if (['TODO', 'PAUSED'].includes(resolution?.state)) {
return isResolver
} else {
return false
}

return isResolver;
}));;

readonly canDeleteRequest$ = combineLatest([this.task$, this.meta$]).pipe(map(([task, meta]) => {
Expand Down

0 comments on commit 9ef22ad

Please # to comment.