Fixed Load of existing Doc without Created_by

This commit is contained in:
2025-10-09 18:29:24 +02:00
parent 4514627ec0
commit 59c32ef8d8

View File

@@ -485,14 +485,15 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => {
const setContactPersonData = async () => { const setContactPersonData = async () => {
//console.log(itemInfo.value.contactPerson) //TODO: BACKEND CHANGE Set Profile //console.log(itemInfo.value.contactPerson) //TODO: BACKEND CHANGE Set Profile
let profile = (await useNuxtApp().$api(`/api/user/${itemInfo.value.created_by}`, { if(itemInfo.value.created_by) {
method: "GET" let profile = (await useNuxtApp().$api(`/api/user/${itemInfo.value.created_by}`, {
})).profile method: "GET"
})).profile
itemInfo.value.contactPersonName = profile.full_name
itemInfo.value.contactTel = profile.mobile_tel || profile.fixed_tel || ""
itemInfo.value.contactEMail = profile.email
itemInfo.value.contactPersonName = profile.full_name
itemInfo.value.contactTel = profile.mobile_tel || profile.fixed_tel || ""
itemInfo.value.contactEMail = profile.email
}
} }
const showAdvanceInvoiceCalcModal = ref(false) const showAdvanceInvoiceCalcModal = ref(false)