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

This commit is contained in:
Valentin Mihai 2023-10-16 18:28:09 +03:00
parent 50da1026b1
commit c86abae357
2 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,7 @@
<div class="dialog-actions">
<iqser-icon-button
[disabled]="!form.valid || !changed"
[disabled]="!form.valid || !changed || !validOption"
[label]="'assign-owner.dialog.save' | translate"
[submit]="true"
[type]="iconButtonTypes.primary"

View File

@ -66,6 +66,11 @@ export class AssignReviewerApproverDialogComponent extends IqserDialogComponent<
return false;
}
get validOption() {
const currentUser = this.form.get('user').value;
return !!this.userOptions.find(u => u === currentUser);
}
get #mode() {
const isUnderApproval = this.data.targetStatus === WorkflowFileStatuses.UNDER_APPROVAL;
const isApproved = this.data.targetStatus === WorkflowFileStatuses.APPROVED;