From 131a7a95b98a5a422a6bdc52454c61faeb8f1991 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 20 May 2025 16:52:17 +0200 Subject: [PATCH] Added Name Edition to Company Customers --- pages/createDocument/edit/[[id]].vue | 4 ++++ stores/data.js | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 59ac87d..6378b18 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -939,6 +939,7 @@ const getDocumentData = () => { },*/ recipient: [ customerData.name, + ... customerData.nameAddition ? [customerData.nameAddition] : [], ... contactData ? [`${contactData.firstName} ${contactData.lastName}`] : [], itemInfo.value.address.street, ... itemInfo.value.address.special ? [itemInfo.value.address.special] : [], @@ -1531,6 +1532,9 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { @change="setCustomerData" class="flex-auto" > + { disabledFunction: function (item) { return !item.isCompany }, + }, { + key: "nameAddition", + label: "Firmenname Zusatz", + inputType: "text", + disabledFunction: function (item) { + return !item.isCompany + }, },{ key: "salutation", label: "Anrede", @@ -2617,6 +2624,8 @@ export const useDataStore = defineStore('data', () => { name = "Nachname" } else if(key === "name") { name = "Name" + } else if(key === "nameAddition") { + name = "Name Zusatz" } else if(key === "approved") { name = "Genehmigt" } else if(key === "manufacturer") { @@ -2710,7 +2719,7 @@ export const useDataStore = defineStore('data', () => { let text = "" if(prop.type === "updated" && newVal !== "-" && oldVal !== "-") { - text = `Gerändert: ${name} von "${oldVal}" zu "${newVal}"` + text = `Geändert: ${name} von "${oldVal}" zu "${newVal}"` } else if(prop.type === "updated" && newVal !== "-" && oldVal === "-") { text = `Hinzugefügt: ${name} "${newVal}"` } else if(prop.type === "created") {