diff --git a/app/components/ComboSelect.vue b/app/components/ComboSelect.vue index c002e033..867a9579 100644 --- a/app/components/ComboSelect.vue +++ b/app/components/ComboSelect.vue @@ -86,19 +86,14 @@ import { } from '@headlessui/vue' import { CheckIcon, ChevronUpDownIcon } from '@heroicons/vue/20/solid' -const { options, multiple } = withDefaults( - defineProps<{ +const { options, multiple, optionsDisplay = (option: any) => option} = defineProps<{ modelValue: any options: ComputedRef> /** Whether multiple options can be selected */ multiple?: boolean /** Function called for getting the display string for a given option */ optionsDisplay?: (option: any) => string - }>(), - { - optionsDisplay: (option: any) => option, - } -) + }>() const query = ref('') const filteredOptions = computed(() => diff --git a/app/components/examine/request_info/dates_and_expiry/ExpiryAndConsentEditable.vue b/app/components/examine/request_info/dates_and_expiry/ExpiryAndConsentEditable.vue index d4708f38..847f9402 100644 --- a/app/components/examine/request_info/dates_and_expiry/ExpiryAndConsentEditable.vue +++ b/app/components/examine/request_info/dates_and_expiry/ExpiryAndConsentEditable.vue @@ -88,10 +88,16 @@ function setDefaultInputValues() { examine.addEditAction({ validate() { let isValid = true - if (examine.expiryDate && !expiry.value) { - expiryDateErrorText.value = 'Expiry date is required' - isValid = false + if (examine.expiryDate) { + if (expiry.value) { + isValid = DateTime.fromISO(expiry.value).startOf('day') >= DateTime.now().startOf('day') + expiryDateErrorText.value = isValid ? '' : 'Expiry date must be today or later'; + } else { + expiryDateErrorText.value = 'Expiry date is required' + isValid = false + } } + if (consentFlag.value === ConsentFlag.Received && !consentDate.value) { consentDateErrorText.value = 'Consent date is required' isValid = false diff --git a/app/components/search/ResultsBox.vue b/app/components/search/ResultsBox.vue index 662c0145..b53e6420 100644 --- a/app/components/search/ResultsBox.vue +++ b/app/components/search/ResultsBox.vue @@ -98,14 +98,13 @@ - -
- -
+
+ +
+ {{ item.furnished }} -
- -
+
+ +
+