diff --git a/components/OwnFields.vue b/components/OwnFields.vue new file mode 100644 index 0000000..d2c76fb --- /dev/null +++ b/components/OwnFields.vue @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/components/ProfileDropdown.vue b/components/ProfileDropdown.vue index 5714b56..4d4d0b2 100644 --- a/components/ProfileDropdown.vue +++ b/components/ProfileDropdown.vue @@ -5,6 +5,8 @@ const supabase = useSupabaseClient() //const tenant = ref(dataStore.currentTenant) const selectedProfile = ref(dataStore.activeProfile.id) + + diff --git a/layouts/default.vue b/layouts/default.vue index b9330f7..09f0f50 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -372,6 +372,10 @@ let links = computed(() => { label: "Text Vorlagen", to: "/settings/texttemplates", icon: "i-heroicons-clipboard-document-list" + },{ + label: "Eigene Felder", + to: "/settings/ownfields", + icon: "i-heroicons-clipboard-document-list" },{ label: "Firmeneinstellungen", to: "/settings/tenant", diff --git a/nuxt.config.ts b/nuxt.config.ts index e6c835d..e520ce5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -6,6 +6,7 @@ export default defineNuxtConfig({ enabled: true } }, + ssr:false, imports: { dirs: ['stores'] }, diff --git a/pages/contracts/[mode]/[[id]].vue b/pages/contracts/[mode]/[[id]].vue index df6f291..14d299f 100644 --- a/pages/contracts/[mode]/[[id]].vue +++ b/pages/contracts/[mode]/[[id]].vue @@ -37,12 +37,15 @@ const itemInfo = ref({ name: "", customer: null, active: true, + ownFields: {} }) //Functions const setupPage = async () => { - if(mode.value === "show" || mode.value === "edit"){ + if(mode.value === "show" ){ itemInfo.value = await useSupabaseSelectSingle("contracts", route.params.id, "*, customer(id,name)") + } else if (mode.value === "edit"){ + itemInfo.value = await useSupabaseSelectSingle("contracts", route.params.id, "*") } @@ -110,296 +113,324 @@ setupPage() - - - - - - - Kundennummer: {{itemInfo.customer ? itemInfo.customer.name : ""}} - Beschreibung: - {{itemInfo.description}} - - + + + + + + + + Kundennummer: {{itemInfo.customer ? itemInfo.customer.name : ""}} + Eigene Felder: {{itemInfo.ownFields}} + Beschreibung: + {{itemInfo.description}} + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + Vertragsdaten + + + + + + + + {{dataStore.getCustomerById(itemInfo.customer) ? dataStore.getCustomerById(itemInfo.customer).name : "Kein Kunde ausgewählt" }} + + + + + + + {{dataStore.getContactById(itemInfo.contact) ? dataStore.getContactById(itemInfo.contact).fullName : "Kein Ansprechpartner ausgewählt" }} + + + + + + + + + + + + - - - - - - - - - - - - - + - + + Eigene Felder - - - - - - - - Vertragsdaten - - - - - {{dataStore.getCustomerById(itemInfo.customer) ? dataStore.getCustomerById(itemInfo.customer).name : "Kein Kunde ausgewählt" }} - - - - - - - {{dataStore.getContactById(itemInfo.contact) ? dataStore.getContactById(itemInfo.contact).fullName : "Kein Ansprechpartner ausgewählt" }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Abrechnung - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
Kundennummer: {{itemInfo.customer ? itemInfo.customer.name : ""}}