assign reviewer for approvers
This commit is contained in:
parent
351dc05384
commit
e305a461cf
@ -72,7 +72,8 @@
|
||||
*ngIf="
|
||||
!editingReviewer &&
|
||||
!appStateService.activeFile.currentReviewer &&
|
||||
permissionsService.canAssignUser()
|
||||
permissionsService.canAssignUser() &&
|
||||
appStateService.activeProject.hasMoreThanOneReviewer
|
||||
"
|
||||
class="assign-reviewer pointer"
|
||||
translate="file-preview.assign-reviewer"
|
||||
|
||||
@ -114,12 +114,13 @@ export class PermissionsService {
|
||||
!fileStatus.isError &&
|
||||
!fileStatus.isApproved;
|
||||
|
||||
const isNotCurrentReviewer = fileStatus.currentReviewer !== this._userService.userId;
|
||||
const isTheOnlyReviewer = !this._appStateService.activeProject.hasMoreThanOneReviewer;
|
||||
|
||||
if (precondition) {
|
||||
if (
|
||||
(fileStatus.isUnassigned || fileStatus.isUnderReview) &&
|
||||
(!this.isApprover() ||
|
||||
!this._appStateService.activeProject.hasMoreThanOneReviewer) &&
|
||||
fileStatus.currentReviewer !== this._userService.userId
|
||||
(fileStatus.isUnassigned || (fileStatus.isUnderReview && isNotCurrentReviewer)) &&
|
||||
(this.isApprover() || isTheOnlyReviewer)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user