From 01fb8b22e68a573f5f86ab9b0c5af14aecaf9a75 Mon Sep 17 00:00:00 2001 From: Nic D Date: Wed, 4 Feb 2026 16:04:25 -0500 Subject: [PATCH 01/44] feat(timesheet): add backend and frontend logic to display paid time off --- .../components/shift-list-weekly-overview.vue | 16 +++++++++++---- .../timesheets/services/timesheet-service.ts | 11 ++++++++++ src/stores/timesheet-store.ts | 20 +++++++++++++++++-- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/modules/timesheets/components/shift-list-weekly-overview.vue b/src/modules/timesheets/components/shift-list-weekly-overview.vue index 7ef4ca6..7693c3c 100644 --- a/src/modules/timesheets/components/shift-list-weekly-overview.vue +++ b/src/modules/timesheets/components/shift-list-weekly-overview.vue @@ -2,21 +2,29 @@ setup lang="ts" > + import { computed, onMounted } from 'vue'; import { useAuthStore } from 'src/stores/auth-store'; + import { useTimesheetStore } from 'src/stores/timesheet-store'; import { getHoursMinutesStringFromHoursFloat } from 'src/utils/date-and-time-utils'; - const { mode = 'totals', timesheetMode = 'normal', totalHours = 0, vacationHours = 0, sickHours = 0, bankedHours = 0, totalExpenses = 0 } = defineProps<{ + const { mode = 'totals', timesheetMode = 'normal', totalHours = 0, totalExpenses = 0 } = defineProps<{ mode: 'total-hours' | 'off-hours'; timesheetMode: 'approval' | 'normal'; totalHours?: number; - vacationHours?: number; - sickHours?: number; - bankedHours?: number; totalExpenses?: number; }>(); const auth_store = useAuthStore(); + const timesheetStore = useTimesheetStore(); const is_management = auth_store.user?.user_module_access.includes('timesheets_approval'); + + const vacationHours = computed(() => timesheetStore.paid_time_off_totals.vacation_hours); + const sickHours = computed(() => timesheetStore.paid_time_off_totals.sick_hours); + const bankedHours = computed(() => timesheetStore.paid_time_off_totals.banked_hours); + + onMounted(async () => { + await timesheetStore.getPaidTimeOffTotalsWithOptionalEmployeeEmail(); + })