From eddaae2d873eae5cd637302dedbf343df5b15376 Mon Sep 17 00:00:00 2001 From: flfeders Date: Tue, 16 Apr 2024 18:00:35 +0200 Subject: [PATCH] Restructured IncomingInvoices Added Aspect Ration to DocumentDisplay.vue --- components/DocumentDisplay.vue | 21 +- components/DocumentList.vue | 6 +- layouts/default.vue | 8 +- package-lock.json | 47 +++- package.json | 1 + pages/{receipts => createDocument}/index.vue | 34 +-- .../incomingInvoices/[mode]/[[id]].vue | 205 ++++++++++-------- pages/incomingInvoices/index.vue | 119 ++++++++++ pages/index.vue | 46 ++-- pages/vendors/[mode]/[[id]].vue | 2 +- stores/data.js | 3 +- 11 files changed, 331 insertions(+), 161 deletions(-) rename pages/{receipts => createDocument}/index.vue (86%) rename pages/{receipts => }/incomingInvoices/[mode]/[[id]].vue (80%) create mode 100644 pages/incomingInvoices/index.vue diff --git a/components/DocumentDisplay.vue b/components/DocumentDisplay.vue index 1ce716e..5a703ee 100644 --- a/components/DocumentDisplay.vue +++ b/components/DocumentDisplay.vue @@ -12,11 +12,14 @@ const props = defineProps({ openShowModal: { type: Boolean, required: false, + }, + returnEmit: { + type: Boolean } }) -let {documentData, openShowModal:openShowModalProp } = props; +let {documentData, openShowModal:openShowModalProp, returnEmit } = props; const tags = dataStore.getDocumentTags const openShowModal = ref(false) @@ -128,7 +131,7 @@ const updateDocumentAssignment = async () => { - -

{{dataStore.getProfileById(time.profile).fullName}}

+
@@ -59,9 +63,6 @@ const items = [[{ }]] -const {getOpenTasksCount} = useDataStore() -const openTasks = getOpenTasksCount - const supabase = useSupabaseClient() const user = useSupabaseUser() @@ -69,16 +70,5 @@ const user = useSupabaseUser() \ No newline at end of file diff --git a/pages/vendors/[mode]/[[id]].vue b/pages/vendors/[mode]/[[id]].vue index 4373388..151c5f0 100644 --- a/pages/vendors/[mode]/[[id]].vue +++ b/pages/vendors/[mode]/[[id]].vue @@ -28,7 +28,7 @@ const setupPage = () => { } if (mode.value === "edit") itemInfo.value = currentItem.value - if(currentItem.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value)) + if(currentItem.value) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value)) } diff --git a/stores/data.js b/stores/data.js index 4468226..70896e5 100644 --- a/stores/data.js +++ b/stores/data.js @@ -93,7 +93,8 @@ export const useDataStore = defineStore('data', () => { }, incominginvoices: { label: "Eingangsrechnungen", - labelSingle: "Eingangsrechnung" + labelSingle: "Eingangsrechnung", + redirect:true }, inventoryitems: { label: "Inventarartikel",