Added Customer Ref

Added Document Error in createddocuments
This commit is contained in:
2025-01-09 11:50:13 +01:00
parent 566efb0d2c
commit 38c6e01d9f
2 changed files with 13 additions and 0 deletions

View File

@@ -187,6 +187,13 @@ const setupPage = async () => {
if(route.query.project) {
itemInfo.value.project = Number(route.query.project)
let project = await useSupabaseSelectSingle("projects",itemInfo.value.project)
if(!itemInfo.value.description){
itemInfo.value.description = project.customerRef
}
}
if(route.query.contact) itemInfo.value.contact = Number(route.query.contact)
if(route.query.customer) {
@@ -422,6 +429,7 @@ const findDocumentErrors = computed(() => {
if(row.mode === "service" && !row.service) errors.push({message: `In Position ${row.pos} ist keine Leistung ausgewählt`, type: "breaking"})
if(row.mode === "title" && !row.text) errors.push({message: `In Position ${row.pos} ist kein Titel hinterlegt`, type: "breaking"})
if(row.mode === "text" && !row.text) errors.push({message: `In einer Freitext Position ist kein Titel hinterlegt`, type: "breaking"})
if(row.mode === "free" && !row.text) errors.push({message: `In einer freien Position ist kein Titel hinterlegt`, type: "breaking"})
})
}
@@ -929,6 +937,7 @@ const setRowData = (row) => {
</UButton>
</template>
</UDashboardNavbar>
<UDashboardPanelContent>
<UTabs class="p-5" :items="tabItems" @change="onChangeTab" v-if="loaded">
<template #item="{item}">

View File

@@ -792,6 +792,10 @@ export const useDataStore = defineStore('data', () => {
selectDataType: "plants",
selectOptionAttribute: "name",
selectSearchAttributes: ['name'],
},{
key: "customerRef",
label: "Referenz des Kunden",
inputType: "text"
},{
key: "notes",
label: "Notizen",