Merge branch 'VM/RED-7421' into 'master'

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

Closes RED-7421

See merge request redactmanager/red-ui!124
This commit is contained in:
Dan Percic 2023-10-03 17:06:56 +02:00
commit 8bf0fd0cef

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);