Fix #138
This commit is contained in:
@@ -152,7 +152,10 @@
|
||||
|
||||
<div class="space-y-4">
|
||||
<UFormGroup label="Ausführungsdatum (Belegdatum)" help="Dieses Datum steuert auch den Leistungszeitraum (z.B. Vormonat bei 'Rückwirkend').">
|
||||
<UInput type="date" v-model="executionDate" />
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput type="date" v-model="executionDate" class="flex-1" />
|
||||
<UButton color="gray" variant="soft" label="Heute" @click="setExecutionDateToToday" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
|
||||
<UDivider label="Vorlagen auswählen" />
|
||||
@@ -303,6 +306,10 @@ const isExecuting = ref(false)
|
||||
const modalSearch = ref("") // NEU: Suchstring für das Modal
|
||||
const selectedExecutionIntervall = ref("all")
|
||||
|
||||
const setExecutionDateToToday = () => {
|
||||
executionDate.value = dayjs().format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
// --- SerialExecutions State ---
|
||||
const showExecutionsSlideover = ref(false)
|
||||
const executionItems = ref([])
|
||||
|
||||
@@ -107,6 +107,19 @@ function recalculateWeeklyHours() {
|
||||
profile.value.weekly_working_hours = Number(total.toFixed(2))
|
||||
}
|
||||
|
||||
const getToday = () => {
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(now.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
const setProfileDate = (field: 'birthday' | 'entry_date') => {
|
||||
if (!profile.value) return
|
||||
profile.value[field] = getToday()
|
||||
}
|
||||
|
||||
const checkZip = async () => {
|
||||
const zipData = await useFunctions().useZipCheck(profile.value.address_zip)
|
||||
if (zipData) {
|
||||
@@ -190,7 +203,10 @@ onMounted(fetchProfile)
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Geburtstag">
|
||||
<UInput type="date" v-model="profile.birthday" />
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput type="date" v-model="profile.birthday" class="flex-1" />
|
||||
<UButton color="gray" variant="soft" label="Heute" @click="setProfileDate('birthday')" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
</UForm>
|
||||
</UCard>
|
||||
@@ -215,7 +231,10 @@ onMounted(fetchProfile)
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Eintrittsdatum">
|
||||
<UInput type="date" v-model="profile.entry_date" />
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput type="date" v-model="profile.entry_date" class="flex-1" />
|
||||
<UButton color="gray" variant="soft" label="Heute" @click="setProfileDate('entry_date')" />
|
||||
</div>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Wöchentliche Arbeitszeit (Std)">
|
||||
|
||||
Reference in New Issue
Block a user