From b8ce517a02c2098f3dad3ccd5fe429f782d5de85 Mon Sep 17 00:00:00 2001 From: Nic D Date: Thu, 22 Jan 2026 12:11:49 -0500 Subject: [PATCH] fix(timesheet): remove explicit undefined where unnecessary --- src/modules/timesheets/composables/use-shift-api.ts | 2 +- src/modules/timesheets/services/shift-service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/timesheets/composables/use-shift-api.ts b/src/modules/timesheets/composables/use-shift-api.ts index 031e58a..bf754de 100644 --- a/src/modules/timesheets/composables/use-shift-api.ts +++ b/src/modules/timesheets/composables/use-shift-api.ts @@ -7,7 +7,7 @@ export const useShiftApi = () => { const shift_store = useShiftStore(); const auth_store = useAuthStore(); - const deleteShiftById = async (shift_id: number, employee_email?: string | undefined) => { + const deleteShiftById = async (shift_id: number, employee_email?: string) => { timesheet_store.is_loading = true; const success = await shift_store.deleteShiftById(shift_id, employee_email); diff --git a/src/modules/timesheets/services/shift-service.ts b/src/modules/timesheets/services/shift-service.ts index 684b9b2..aef90ec 100644 --- a/src/modules/timesheets/services/shift-service.ts +++ b/src/modules/timesheets/services/shift-service.ts @@ -3,7 +3,7 @@ import type { BackendResponse } from "src/modules/shared/models/backend-response import type { Shift } from "src/modules/timesheets/models/shift.models"; export const ShiftService = { - deleteShiftById: async (shift_id: number, employee_email?: string | undefined) => { + deleteShiftById: async (shift_id: number, employee_email?: string) => { if (employee_email) { const response = await api.delete(`/shift/${shift_id}/${employee_email}`); return response.data; @@ -13,7 +13,7 @@ export const ShiftService = { return response.data; }, - createNewShifts: async (new_shifts: Shift[], employee_email?: string | undefined):Promise> => { + createNewShifts: async (new_shifts: Shift[], employee_email?: string):Promise> => { if (employee_email) { const response = await api.post(`/shift/create/${employee_email}`); return response.data; @@ -23,7 +23,7 @@ export const ShiftService = { return response.data; }, - updateShifts: async (existing_shifts: Shift[], employee_email?: string | undefined):Promise> => { + updateShifts: async (existing_shifts: Shift[], employee_email?: string):Promise> => { if (employee_email) { const response = await api.patch(`/shift/update/${employee_email}`); return response.data;