From 67631afdd93a854040a93852085569562027160f Mon Sep 17 00:00:00 2001 From: Igor Richter Date: Wed, 11 Oct 2023 17:02:14 +0200 Subject: [PATCH 01/14] add icons to new class view WIP --- .../administration/ClassOverview.page.vue | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/src/pages/administration/ClassOverview.page.vue b/src/pages/administration/ClassOverview.page.vue index 3c1e6d40b0..c351f438cb 100644 --- a/src/pages/administration/ClassOverview.page.vue +++ b/src/pages/administration/ClassOverview.page.vue @@ -22,6 +22,20 @@ @update:items-per-page="onUpdateItemsPerPage" @update:page="onUpdateCurrentPage" > + groupModule.getClasses ); + /*const showIcons = (item: ClassInfo): boolean => { + try { + return ( + !item.externalSourceName && + authModule.getUserPermissions.includes("CLASS_EDIT".toLowerCase()) + ); + } catch (error) { + return false; + } + };*/ + + const showIcons: ComputedRef = computed((item) => { + console.log(item); + return ( + !item.externalSourceName && + authModule.getUserPermissions.includes("CLASS_EDIT".toLowerCase()) + ); + }); + const pagination: ComputedRef = computed( () => groupModule.getPagination ); @@ -99,8 +139,33 @@ export default defineComponent({ text: t("common.labels.teacher"), sortable: true, }, + { + value: "actions", + text: "Hier könnte ihre Werbung stehen", // "actions"? does not exist in old table + sortable: false, // does it make sense to sort here? + }, ]; + const manageClass = (item: ClassInfo) => { + console.log("manage: ", item); + }; + + const editItem = (item: ClassInfo) => { + console.log( + "edit: ", + item, + authModule.getUserPermissions.includes("CLASS_EDIT".toLowerCase()) + ); + }; + + const deleteItem = (item: ClassInfo) => { + console.log("delete: ", item); + }; + + const createSuccessor = (item: ClassInfo) => { + console.log("successor: ", item); + }; + const onUpdateSortBy = async (sortBy: string) => { groupModule.setSortBy(sortBy); await groupModule.loadClassesForSchool(); @@ -133,14 +198,23 @@ export default defineComponent({ breadcrumbs, headers, classes, + showIcons, page, sortBy, sortOrder, pagination, + manageClass, + editItem, + deleteItem, + createSuccessor, onUpdateSortBy, updateSortOrder, onUpdateCurrentPage, onUpdateItemsPerPage, + mdiAccountMultipleOutline, + mdiPencilOutline, + mdiTrashCanOutline, + mdiArrowUpBoldOutline, }; }, }); From 7ed64f79a0e130f4da5c99c73e1b6a260ad9d708 Mon Sep 17 00:00:00 2001 From: Igor Richter Date: Thu, 12 Oct 2023 10:09:45 +0200 Subject: [PATCH 02/14] add icons to new class view --- .../administration/ClassOverview.page.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/pages/administration/ClassOverview.page.vue b/src/pages/administration/ClassOverview.page.vue index c351f438cb..1e22c60034 100644 --- a/src/pages/administration/ClassOverview.page.vue +++ b/src/pages/administration/ClassOverview.page.vue @@ -22,17 +22,21 @@ @update:items-per-page="onUpdateItemsPerPage" @update:page="onUpdateCurrentPage" > -