From 4e2d6d109e13f8e16ca08b825a367fafad7ae991 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 9 Nov 2023 15:46:57 +0100 Subject: [PATCH 1/2] 108045: Fix for repeatable date field labels --- .../models/date-picker/date-picker.component.html | 2 +- .../ds-dynamic-form-ui/models/date-picker/date-picker.model.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.html index 1046dd6b2d3..26803f3c67b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.html @@ -1,6 +1,6 @@
- + {{model.placeholder}} * (this.hidden); - + this.repeatable = config.repeatable; // This was a subscription, then an async setTimeout, but it seems unnecessary const parentModel = this.getRootParent(this); if (parentModel && isNotUndefined(parentModel.hidden)) { From a3181a06899896f1ee7f97d31dd7687995be99a9 Mon Sep 17 00:00:00 2001 From: lotte Date: Fri, 10 Nov 2023 14:42:03 +0100 Subject: [PATCH 2/2] Fixed test --- .../ds-dynamic-form-control-container.component.spec.ts | 2 +- .../models/date-picker/date-picker.component.spec.ts | 1 + src/app/shared/form/builder/form-builder.service.spec.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts index e0e519aaa92..5cdcfba537b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts @@ -165,7 +165,7 @@ describe('DsDynamicFormControlContainerComponent test suite', () => { metadataFields: [], hasSelectableMetadata: false }), - new DynamicDsDatePickerModel({ id: 'datepicker' }), + new DynamicDsDatePickerModel({ id: 'datepicker', repeatable: false }), new DynamicLookupModel({ id: 'lookup', metadataFields: [], diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts index 4989dab93a7..eb35af9dbe8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts @@ -28,6 +28,7 @@ export const DATE_TEST_MODEL_CONFIG = { placeholder: 'Date', readOnly: false, required: true, + repeatable: false, toggleIcon: 'fas fa-calendar' }; diff --git a/src/app/shared/form/builder/form-builder.service.spec.ts b/src/app/shared/form/builder/form-builder.service.spec.ts index b68963e5ad5..91f3cbcafc7 100644 --- a/src/app/shared/form/builder/form-builder.service.spec.ts +++ b/src/app/shared/form/builder/form-builder.service.spec.ts @@ -284,7 +284,7 @@ describe('FormBuilderService test suite', () => { hasSelectableMetadata: true }), - new DynamicDsDatePickerModel({ id: 'testDate' }), + new DynamicDsDatePickerModel({ id: 'testDate', repeatable: false}), new DynamicLookupModel({ id: 'testLookup',