diff --git a/src/api/index.ts b/src/api/index.ts index d68a4b7..a722781 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -43,7 +43,7 @@ export const updateStore = (data: Record) => apiPut('/store/upd export const getScheduleDay = (date: string) => apiGet('/schedule/day', { date }) -export const createScheduleBlock = (data: { slotStart: string; blockType: string; note?: string }) => +export const createScheduleBlock = (data: { slotStart: string; durationMinutes: number; blockType: string; note?: string }) => apiPost('/schedule/block', data) export const deleteScheduleBlock = (id: number) => @@ -62,11 +62,11 @@ export const deleteStaff = (staffId: number) => export const getServiceTypeList = (storeId?: number | null) => apiGet('/service-type/list', storeId != null ? { storeId } : {}) -export const createServiceType = (name: string) => - apiPost('/service-type/create', { name }) +export const createServiceType = (name: string, durationMinutes: number) => + apiPost('/service-type/create', { name, durationMinutes }) -export const updateServiceType = (id: number, name: string) => - apiPut('/service-type/update', { id, name }) +export const updateServiceType = (id: number, name: string, durationMinutes: number) => + apiPut('/service-type/update', { id, name, durationMinutes }) export const deleteServiceType = (id: number) => apiDelete('/service-type/delete', { id }) diff --git a/src/views/AppointmentsView.vue b/src/views/AppointmentsView.vue index 83a3fa6..7af3f1d 100644 --- a/src/views/AppointmentsView.vue +++ b/src/views/AppointmentsView.vue @@ -26,7 +26,9 @@ - + + + @@ -62,7 +64,7 @@