Changes in Times Evaluation

This commit is contained in:
2024-10-20 16:14:01 +02:00
parent a905b1f966
commit d3c2c8f642
5 changed files with 174 additions and 42 deletions

View File

@@ -39,6 +39,21 @@ setupPage()
<UDashboardNavbar
:title="mode === 'show' ? `Anwesenheit: ${itemInfo.profile}` : (itemInfo.id ? 'Anwesenheit bearbeiten' :'Anwesenheit erstellen')"
>
<template #left>
<UButton
icon="i-heroicons-chevron-left"
variant="outline"
@click="router.push(`/workingtimes`)"
>
Anwesenheiten
</UButton>
</template>
<template #center>
<h1
v-if="itemInfo"
class="text-xl font-medium"
>{{itemInfo.id ? 'Anwesenheite bearbeiten' : 'Anwesenheit erstellen'}}</h1>
</template>
<template #right>
<UButton
color="rose"
@@ -53,6 +68,12 @@ setupPage()
>
Speichern
</UButton>
<UButton
v-if="mode === 'edit' && itemInfo.id"
@click="dataStore.updateItem('workingtimes',{...itemInfo, approved: true})"
>
Genehmigen & Speichern
</UButton>
<UButton
v-else-if="mode === 'edit' && !itemInfo.id"
@click="dataStore.createNewItem('workingtimes',itemInfo)"