From 9cb6d5f92ad7aeda45ad1fe6482dcfc63d17be2b Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期一, 06 十二月 2021 12:35:26 +0800
Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM

---
 PAMapp/assets/ts/api/appointment.ts |   53 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/PAMapp/assets/ts/api/appointment.ts b/PAMapp/assets/ts/api/appointment.ts
index bbb8d6b..f27be9d 100644
--- a/PAMapp/assets/ts/api/appointment.ts
+++ b/PAMapp/assets/ts/api/appointment.ts
@@ -1,12 +1,13 @@
 import { service } from '~/assets/ts/api/share';
 import { AxiosResponse } from 'axios';
+import { AppointmentLog } from '../models/appointment.model';
 
 // ���������
-export function getMyAppointmentList():Promise<AxiosResponse<ClientInfo>> {
+export function getMyAppointmentList():Promise<ClientInfo[]> {
     const headers = {
         Authorization: 'Bearer ' + localStorage.getItem('id_token')
     }
-    return service.get('/consultant/getMyAppointment', {headers});
+    return service.get('/consultant/getMyAppointment', {headers}).then(res => res.data);
 }
 
 // 璅�撌脰蝯�
@@ -14,24 +15,54 @@
     const headers = {
         Authorization: 'Bearer ' + localStorage.getItem('id_token')
     }
+    // TODO: 頝�垢蝣箄���ㄐ��� API 銝�府���� void, ���府���敺���� - Ben 2021/11/16
     return service.post('/appointment/markAsContacted/'+appointmentId, undefined, {headers})
+            .then(res => res.data)
+}
+
+export function getMyReviewLog(): Promise<AppointmentLog[]> {
+    const headers = {
+        Authorization: 'Bearer ' + localStorage.getItem('id_token')
+    }
+    return service.get('/satisfaction/getMySatisfaction', { headers }).then(res => res.data);
+}
+
+
+// 憿批��憿舐內����蝑敺孛�
+export function allAppointmentsView() {
+    const headers = {
+        Authorization: 'Bearer ' + localStorage.getItem('id_token')
+    }
+    return service.post('/consultant/record/allAppointmentsView', undefined, {headers})
+}
+
+// 霈�������孛�
+export function recordRead(appointmentId: number) {
+    const headers = {
+        Authorization: 'Bearer ' + localStorage.getItem('id_token')
+    }
+    return service.post('/appointment/recordRead/' + appointmentId, undefined, {headers})
 }
 
 
 export interface ClientInfo {
-    id: number,
-    phone: string,
-    email: string,
-    contactType: string,
-    gender: string,
-    age: string,
-    job: string,
-    requirement: string,
+    id               : number,
+    phone            : string,
+    email            : string,
+    contactType      : string,
+    gender           : string,
+    age              : string,
+    job              : string,
+    requirement      : string,
     communicateStatus: string,
     hopeContactTime: string,
     otherRequirement: string,
     appointmentDate: Date,
     agentNo: string,
     customerId: number,
-    name: string
+    name: string,
+    consultantViewTime: Date,
+    consultantReadTime: Date,
+    contactTime: Date,
+    satisfactionScore: number
 }
\ No newline at end of file

--
Gitblit v1.8.0