Added Customer Ref
Added Document Error in createddocuments
This commit is contained in:
@@ -187,6 +187,13 @@ const setupPage = async () => {
|
|||||||
|
|
||||||
if(route.query.project) {
|
if(route.query.project) {
|
||||||
itemInfo.value.project = Number(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.contact) itemInfo.value.contact = Number(route.query.contact)
|
||||||
if(route.query.customer) {
|
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 === "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 === "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 === "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>
|
</UButton>
|
||||||
</template>
|
</template>
|
||||||
</UDashboardNavbar>
|
</UDashboardNavbar>
|
||||||
|
|
||||||
<UDashboardPanelContent>
|
<UDashboardPanelContent>
|
||||||
<UTabs class="p-5" :items="tabItems" @change="onChangeTab" v-if="loaded">
|
<UTabs class="p-5" :items="tabItems" @change="onChangeTab" v-if="loaded">
|
||||||
<template #item="{item}">
|
<template #item="{item}">
|
||||||
|
|||||||
@@ -792,6 +792,10 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
selectDataType: "plants",
|
selectDataType: "plants",
|
||||||
selectOptionAttribute: "name",
|
selectOptionAttribute: "name",
|
||||||
selectSearchAttributes: ['name'],
|
selectSearchAttributes: ['name'],
|
||||||
|
},{
|
||||||
|
key: "customerRef",
|
||||||
|
label: "Referenz des Kunden",
|
||||||
|
inputType: "text"
|
||||||
},{
|
},{
|
||||||
key: "notes",
|
key: "notes",
|
||||||
label: "Notizen",
|
label: "Notizen",
|
||||||
|
|||||||
Reference in New Issue
Block a user