From 14a39e68bfe6a002bb028f7de22c07bcd69896eb Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Wed, 18 Dec 2024 15:01:54 -0800 Subject: [PATCH 1/4] ALCS-2446 Set single date as default if date is not checked --- .../decision-condition-types-dialog.component.html | 2 +- .../decision-condition-types-dialog.component.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html index 45bfff2b0..d353acedd 100644 --- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html +++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html @@ -100,7 +100,7 @@

{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type

*ngIf="conditionTypeForm.get('isDateChecked')?.value" class="condition-date-types" > - Single - Select date label + Single - Select date label
Date: Wed, 18 Dec 2024 15:07:50 -0800 Subject: [PATCH 2/4] ALCS-2446 Typo fix --- .../decision-condition-types-dialog.component.html | 2 +- .../decision-condition-types-dialog.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html index d353acedd..3d393b9e9 100644 --- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html +++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html @@ -100,7 +100,7 @@

{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type

*ngIf="conditionTypeForm.get('isDateChecked')?.value" class="condition-date-types" > - Single - Select date label + Single - Select date label
Date: Wed, 18 Dec 2024 15:31:24 -0800 Subject: [PATCH 3/4] ALCS-2446 Set default at the form --- .../decision-condition-types-dialog.component.html | 2 +- .../decision-condition-types-dialog.component.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html index 3d393b9e9..45bfff2b0 100644 --- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html +++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html @@ -100,7 +100,7 @@

{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type

*ngIf="conditionTypeForm.get('isDateChecked')?.value" class="condition-date-types" > - Single - Select date label + Single - Select date label
Date: Wed, 18 Dec 2024 15:42:11 -0800 Subject: [PATCH 4/4] ALCS-2446 Check default on form control --- .../decision-condition-types-dialog.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts index dc1de601d..2a50be3b5 100644 --- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts +++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts @@ -91,7 +91,7 @@ export class DecisionConditionTypesDialogComponent { [this.conditionAsyncValidator(ValidationFields.Dates)], ), isDateRequired: new FormControl(this.data?.content?.isDateRequired ? this.data.content.isDateRequired : false), - dateType: new FormControl(this.data?.content?.dateType ?? DateType.SINGLE), + dateType: new FormControl((!this.data?.content?.isDateChecked && !this.data?.content?.dateType) ? DateType.SINGLE : this.data?.content?.dateType), singleDateLabel: new FormControl( this.data?.content?.singleDateLabel ? this.data.content.singleDateLabel : DateLabel.DUE_DATE, ),