From eda85197a4a979d33815481d07eebbc67df078b2 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 08 十二月 2021 10:25:05 +0800
Subject: [PATCH] update: TODO#131539 [我的顧問清單] 預約單可以修改/取消

---
 PAMapp/assets/ts/api/consultant.ts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/PAMapp/assets/ts/api/consultant.ts b/PAMapp/assets/ts/api/consultant.ts
index a797075..159c2fd 100644
--- a/PAMapp/assets/ts/api/consultant.ts
+++ b/PAMapp/assets/ts/api/consultant.ts
@@ -133,6 +133,22 @@
     return service.post('/satisfaction/create', data ,{headers});
 }
 
+// ������
+export function cancelAppointment(appointment: number) {
+    const headers = {
+        Authorization: 'Bearer ' + localStorage.getItem('id_token')
+    }
+    return service.delete('/appointment/'+appointment ,{headers});
+}
+
+// 蝺刻摩����
+export function editAppointment(editAppointmentParams: editAppointmentParams) {
+    const headers = {
+        Authorization: 'Bearer ' + localStorage.getItem('id_token')
+    }
+    return service.put('/appointment', editAppointmentParams, {headers});
+}
+
 export interface FastQueryParams {
     gender             : string,
     communicationStyles: string[],
@@ -231,3 +247,16 @@
     appointmentId:number,
     score:number,
 }
+
+export interface editAppointmentParams {
+    id: number,
+    phone: string,
+    email: string,
+    contactType: string,
+    gender: string,
+    age: string,
+    job: string,
+    requirement: string,
+    hopeContactTime: string,
+    otherRequirement: null
+}

--
Gitblit v1.8.0