保誠-保戶業務員媒合平台
Tomas
2022-01-13 66a8dd0cfd0122aee97a6f6859407630d6b4d384
PAMapp/shared/services/appointment.service.ts
@@ -1,6 +1,6 @@
import { http } from "./httpClient";
import { Appointment, AppointmentDetail, AppointmentMemoInfo, createdMemoInfo, EditAppointmentParams, updatedMemoInfo } from "~/shared/models/appointment.model";
import { Appointment, AppointmentDetail, AppointmentMemoInfo, createdMemoInfo, EditAppointmentParams, ToCloseAppointment, ToDoneAppointment, updatedMemoInfo } from "~/shared/models/appointment.model";
class AppointmentService {
@@ -41,12 +41,12 @@
  }
  // 新增註記
  createMemo(memoInfo: createdMemoInfo): Promise<AppointmentMemoInfo> {
  async createMemo(memoInfo: createdMemoInfo): Promise<AppointmentMemoInfo> {
    return http.post('/appointment/memo/create', memoInfo).then(res => res.data);
  }
  // 編輯註記
  updateMemo(memoInfo: updatedMemoInfo): Promise<AppointmentMemoInfo> {
  async updateMemo(memoInfo: updatedMemoInfo): Promise<AppointmentMemoInfo> {
    return http.post('/appointment/memo/update', memoInfo).then(res => res.data);
  }
@@ -54,6 +54,11 @@
  deleteMemo(appointmentMemoId: number) {
    return http.delete(`/appointment/memo/${appointmentMemoId}`)
  }
  // 預約單結案
  async closeAppointment(appointmentInfo: ToDoneAppointment | ToCloseAppointment) {
    return http.post(`/appointment/close`, appointmentInfo).then((res) => res.data);
  }
}
export default new AppointmentService();