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