diff --git a/frontend/src/components/material/MaterialLists.vue b/frontend/src/components/material/MaterialLists.vue index 08f7a132f8..1dbede490a 100644 --- a/frontend/src/components/material/MaterialLists.vue +++ b/frontend/src/components/material/MaterialLists.vue @@ -8,6 +8,29 @@ mdi-chevron-right + + + + {{ + $tc('components.material.materialLists.unassigned') + }} + + {{ + $tc('components.material.materialLists.materialsCount', unassignedCount, { + count: unassignedCount, + }) + }} + + + + mdi-chevron-right + + period.materialItems().items) + }, materailListsSorted() { return materialListsSorted(this.materialLists.allItems) }, + unassignedCount() { + if (this.allMaterialItems.length === 0 || this.materialLists._meta.loading) { + return 0 + } + return ( + this.allMaterialItems.length - + this.materialLists.items.reduce((sum, list) => { + return sum + list.itemCount + }, 0) + ) + }, }, mounted() { this.materialLists.$loadItems() diff --git a/frontend/src/components/material/useMaterialViewHelper.js b/frontend/src/components/material/useMaterialViewHelper.js index 33059199c8..4ce39712ea 100644 --- a/frontend/src/components/material/useMaterialViewHelper.js +++ b/frontend/src/components/material/useMaterialViewHelper.js @@ -158,6 +158,7 @@ export function useMaterialViewHelper(camp, list) { return { collection, downloadXlsx, + downloadMaterialList, openPeriods, } } diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index e490c71662..0142af4f3c 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -314,7 +314,8 @@ }, "materialLists": { "materialsCount": "Keine Einträge | 1 Eintrag | {count} Einträge", - "overview": "Gesamtübersicht" + "overview": "Gesamtübersicht", + "unassigned": "Nicht zugewiesen" }, "materialTable": { "addNewItem": "Eintrag hinzufügen", @@ -758,6 +759,10 @@ "download": "Übersicht herunterladen", "title": "Gesamtübersicht" }, + "materialUnassigned": { + "excelTitle": "nicht zugewiesen", + "title": "Nicht zugewiesenes Material" + }, "sideBarMaterialLists": { "title": "Materiallisten" } diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index eff7c30acb..d84fb8590a 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -314,7 +314,8 @@ }, "materialLists": { "materialsCount": "No entries | 1 entry | {count} entries", - "overview": "General overview" + "overview": "General overview", + "unassigned": "Not assigned" }, "materialTable": { "addNewItem": "Add new item", @@ -758,6 +759,10 @@ "download": "Download overview", "title": "General overview" }, + "materialUnassigned": { + "excelTitle": "unassigned", + "title": "Unassigned material" + }, "sideBarMaterialLists": { "title": "Material lists" } diff --git a/frontend/src/router.js b/frontend/src/router.js index 5cb1871a6d..0c6afd0333 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -339,6 +339,23 @@ export default new Router({ }), }, }, + { + name: 'camp/material/unassigned', + path: '/camps/:campId/:campShortTitle?/material/unassigned', + components: { + navigation: NavigationCamp, + default: () => import('./views/camp/material/MaterialUnassigned.vue'), + aside: () => import('./views/camp/material/SideBarMaterialLists.vue'), + }, + beforeEnter: all([requireAuth, requireCamp]), + props: { + navigation: (route) => ({ camp: campFromRoute(route) }), + aside: (route) => ({ camp: campFromRoute(route) }), + default: (route) => ({ + camp: campFromRoute(route), + }), + }, + }, { name: 'camp/overview/checklists/checklist', path: '/camps/:campId/:campShortTitle?/overview/checklists/:checklistId/:checklistName?', diff --git a/frontend/src/scss/tailwind.scss b/frontend/src/scss/tailwind.scss index 4f55e54c55..a41991a433 100644 --- a/frontend/src/scss/tailwind.scss +++ b/frontend/src/scss/tailwind.scss @@ -43,3 +43,7 @@ .opacity-60 { opacity: 0.6; } + +.italic { + font-style: italic; +} diff --git a/frontend/src/views/camp/CampProgram.vue b/frontend/src/views/camp/CampProgram.vue index d026beec26..ffb3db779c 100644 --- a/frontend/src/views/camp/CampProgram.vue +++ b/frontend/src/views/camp/CampProgram.vue @@ -44,7 +44,7 @@ Show all activity schedule entries of a single period. /> + +