Changes
This commit is contained in:
@@ -123,7 +123,9 @@ export const useDataStore = defineStore('data', () => {
|
||||
},
|
||||
workingtimes: {
|
||||
label: "Anwesenheiten",
|
||||
labelSingle: "Anwesenheit"
|
||||
labelSingle: "Anwesenheit",
|
||||
redirect: true,
|
||||
redirectToList: true
|
||||
},
|
||||
texttemplates: {
|
||||
label: "Textvorlagen",
|
||||
@@ -887,7 +889,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
//await eval(dataType + '.value[' + dataType + '.value.findIndex(i => i.id === ' + JSON.stringify(data.id) + ')] = ' + JSON.stringify(supabaseData[0]))
|
||||
if(dataType === 'profiles') await fetchProfiles()
|
||||
toast.add({title: `${dataTypes[dataType].labelSingle} gespeichert`})
|
||||
if(dataTypes[dataType].redirect) await router.push(`/${dataType}/show/${data.id}`)
|
||||
if(dataTypes[dataType].redirect) await router.push(dataTypes[dataType].redirectToList ? `/${dataType}` : `/${dataType}/show/${data.id}`)
|
||||
return supabaseData
|
||||
}
|
||||
}
|
||||
@@ -1244,7 +1246,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
})
|
||||
|
||||
const getTextTemplatesByDocumentType = computed(() => (documentType) => {
|
||||
console.log(documentType)
|
||||
//console.log(documentType)
|
||||
|
||||
let type = ""
|
||||
if(documentType === "serialInvoices") {
|
||||
@@ -1253,7 +1255,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
type = documentType
|
||||
}
|
||||
|
||||
console.log(type)
|
||||
//console.log(type)
|
||||
|
||||
return texttemplates.value.filter(i => i.documentType === type)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user