fix(timesheets): fix error where shift payload is not sent when modify employee timesheets from approval page
This commit is contained in:
parent
42de823b87
commit
8231b3084d
|
|
@ -15,7 +15,7 @@ export const ShiftService = {
|
||||||
|
|
||||||
createNewShifts: async (new_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
|
createNewShifts: async (new_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
|
||||||
if (employee_email) {
|
if (employee_email) {
|
||||||
const response = await api.post(`/shift/create/${employee_email}`);
|
const response = await api.post(`/shift/create/${employee_email}`, new_shifts);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ export const ShiftService = {
|
||||||
|
|
||||||
updateShifts: async (existing_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
|
updateShifts: async (existing_shifts: Shift[], employee_email?: string):Promise<BackendResponse<Shift>> => {
|
||||||
if (employee_email) {
|
if (employee_email) {
|
||||||
const response = await api.patch(`/shift/update/${employee_email}`);
|
const response = await api.patch(`/shift/update/${employee_email}`, existing_shifts);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user