| | |
| | | import { http } from "./httpClient"; |
| | | |
| | | import { ClientInfo } from "../models/client.model"; |
| | | import { AppointmentDetail } from "../models/appointment.model"; |
| | | |
| | | class AppointmentService { |
| | | |
| | |
| | | return http.post(`/appointment/recordRead/${appointmentId}`); |
| | | } |
| | | |
| | | // 取得預約單細節 |
| | | async getAppointmentDetail(appointmentId: number):Promise<AppointmentDetail> { |
| | | return http.get(`/appointment/getDetail/${appointmentId}`).then((res) => res.data); |
| | | } |
| | | |
| | | // 取消預約 |
| | | cancelAppointment(appointmentId: number): Promise<void> { |
| | | return http.delete(`/appointment/${appointmentId}`); |
| | | } |
| | | |
| | | } |
| | | |
| | | export default new AppointmentService(); |