diff --git a/components/DocumentDisplayModal.vue b/components/DocumentDisplayModal.vue index aaa5118..372d77a 100644 --- a/components/DocumentDisplayModal.vue +++ b/components/DocumentDisplayModal.vue @@ -24,6 +24,7 @@ const emit = defineEmits(["updateNeeded"]) const folders = ref([]) const filetypes = ref([]) +const documentboxes = ref([]) const setup = async () => { const {data} = await supabase.from("folders").select().eq("tenant",useProfileStore().currentTenant) @@ -55,6 +56,7 @@ const setup = async () => { }) filetypes.value = await useSupabaseSelect("filetags") + documentboxes.value = await useSupabaseSelect("documentboxes") } setup() @@ -371,6 +373,18 @@ const moveFile = async () => { @change="updateDocument" /> + Dokumentenbox + + + + diff --git a/components/MainNav.vue b/components/MainNav.vue index a3174e4..ec84260 100644 --- a/components/MainNav.vue +++ b/components/MainNav.vue @@ -54,10 +54,26 @@ const links = computed(() => { to: "/standardEntity/events", icon: "i-heroicons-calendar-days" }] : [], + /*{ + label: "Dateien", + to: "/files", + icon: "i-heroicons-document" + },*/ + ] + }, + { + label: "Dokumente", + icon: "i-heroicons-rectangle-stack", + defaultOpen: false, + children: [ { label: "Dateien", to: "/files", icon: "i-heroicons-document" + },{ + label: "Boxen", + to: "/standardEntity/documentboxes", + icon: "i-heroicons-archive-box" }, ] }, diff --git a/stores/data.js b/stores/data.js index e27ba17..d071fb5 100644 --- a/stores/data.js +++ b/stores/data.js @@ -1528,6 +1528,69 @@ export const useDataStore = defineStore('data', () => { } ] }, + documentboxes: { + isArchivable: true, + label: "Dokumentenboxen", + labelSingle: "Dokumentenbox", + isStandardEntity: true, + supabaseSelectWithInformation: "*, space(*), files(*)", + redirect: true, + numberRangeHolder: "key", + historyItemHolder: "documentbox", + inputColumns: [ + "Allgemeines", + ], + filters:[{ + name: "Archivierte ausblenden", + default: true, + "filterFunction": function (row) { + if(!row.archived) { + return true + } else { + return false + } + } + }], + templateColumns: [ + { + key: "space", + label: "Aktueller Lagerplatz", + inputType: "select", + selectDataType: "spaces", + selectOptionAttribute: "name", + selectSearchAttributes: ['name'], + inputColumn: "Allgemeines", + component: space + }, + { + key: "key", + label: "Nummer", + inputType: "text", + inputIsNumberRange: true, + inputColumn: "Allgemeines", + title: true, + required: true, + }, + { + key: "profiles", + label: "Berechtigte Benutzer", + inputType: "select", + selectDataType: "profiles", + selectOptionAttribute: "fullName", + selectSearchAttributes: ['fullName'], + selectMultiple: true, + component: profiles + }, + + ], + showTabs: [ + { + label: 'Informationen', + }, { + label: 'Dateien', + } + ] + }, services: { isArchivable: true, label: "Leistungen",