Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1198 from MitanOmar/reviewer-can-remove-rejected-…
Browse files Browse the repository at this point in the history
…directly-in-edit-reports-page

feat: reviewer can remove rejected from edit report page
  • Loading branch information
MitanOmar authored Apr 11, 2024
2 parents 00ace83 + db89055 commit a632bb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions app/analysis/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ export default class AnalysisEditController extends Controller {
return this.intersectionModel.user.get("id") === this.session.data.user.id;
}

get isReviewer() {
return allQueryParams(this).reviewer === this.session.data.user.id;
}

get canVerify() {
if (this.intersection.lastSuccessful.value.model.rejected !== false) {
return false;
}
return (
allQueryParams(this).reviewer === this.session.data.user.id ||
this.isSuperuser
);
return this.isReviewer || this.isSuperuser;
}

get canBill() {
Expand Down
2 changes: 1 addition & 1 deletion app/analysis/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
@checked={{fi.value}}
@onChange={{fi.update}}
@disabled={{or
(not this.canVerify)
(and (not this.isReviewer) (not this.isSuperuser))
this.hasSelectedOwnReports
}}
>
Expand Down

0 comments on commit a632bb7

Please sign in to comment.