modified allowed actions flow
This commit is contained in:
parent
414d5518dc
commit
7f3a0168c3
@ -245,9 +245,7 @@ export class AppStateService {
|
||||
}
|
||||
|
||||
get canMarkPagesAsViewedForActiveFile() {
|
||||
return (
|
||||
this.activeFile.status === 'UNDER_APPROVAL' || this.activeFile.status === 'UNDER_REVIEW'
|
||||
);
|
||||
return this.canPerformAnnotationActionsOnCurrentFile();
|
||||
}
|
||||
|
||||
public getProjectById(id: string) {
|
||||
@ -602,13 +600,18 @@ export class AppStateService {
|
||||
}
|
||||
|
||||
canPerformAnnotationActionsOnCurrentFile() {
|
||||
const status = this.activeFile.status;
|
||||
if (status === 'UNDER_REVIEW') {
|
||||
return this.isActiveProjectOwnerAndManager || this.isActiveFileDocumentReviewer;
|
||||
}
|
||||
if (status === 'UNDER_APPROVAL') {
|
||||
return this.isActiveProjectOwnerAndManager;
|
||||
}
|
||||
return false;
|
||||
// const status = this.activeFile.status;
|
||||
// if (status === 'UNDER_REVIEW') {
|
||||
// return this.isActiveProjectOwnerAndManager || this.isActiveFileDocumentReviewer;
|
||||
// }
|
||||
// if (status === 'UNDER_APPROVAL') {
|
||||
// return this.isActiveProjectOwnerAndManager;
|
||||
// }
|
||||
// return false;
|
||||
return (
|
||||
(this.activeFile.status === 'UNDER_APPROVAL' ||
|
||||
this.activeFile.status === 'UNDER_REVIEW') &&
|
||||
this._userService.userId === this.activeFile.currentReviewer
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user