Added start/enddate rendering

This commit is contained in:
2025-01-07 10:16:36 +01:00
parent 7f23d8efd8
commit 5ee5e671e7
3 changed files with 41 additions and 3 deletions

View File

@@ -28,6 +28,8 @@ import usePlanning from "~/components/columnRenderings/usePlanning.vue"
import sellingPriceComposedMaterial from "~/components/columnRenderings/sellingPriceComposedMaterial.vue"
import sellingPriceComposedWorker from "~/components/columnRenderings/sellingPriceComposedWorker.vue"
import sellingPriceComposedTotal from "~/components/columnRenderings/sellingPriceComposedTotal.vue"
import startDate from "~/components/columnRenderings/startDate.vue"
import endDate from "~/components/columnRenderings/endDate.vue"
import quantity from "~/components/helpRenderings/quantity.vue"
import {useZipCheck} from "~/composables/useZipCheck.js";
@@ -464,6 +466,7 @@ export const useDataStore = defineStore('data', () => {
labelSingle: "Abwesenheitsantrag",
isStandardEntity: true,
supabaseSelectWithInformation: "*",
historyItemHolder: "absencerequest",
redirect:true,
filters:[],
templateColumns:[
@@ -498,6 +501,7 @@ export const useDataStore = defineStore('data', () => {
selectValueAttribute: "label",
selectManualOptions: [
{label:"Urlaub"},
{label:"Berufsschule"},
{label:"unbezahlter Urlaub"},
{label:"Überstundenausgleich"},
{label:"Sonderurlaub(bezahlt)"},
@@ -511,11 +515,13 @@ export const useDataStore = defineStore('data', () => {
},{
key: "startDate",
label: "Start",
inputType: "date"
inputType: "date",
component: startDate
},{
key: "endDate",
label: "Ende",
inputType: "date"
inputType: "date",
component: endDate
},{
key: "note",
label: "Notizen",
@@ -1846,6 +1852,8 @@ export const useDataStore = defineStore('data', () => {
name = "Nachname"
} else if(key === "name") {
name = "Name"
} else if(key === "approved") {
name = "Genehmigt"
} else if(key === "customer") {
name = "Kunde"
if(prop.data.o) oldVal = customers.value.find(i => i.id === prop.data.o).name
@@ -2035,7 +2043,7 @@ export const useDataStore = defineStore('data', () => {
await generateHistoryItems(dataType, supabaseData[0])
if(!["statementallocations", "productcategories", "projecttypes", "checks", "profiles","services", "inventoryitems"].includes(dataType) ){
if(!["statementallocations","absencerequests", "productcategories", "projecttypes", "checks", "profiles","services", "inventoryitems"].includes(dataType) ){
await eval( dataType + '.value.push(' + JSON.stringify(...supabaseData) + ')')
}