2. Zwischenstand
This commit is contained in:
@@ -454,24 +454,25 @@ onMounted(() => {
|
||||
</UDashboardPanelContent>
|
||||
|
||||
<UModal v-model:open="isAbsenceModalOpen">
|
||||
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||
<template #header>
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold leading-6 text-gray-900 dark:text-white">
|
||||
{{ absenceModalTitle }}
|
||||
</h3>
|
||||
<UButton
|
||||
color="gray"
|
||||
variant="ghost"
|
||||
icon="i-heroicons-x-mark-20-solid"
|
||||
class="-my-1"
|
||||
@click="isAbsenceModalOpen = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #content>
|
||||
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||
<template #header>
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-base font-semibold leading-6 text-gray-900 dark:text-white">
|
||||
{{ absenceModalTitle }}
|
||||
</h3>
|
||||
<UButton
|
||||
color="gray"
|
||||
variant="ghost"
|
||||
icon="i-heroicons-x-mark-20-solid"
|
||||
class="-my-1"
|
||||
@click="isAbsenceModalOpen = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="space-y-4">
|
||||
<UFormGroup label="Profil">
|
||||
<UFormField label="Profil">
|
||||
<USelectMenu
|
||||
v-model="absenceForm.userId"
|
||||
:options="profileOptions"
|
||||
@@ -479,51 +480,52 @@ onMounted(() => {
|
||||
option-attribute="label"
|
||||
searchable
|
||||
/>
|
||||
</UFormGroup>
|
||||
</UFormField>
|
||||
|
||||
<UFormGroup label="Typ">
|
||||
<UFormField label="Typ">
|
||||
<USelectMenu
|
||||
v-model="absenceForm.type"
|
||||
:options="absenceTypeOptions"
|
||||
value-attribute="value"
|
||||
option-attribute="label"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</UFormField>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<UFormGroup label="Start">
|
||||
<UFormField label="Start">
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput v-model="absenceForm.startDate" type="date" class="flex-1" />
|
||||
<UButton color="gray" variant="soft" label="Heute" @click="setAbsenceDateToToday('startDate')" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
<UFormGroup label="Ende">
|
||||
</UFormField>
|
||||
<UFormField label="Ende">
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput v-model="absenceForm.endDate" type="date" class="flex-1" />
|
||||
<UButton color="gray" variant="soft" label="Heute" @click="setAbsenceDateToToday('endDate')" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
<UFormGroup label="Notiz">
|
||||
<UFormField label="Notiz">
|
||||
<UTextarea
|
||||
v-model="absenceForm.description"
|
||||
:placeholder="absenceForm.type === 'sick' ? 'z. B. Krankmeldung eingegangen' : 'z. B. Sommerurlaub'"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex justify-end gap-2">
|
||||
<UButton color="gray" variant="soft" @click="isAbsenceModalOpen = false">
|
||||
Abbrechen
|
||||
</UButton>
|
||||
<UButton color="primary" :loading="savingAbsence" @click="saveAbsence">
|
||||
Speichern
|
||||
</UButton>
|
||||
</div>
|
||||
</template>
|
||||
</UCard>
|
||||
<template #footer>
|
||||
<div class="flex justify-end gap-2">
|
||||
<UButton color="gray" variant="soft" @click="isAbsenceModalOpen = false">
|
||||
Abbrechen
|
||||
</UButton>
|
||||
<UButton color="primary" :loading="savingAbsence" @click="saveAbsence">
|
||||
Speichern
|
||||
</UButton>
|
||||
</div>
|
||||
</template>
|
||||
</UCard>
|
||||
</template>
|
||||
</UModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user