From adb60402413cc229d5da3e05f2006fb2008edbdf Mon Sep 17 00:00:00 2001 From: kurilova Date: Mon, 1 Jul 2024 12:30:45 +0000 Subject: [PATCH] Enables save and draft button for edit mode --- .../profile-form/profile-form.component.html | 4 +--- .../risk-assessment/profile-form/profile-form.component.ts | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.html b/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.html index 17b7d58d5..c53e01ae9 100644 --- a/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.html +++ b/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.html @@ -65,9 +65,7 @@ mat-flat-button color="primary" class="save-profile-button" - [disabled]=" - !profileForm.valid || (profileForm.valid && profileForm.pristine) - " + [disabled]="!profileForm.valid" (click)="onSaveClick(ProfileStatus.VALID)"> Save Profile diff --git a/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.ts b/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.ts index 7e4c99a69..750fedd59 100644 --- a/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.ts +++ b/modules/ui/src/app/pages/risk-assessment/profile-form/profile-form.component.ts @@ -118,11 +118,7 @@ export class ProfileFormComponent implements OnInit { } get isDraftDisabled(): boolean { - return ( - !this.nameControl.valid || - this.fieldsHasError || - (this.profileForm.valid && this.profileForm.pristine) - ); + return !this.nameControl.valid || this.fieldsHasError; } private get fieldsHasError(): boolean {