From 803b155f6500d7434eeef7270ab93cc1ee5c1459 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Mon, 30 Dec 2024 10:35:20 +0100 Subject: [PATCH] Changes --- pages/createDocument/edit/[[id]].vue | 12 ++++++------ stores/data.js | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 34ae996..8263c4a 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -229,7 +229,7 @@ const setDocumentTypeConfig = (withTexts = false) => { const setCustomerData = () => { - let customer = dataStore.getCustomerById(itemInfo.value.customer) + let customer = customers.find(i => i.id === itemInfo.value.customer) itemInfo.value.contact = null if(customer) { itemInfo.value.address.street = customer.infoData.street @@ -530,7 +530,7 @@ const processDieselPosition = () => { const getDocumentData = () => { - let customerData = dataStore.getCustomerById(itemInfo.value.customer) + let customerData = customers.find(i => i.id === itemInfo.value.customer) let contactData = dataStore.getContactById(itemInfo.value.contact) let businessInfo = profileStore.ownTenant.businessInfo @@ -1016,7 +1016,7 @@ const setRowData = (row) => { variant="outline" class="w-full" > - {{dataStore.getCustomerById(itemInfo.customer) ? dataStore.getCustomerById(itemInfo.customer).name : "Kein Kunde ausgewählt"}} + {{row.customer ?customers.find(i => i.id === row.customer).name : "Kein Kunde ausgewählt"}} @@ -1040,9 +1040,9 @@ const setRowData = (row) => { title="Info" > diff --git a/stores/data.js b/stores/data.js index 0c615e1..b6900f7 100644 --- a/stores/data.js +++ b/stores/data.js @@ -1175,7 +1175,6 @@ export const useDataStore = defineStore('data', () => { key: "sellingPrice", label: "Verkaufspreis", component: sellingPrice, - inputType: "number", }, { key: "servicecategories",