feat(appointment): implement service-based booking flow with service selection and slot adaptation
This commit is contained in:
@@ -59,6 +59,16 @@ export const request = {
|
||||
params: { year, month },
|
||||
...removeTokenHead,
|
||||
}),
|
||||
getBookingServices: (doctor_uuid) =>
|
||||
api.get(`api/v1/appointment-booking-services/${doctor_uuid}`, removeTokenHead),
|
||||
getServiceSlots: (doctor_uuid, date, serviceItemUuids = []) =>
|
||||
api.get(
|
||||
`api/v1/appointment-service-slots?doctor_uuid=${doctor_uuid}&date=${date}` +
|
||||
serviceItemUuids
|
||||
.map((u) => `&service_item_uuids[]=${encodeURIComponent(u)}`)
|
||||
.join(""),
|
||||
removeTokenHead
|
||||
),
|
||||
postAppointment: (data) => api.post(`api/v1/appointment`, data, { requireAuth: true }),
|
||||
getMyAppointments: (params) => api.get(`api/v1/appointments/user`, { params, requireAuth: true }),
|
||||
getPaymentConfig: () => api.get(`api/v1/payment/config`, { requireAuth: true }),
|
||||
|
||||
Reference in New Issue
Block a user