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:52:01 +03:00
parent b8d5ba0c70
commit 8f131aff23
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

@ -61,6 +61,11 @@ export class AssignReviewerApproverDialogComponent {
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;