RED-7421 - Unassigned file cannot be moved back from "under approval" to "under review."

This commit is contained in:
Valentin Mihai 2023-10-03 17:57:20 +03:00
parent e231f5c3c2
commit 5a52a7aa1e

View File

@ -111,7 +111,8 @@ export class AssignReviewerApproverDialogComponent extends IqserDialogComponent<
const assignee = files[0].assignee;
if (hasOnlyOneFile && this.permissionsService.isApprover(this.#dossier, assignee)) {
return assignee;
const foundAssignee = this.userOptions.find(userOption => userOption === assignee);
return foundAssignee ?? this.#userOptions[0];
}
return this.#isApprover ? this.currentUser.id : this.userOptions.at(0);