From ec466bf6f2a43f2b910d5f024199bc507a79ddf2 Mon Sep 17 00:00:00 2001 From: Nicolas Drolet Date: Tue, 6 Jan 2026 15:10:27 -0500 Subject: [PATCH] fix(approvals): fix sizing issue, multiple ui bugs in details window, separate scrollable timesheet from static one --- .../components/shift-list-scrollable.vue | 102 ++++ .../timesheets/components/shift-list.vue | 554 ++++++++---------- .../components/timesheet-wrapper.vue | 70 ++- src/pages/timesheet-approval-page.vue | 2 +- 4 files changed, 397 insertions(+), 331 deletions(-) create mode 100644 src/modules/timesheets/components/shift-list-scrollable.vue diff --git a/src/modules/timesheets/components/shift-list-scrollable.vue b/src/modules/timesheets/components/shift-list-scrollable.vue new file mode 100644 index 0000000..3b20851 --- /dev/null +++ b/src/modules/timesheets/components/shift-list-scrollable.vue @@ -0,0 +1,102 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheets/components/shift-list.vue b/src/modules/timesheets/components/shift-list.vue index 637662f..2092c4f 100644 --- a/src/modules/timesheets/components/shift-list.vue +++ b/src/modules/timesheets/components/shift-list.vue @@ -1,323 +1,233 @@ - - - - - \ No newline at end of file diff --git a/src/modules/timesheets/components/timesheet-wrapper.vue b/src/modules/timesheets/components/timesheet-wrapper.vue index 36e92cb..358a91d 100644 --- a/src/modules/timesheets/components/timesheet-wrapper.vue +++ b/src/modules/timesheets/components/timesheet-wrapper.vue @@ -4,6 +4,7 @@ > /* eslint-disable */ import ShiftList from 'src/modules/timesheets/components/shift-list.vue'; + import ShiftListScrollable from 'src/modules/timesheets/components/shift-list-scrollable.vue'; import LoadingOverlay from 'src/modules/shared/components/loading-overlay.vue'; import ExpenseDialog from 'src/modules/timesheets/components/expense-dialog.vue'; import PageHeaderTemplate from 'src/modules/shared/components/page-header-template.vue'; @@ -28,6 +29,21 @@ const is_timesheets_approved = computed(() => timesheet_store.timesheets.every(timesheet => timesheet.is_approved)) + const total_hours = computed(() => timesheet_store.timesheets.reduce((sum, timesheet) => + sum + timesheet.weekly_hours.regular + + timesheet.weekly_hours.evening + + timesheet.weekly_hours.emergency + + timesheet.weekly_hours.overtime, + 0) //initial value + ); + + const total_expenses = computed(() => timesheet_store.timesheets.reduce((sum, timesheet) => + sum + timesheet.weekly_expenses.expenses + + timesheet.weekly_expenses.on_call + + timesheet.weekly_expenses.per_diem, + 0) //initial value + ); + const { mode = 'normal' } = defineProps<{ mode?: 'approval' | 'normal'; }>(); @@ -46,7 +62,7 @@ + > {{ $t('timesheet.page_header') }} @@ -54,8 +70,15 @@
-
- +
+
- + -
+
@@ -77,7 +103,7 @@
- + + +
+ +
+ {{ $t('shared.error.no_data_found') + }} + +
+ + + +
+ (null); const table_max_height = computed(() => { - const height = page_height.value - (headerComponent.value?.clientHeight ?? 0); + const height = page_height.value - Math.min(headerComponent.value?.clientHeight ?? 0, headerComponent.value?.offsetHeight ?? 0); return height; });