diff --git a/pages/contracts/[mode]/[[id]].vue b/pages/contracts/[mode]/[[id]].vue index d2f3081..3524ff6 100644 --- a/pages/contracts/[mode]/[[id]].vue +++ b/pages/contracts/[mode]/[[id]].vue @@ -43,7 +43,7 @@ const itemInfo = ref({ //Functions const setupPage = async () => { if(mode.value === "show" ){ - itemInfo.value = await useSupabaseSelectSingle("contracts", route.params.id, "*, customer(id,name), contact(id,fullName)") + itemInfo.value = await useSupabaseSelectSingle("contracts", route.params.id, "*, customer(id,name,isCompany, customerNumber), contact(id,fullName)") } else if (mode.value === "edit"){ itemInfo.value = await useSupabaseSelectSingle("contracts", route.params.id, "*") } @@ -138,12 +138,22 @@ setupPage() - Kundennummer: - {{itemInfo.customer ? itemInfo.customer.name : ""}} + Kunde: + + {{itemInfo.customer.customerNumber ? `${itemInfo.customer.customerNumber} - ` : ''}}{{itemInfo.customer ? itemInfo.customer.name : ""}} + - + Ansprechpartner: - {{itemInfo.contact ? itemInfo.contact.fullName : ""}} + + {{itemInfo.contact ? itemInfo.contact.fullName : ""}} + Wiederkehrend: @@ -153,7 +163,7 @@ setupPage() Startdatum: {{dayjs(itemInfo.startDate).format("DD.MM.YYYY")}} - + Enddatum: {{dayjs(itemInfo.endDate).format("DD.MM.YYYY")}} @@ -518,5 +528,7 @@ setupPage() td { border-bottom: 1px solid lightgrey; vertical-align: top; + padding-bottom: 0.15em; + padding-top: 0.15em; } \ No newline at end of file diff --git a/pages/inventoryitems/[mode]/[[id]].vue b/pages/inventoryitems/[mode]/[[id]].vue index 6350df7..b1abc33 100644 --- a/pages/inventoryitems/[mode]/[[id]].vue +++ b/pages/inventoryitems/[mode]/[[id]].vue @@ -12,8 +12,6 @@ const router = useRouter() const toast = useToast() const id = ref(route.params.id ? route.params.id : null ) -let currentItem = ref(null) - //Working const mode = ref(route.params.mode || "show") const itemInfo = ref({ @@ -25,15 +23,15 @@ const itemInfo = ref({ //Functions const setupPage = async () => { if(mode.value === "show" || mode.value === "edit"){ - currentItem.value = await useSupabaseSelectSingle("inventoryitems", route.params.id, "*, vendor(*)") + itemInfo.value = await useSupabaseSelectSingle("inventoryitems", route.params.id, "*, vendor(*)") } - if(mode.value === "edit") itemInfo.value = currentItem.value + if(mode.value === "edit") itemInfo.value = itemInfo.value } const cancelEditorCreate = () => { - if(currentItem.value) { - router.push(`/inventoryitems/show/${currentItem.value.id}`) + if(itemInfo.value) { + router.push(`/inventoryitems/show/${itemInfo.value.id}`) } else { router.push(`/inventoryitems`) } @@ -43,7 +41,22 @@ setupPage()