diff --git a/strr-base-web/app/components/connect/form/address/Index.vue b/strr-base-web/app/components/connect/form/address/Index.vue index 861e905f..1df9abbc 100644 --- a/strr-base-web/app/components/connect/form/address/Index.vue +++ b/strr-base-web/app/components/connect/form/address/Index.vue @@ -22,7 +22,9 @@ const props = defineProps<{ formRef?: Form, disabledFields?: AddressField[], excludedFields?: AddressField[], - locationDescLabel?: boolean + // TODO: cleanup below strategies + locationDescLabel?: boolean, + unitNumbRequired?: boolean }>() const { address: canadaPostAddress, enableAddressComplete } = useCanadaPostAddress() @@ -174,8 +176,9 @@ const addId = useId() :name="schemaPrefix + 'unitNumber'" :color="city ? 'primary' : 'gray'" :is-disabled="disabledFields?.includes('unitNumber')" - :placeholder="$t('label.unitNumberOpt')" - :aria-label="$t('label.unitNumberOpt')" + :placeholder="unitNumbRequired ? $t('label.unitNumber') : $t('label.unitNumberOpt')" + :aria-label="unitNumbRequired ? $t('label.unitNumber') : $t('label.unitNumberOpt')" + :aria-required="unitNumbRequired || false" /> diff --git a/strr-base-web/app/components/connect/form/date/Input.vue b/strr-base-web/app/components/connect/form/date/Input.vue index 27923f40..ba13ca26 100644 --- a/strr-base-web/app/components/connect/form/date/Input.vue +++ b/strr-base-web/app/components/connect/form/date/Input.vue @@ -9,6 +9,7 @@ const formBus = inject | undefined>('form-events' const props = defineProps<{ name: string + help?: string, initialDate?: Date, minDate?: Date, maxDate?: Date, @@ -39,7 +40,7 @@ const updateDate = (val: Date | null) => { } const selectedDateDisplay: ComputedRef = computed( - () => selectedDate.value ? dateToString(selectedDate.value, 'YYYY-MM-DD') : '' + () => selectedDate.value ? dateToString(selectedDate.value) : '' ) const handleManualDateEntry = (input: string) => { @@ -54,11 +55,14 @@ const handleManualDateEntry = (input: string) => { @@ -98,5 +102,5 @@ const handleManualDateEntry = (input: string) => { :set-max-date="maxDate" @selected-date="updateDate($event); showDatePicker = false; hasDateChanged = true" /> - + diff --git a/strr-base-web/app/components/connect/form/field/Group.vue b/strr-base-web/app/components/connect/form/field/Group.vue index c17f9ef5..d5ca6a76 100644 --- a/strr-base-web/app/components/connect/form/field/Group.vue +++ b/strr-base-web/app/components/connect/form/field/Group.vue @@ -19,7 +19,8 @@ const props = defineProps({ isRequired: { type: Boolean, default: false }, size: { type: String, default: 'lg' }, ariaLabel: { type: String, default: undefined }, - type: { type: String, default: 'text' } + type: { type: String, default: 'text' }, + mask: { type: String, default: undefined } }) const inputId = useId() @@ -31,19 +32,22 @@ const errorId = `${props.name}-error-${inputId}`