保誠-保戶業務員媒合平台
Tomas
2021-12-22 23f7ec5f7cd67322617e623361a5620d405dfeda
PAMapp/shared/services/appointment.service.ts
@@ -1,7 +1,7 @@
import { http } from "./httpClient";
import { ClientInfo } from "../models/client.model";
import { AppointmentDetail } from "../models/appointment.model";
import { ClientInfo } from "~/shared/models/client.model";
import { AppointmentDetail, EditAppointmentParams } from "~/shared/models/appointment.model";
class AppointmentService {
@@ -16,16 +16,9 @@
    });
  }
  // 顧問登入顯示新預約單筆數後觸發
  private viewAllAppointment(): void {
    http.post('/consultant/record/allAppointmentsView').then();
  }
  // 標記為已聯絡
  markAsContact(appointmentId: number): Promise<void> {
      // TODO: 跟後端確認,這裡的 API 不應該傳回 void, 而是應該是更新後的資料 - Ben 2021/11/16
      // return http.post('/appointment/markAsContacted/'+appointmentId, undefined, {headers})
      //         .then(res => res.data)
      return http.post(`/appointment/markAsContacted/${appointmentId}`);
  }
  // 讀取預約單時觸發,紀錄讀取預約單時間
@@ -43,6 +36,11 @@
    return http.delete(`/appointment/${appointmentId}`);
  }
  // 編輯預約
  editAppointment(editAppointmentParams: EditAppointmentParams) {
    return http.put('/appointment', editAppointmentParams);
  }
}
export default new AppointmentService();