Fix #138
This commit is contained in:
@@ -102,6 +102,10 @@ const currentUnit = computed(() => {
|
||||
const selectedService = data.value.services?.find(s => s.id === form.value.service)
|
||||
return selectedService?.unitSymbol || data.value?.units?.[0]?.symbol || 'h'
|
||||
})
|
||||
|
||||
const setDeliveryDateToToday = () => {
|
||||
form.value.deliveryDate = dayjs().format('YYYY-MM-DD')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -120,12 +124,16 @@ const currentUnit = computed(() => {
|
||||
:error="errors.deliveryDate"
|
||||
required
|
||||
>
|
||||
<UInput
|
||||
v-model="form.deliveryDate"
|
||||
type="date"
|
||||
size="lg"
|
||||
icon="i-heroicons-calendar-days"
|
||||
/>
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput
|
||||
v-model="form.deliveryDate"
|
||||
type="date"
|
||||
size="lg"
|
||||
icon="i-heroicons-calendar-days"
|
||||
class="flex-1"
|
||||
/>
|
||||
<UButton color="gray" variant="soft" size="lg" label="Heute" @click="setDeliveryDateToToday" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup
|
||||
@@ -226,4 +234,4 @@ const currentUnit = computed(() => {
|
||||
/>
|
||||
</template>
|
||||
</UCard>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user