RED-3800 check conditions assing/change state
This commit is contained in:
parent
87b7f7f2e8
commit
9ca5d22b21
@ -28,7 +28,11 @@ export class FileAssignService {
|
||||
async assignToMe(files: File[]): Promise<unknown> {
|
||||
const assignReq = async () => {
|
||||
this._loadingService.start();
|
||||
await firstValueFrom(this._filesService.setAssignee(files, files[0].dossierId, this.currentUser.id));
|
||||
if (files[0].isNew) {
|
||||
await this._makeAssignFileRequest(this.currentUser.id, 'UNDER_REVIEW', files);
|
||||
} else {
|
||||
await firstValueFrom(this._filesService.setAssignee(files, files[0].dossierId, this.currentUser.id));
|
||||
}
|
||||
this._loadingService.stop();
|
||||
};
|
||||
if (atLeastOneAssignee(files)) {
|
||||
|
||||
@ -294,9 +294,12 @@ export class PermissionsService {
|
||||
return dossier.isActive && file.isUnderReview && this.isDossierMember(dossier);
|
||||
}
|
||||
|
||||
/** UNDER_APPROVAL => UNDER_REVIEW */
|
||||
/** UNDER_APPROVAL => UNDER_REVIEW OR NEW => UNDER_REVIEW */
|
||||
private _canSetUnderReview(file: File, dossier: Dossier): boolean {
|
||||
return dossier.isActive && file.isUnderApproval && this.isAssigneeOrApprover(file, dossier);
|
||||
return (
|
||||
dossier.isActive &&
|
||||
((file.isUnderApproval && this.isAssigneeOrApprover(file, dossier)) || (file.isNew && this.isDossierMember(dossier)))
|
||||
);
|
||||
}
|
||||
|
||||
/** UNDER_APPROVAL => APPROVED */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dev-05.iqser.cloud/redaction-gateway-v1",
|
||||
"API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1",
|
||||
"APP_NAME": "RedactManager",
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -16,7 +16,7 @@
|
||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"OAUTH_IDP_HINT": null,
|
||||
"OAUTH_URL": "https://dev-05.iqser.cloud/auth/realms/redaction",
|
||||
"OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user