Deprecated absencerequests as non Standard Entity

Added Respective Rights
Changes to show title
This commit is contained in:
2024-12-25 17:00:09 +01:00
parent 325d25034d
commit 1a79f9dbd9
7 changed files with 69 additions and 9 deletions

View File

@@ -76,8 +76,6 @@ const loadOptions = async () => {
}
})
console.log(optionsToLoad)
for await(const option of optionsToLoad) {
if(option.option === "countrys") {
loadedOptions.value[option.option] = (await supabase.from("countrys").select()).data
@@ -91,8 +89,6 @@ const loadOptions = async () => {
}
}
}
console.log(loadedOptions.value)
}
loadOptions()

View File

@@ -90,7 +90,7 @@ const renderedPhases = computed(() => {
<h1
v-if="item"
:class="['text-xl','font-medium']"
>{{item ? `${dataType.labelSingle}: ${props.item[dataType.templateColumns.find(i => i.title).key]}`: '' }}</h1>
>{{item ? `${dataType.labelSingle}${props.item[dataType.templateColumns.find(i => i.title).key] ? ': ' + props.item[dataType.templateColumns.find(i => i.title).key] : ''}`: '' }}</h1>
</template>
<template #right>
<ButtonWithConfirm

View File

@@ -102,11 +102,11 @@ const links = computed(() => {
to: "/workingtimes",
icon: "i-heroicons-clock"
}] : [],
{
... role.checkRight("absencerequests") ? [{
label: "Abwesenheiten",
to: "/absenceRequests",
to: "/standardEntity/absencerequests",
icon: "i-heroicons-document-text"
},
}] : [],
]
},
... profileStore.ownTenant.features.accounting ? [{

View File

@@ -148,6 +148,18 @@ export const useRole = () => {
label: "Inventarartikel erstellen",
parent: "inventoryitems"
},
absencerequests: {
label: "Abwesenheiten",
showToAllUsers: false
},
"absencerequests-viewAll": {
label: "Alle Abwesenheiten einsehen",
parent: "absencerequests"
},
"absencerequests-create": {
label: "Abwesenheiten erstellen",
parent: "absencerequests"
},
spaces: {
label: "Lagerplätze",
showToAllUsers: false

View File

@@ -373,7 +373,59 @@ export const useDataStore = defineStore('data', () => {
absencerequests: {
label: "Abwesenheitsanträge",
labelSingle: "Abwesenheitsantrag",
redirect:true
isStandardEntity: true,
supabaseSelectWithInformation: "*",
redirect:true,
filters:[],
templateColumns:[
{
key: "approved",
label: "Genehmigt",
inputType: "select",
selectManualOptions: ["Offen","Genehmigt", "Abgelehnt"]
},{
key: "name",
label: "Name",
inputType: "text",
title: true
},
{
key: "profile",
label: "Mitarbeiter",
inputType: "select",
selectDataType: "profiles",
selectOptionAttribute: "fullName",
selectSearchAttributes: ['fullName'],
component: profile
},{
key: "reason",
label: "Grund",
inputType: "select",
selectManualOptions: ["Elternzeit",
"Kind krank - Kinderbetreuung",
"Krankheit",
"Krankheit 1 Tag (mit Attest)",
"Krankheit ab 2. Tag (mit Attest)",
"Mutterschutz",
"Sonderurlaub (bezahlt)",
"Überstundenausgleich",
"Unbezahlter Urlaub",
"Urlaub"]
},{
key: "startDate",
label: "Start",
inputType: "date"
},{
key: "endDate",
label: "Ende",
inputType: "date"
},{
key: "note",
label: "Notizen",
inputType: "textarea"
}
],
showTabs: [{label: 'Informationen'}]
},
plants: {
label: "Objekte",