From 6ebc03603c00e02cb6e1843c9cbd129f132610e9 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期四, 16 十二月 2021 14:49:32 +0800
Subject: [PATCH] update: [我的顧問列表-已聯絡] 以 Appointment 狀態賴進行判斷及顯示

---
 PAMapp/pages/myConsultantList.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/PAMapp/pages/myConsultantList.vue b/PAMapp/pages/myConsultantList.vue
index 405eef5..d0b0ae0 100644
--- a/PAMapp/pages/myConsultantList.vue
+++ b/PAMapp/pages/myConsultantList.vue
@@ -41,11 +41,6 @@
     @Action
     storeConsultantList!: any;
 
-    @Watch('myConsultantList')
-    onMyConsultantListChange() {
-        this.setList();
-    }
-
     //////////////////////////////////////////////////////////////////////
 
     beforeRouteEnter(to: any, from: any, next: any) {
@@ -66,6 +61,11 @@
     }
 
     //////////////////////////////////////////////////////////////////////
+
+    @Watch('myConsultantList')
+    onMyConsultantListChange() {
+        this.setList();
+    }
 
     clickTab(path: string) {
         this.activeTabName = path;
@@ -92,14 +92,15 @@
                 ...consultant,
                 appointmentId: appointment.id,
                 appointmentDate: appointment.appointmentDate,
-                appointmentScore: appointment.satisfactionScore
+                appointmentScore: appointment.satisfactionScore,
+                appointmentStatus: appointment.communicateStatus,
               };
               this.contactedList.push(consultantWithAppointmentId);
             })
           });
 
         this.contactedList = this.contactedList
-          .filter((appointment) => appointment['contactStatus'] === 'contacted')
+          .filter((appointment) => appointment['appointmentStatus'] === 'contacted')
           .map((appointment) => ({ ...appointment, sortTime: new Date(appointment.appointmentDate)}))
           .sort((preAppointment, nextAppointment) => +nextAppointment.sortTime - +preAppointment.sortTime);
     }

--
Gitblit v1.8.0