From 7e924fa79d6dafbd60643b8e31519737feb92e3b Mon Sep 17 00:00:00 2001 From: malei <> Date: Sat, 1 Aug 2026 22:56:31 +0800 Subject: [PATCH] feat: configure booking capacity --- src/api/index.ts | 10 +++---- src/views/AppointmentsView.vue | 15 ++++++++-- src/views/ScheduleView.vue | 54 +++++++++++++++++++++++++++++----- src/views/SettingsView.vue | 30 +++++++++++++++---- 4 files changed, 90 insertions(+), 19 deletions(-) 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 @@