From 56c9bc29b3ad585ceda28a2558a1f109f12388ec Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc <99731656+ajithmuthukumar-bc@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:12:03 +0530 Subject: [PATCH] disble issue fixed (#802) --- .../delegated-access-user.component.html | 3 +++ .../delegated-access-user.component.scss | 4 ++++ .../delegated-access-user.component.ts | 8 +++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.html b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.html index cca879170..aa8cdd319 100644 --- a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.html +++ b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.html @@ -151,6 +151,7 @@

id="start-day" name="start-day" type="text" [class.govuk-input--error]="submitted && pageAccessMode != 'edit' && (formGroup.controls.startday.invalid || StartDateValidation || PastDateValidation)" inputmode="numeric" formControlName="startday" maxlength="2" + [class.disable]="pageAccessMode == 'edit'" (input)="ValueChanged(formGroup.controls.startday.value,'start-day','startdate')"> @@ -164,6 +165,7 @@

[class.govuk-input--error]="submitted && pageAccessMode != 'edit' && (formGroup.controls.startmonth.invalid || StartDateValidation || PastDateValidation)" (keydown.backspace)="tiggerBackspace(formGroup.controls.startmonth.value,'start-month','startdate')" inputmode="numeric" formControlName="startmonth" maxlength="2" + [class.disable]="pageAccessMode == 'edit'" (input)="ValueChanged(formGroup.controls.startmonth.value,'start-month','startdate')"> @@ -176,6 +178,7 @@

id="start-year" name="start-year" type="text" [class.govuk-input--error]="submitted && pageAccessMode != 'edit' && (formGroup.controls.startyear.invalid || StartDateValidation || PastDateValidation)" inputmode="numeric" formControlName="startyear" maxlength="4" + [class.disable]="pageAccessMode == 'edit'" (keydown.backspace)="tiggerBackspace(formGroup.controls.startyear.value,'start-year','startdate')"> diff --git a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.scss b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.scss index 13f6558bf..ef7cd27fd 100644 --- a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.scss +++ b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.scss @@ -29,4 +29,8 @@ a { .manage-groups-bg{ margin-top: 30px; + } + + .disable { + background: #dfe0e2; } \ No newline at end of file diff --git a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.ts b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.ts index e78db3713..7a3636496 100644 --- a/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.ts +++ b/src/app/pages/manage-delegated/delegated-access-user/delegated-access-user.component.ts @@ -469,9 +469,11 @@ export class DelegatedAccessUserComponent implements OnInit { * forms disable function used in edit scenerio */ private formDisable(){ - this.formGroup.controls['startday'].disable() - this.formGroup.controls['startmonth'].disable() - this.formGroup.controls['startyear'].disable() + if(this.pageAccessMode === 'edit'){ + this.formGroup.controls['startday'].disable() + this.formGroup.controls['startmonth'].disable() + this.formGroup.controls['startyear'].disable() + } } /**