From e18ca79b5232a8cb2fd0a2075e390ac2eea1bd87 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Sun, 3 Nov 2024 18:34:25 +0100 Subject: [PATCH] add shared reports section in the frontend --- .../Common/Report/ReportCreateModal.vue | 124 +++++++ .../Common/Report/ReportEditModal.vue | 139 ++++++++ .../Report/ReportMoreOptionsDropdown.vue | 40 +++ .../Components/Common/Report/ReportTable.vue | 52 +++ .../Common/Report/ReportTableHeading.vue | 26 ++ .../Common/Report/ReportTableRow.vue | 108 +++++++ .../Common/Reporting/ReportingTabNavbar.vue | 30 ++ .../RecentlyTrackedTasksCardEntry.vue | 2 +- resources/js/Pages/Reporting.vue | 38 ++- resources/js/Pages/ReportingDetailed.vue | 15 +- resources/js/Pages/ReportingShared.vue | 145 +++++++++ resources/js/Pages/SharedReport.vue | 134 ++++++++ resources/js/packages/api/src/index.ts | 10 + .../packages/api/src/openapi.json.client.ts | 306 ++++++++++++++++++ .../js/packages/ui/src/Input/DatePicker.vue | 2 +- resources/js/utils/permissions.ts | 7 + routes/web.php | 4 + 17 files changed, 1153 insertions(+), 29 deletions(-) create mode 100644 resources/js/Components/Common/Report/ReportCreateModal.vue create mode 100644 resources/js/Components/Common/Report/ReportEditModal.vue create mode 100644 resources/js/Components/Common/Report/ReportMoreOptionsDropdown.vue create mode 100644 resources/js/Components/Common/Report/ReportTable.vue create mode 100644 resources/js/Components/Common/Report/ReportTableHeading.vue create mode 100644 resources/js/Components/Common/Report/ReportTableRow.vue create mode 100644 resources/js/Components/Common/Reporting/ReportingTabNavbar.vue create mode 100644 resources/js/Pages/ReportingShared.vue create mode 100644 resources/js/Pages/SharedReport.vue diff --git a/resources/js/Components/Common/Report/ReportCreateModal.vue b/resources/js/Components/Common/Report/ReportCreateModal.vue new file mode 100644 index 00000000..e34d0213 --- /dev/null +++ b/resources/js/Components/Common/Report/ReportCreateModal.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/resources/js/Components/Common/Report/ReportEditModal.vue b/resources/js/Components/Common/Report/ReportEditModal.vue new file mode 100644 index 00000000..26647d82 --- /dev/null +++ b/resources/js/Components/Common/Report/ReportEditModal.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/resources/js/Components/Common/Report/ReportMoreOptionsDropdown.vue b/resources/js/Components/Common/Report/ReportMoreOptionsDropdown.vue new file mode 100644 index 00000000..644d5532 --- /dev/null +++ b/resources/js/Components/Common/Report/ReportMoreOptionsDropdown.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/resources/js/Components/Common/Report/ReportTable.vue b/resources/js/Components/Common/Report/ReportTable.vue new file mode 100644 index 00000000..c840ab19 --- /dev/null +++ b/resources/js/Components/Common/Report/ReportTable.vue @@ -0,0 +1,52 @@ + + + diff --git a/resources/js/Components/Common/Report/ReportTableHeading.vue b/resources/js/Components/Common/Report/ReportTableHeading.vue new file mode 100644 index 00000000..ccbd5a8d --- /dev/null +++ b/resources/js/Components/Common/Report/ReportTableHeading.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/resources/js/Components/Common/Report/ReportTableRow.vue b/resources/js/Components/Common/Report/ReportTableRow.vue new file mode 100644 index 00000000..71624c16 --- /dev/null +++ b/resources/js/Components/Common/Report/ReportTableRow.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/resources/js/Components/Common/Reporting/ReportingTabNavbar.vue b/resources/js/Components/Common/Reporting/ReportingTabNavbar.vue new file mode 100644 index 00000000..c7b3fe5a --- /dev/null +++ b/resources/js/Components/Common/Reporting/ReportingTabNavbar.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/resources/js/Components/Dashboard/RecentlyTrackedTasksCardEntry.vue b/resources/js/Components/Dashboard/RecentlyTrackedTasksCardEntry.vue index 1e6c7202..4c74f00d 100644 --- a/resources/js/Components/Dashboard/RecentlyTrackedTasksCardEntry.vue +++ b/resources/js/Components/Dashboard/RecentlyTrackedTasksCardEntry.vue @@ -38,7 +38,7 @@ async function startTaskTimer() {
-

+

{{ title }}

( 'reporting-start-date', @@ -149,9 +152,21 @@ const { tags } = storeToRefs(useTagsStore()); async function createTag(tag: string) { return await useTagsStore().createTag(tag); } +const showCreateReportModal = ref(false); + +const reportProperties = computed(() => { + return { + ...getFilterAttributes(), + group: group.value, + sub_group: subGroup.value, + } as CreateReportBodyProperties; +});