fix(timesheet): remove explicit undefined where unnecessary

This commit is contained in:
Nic D 2026-01-22 12:11:49 -05:00
parent 6c10cbb7fa
commit b8ce517a02
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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<BackendResponse<Shift>> => {
createNewShifts: async (new_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
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<BackendResponse<Shift>> => {
updateShifts: async (existing_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
if (employee_email) {
const response = await api.patch(`/shift/update/${employee_email}`);
return response.data;