From 9ece54e8b526dc70b1a50014ee2c38e42bb403e4 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期二, 25 一月 2022 12:25:43 +0800
Subject: [PATCH] update#134625: [ 客戶-我的顧問清單 ] 客戶安琪拉已預約熊蔡顧問,熊蔡顧問發送約訪通知,進入約訪中階段 , 但客戶安琪拉的顧問清單中 , 顧問熊蔡的狀態為「進行預約」

---
 PAMapp/components/Consultant/ConsultantCard.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index 8ea5a64..b154bf8 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -225,9 +225,9 @@
       return !!this.agentInfo['appointmentStatus'];
     }
 
-    get latestReservedAppointment(): Appointment {
+    get latestNotClosedAppointment(): Appointment {
         return this.agentInfo.appointments!
-                .filter((appointment) => appointment.communicateStatus === 'reserved')
+                .filter((appointment) => appointment.communicateStatus === 'reserved' || appointment.communicateStatus === 'contacted')
                 .map((reversedAppointment) => {
                     return {
                     ...reversedAppointment,
@@ -335,7 +335,7 @@
       const isAppointment = !!this.agentInfo['appointmentStatus'];
       const appointmentId = isAppointment
                           ? this.agentInfo['appointmentId']
-                          : this.latestReservedAppointment.id;
+                          : this.latestNotClosedAppointment.id;
 
         appointmentService.getAppointmentDetail(appointmentId!).then(res => {
             this.appointmentDetail = {
@@ -366,7 +366,7 @@
       const isAppointment = !!this.agentInfo['appointmentStatus'];
       const appointmentId = isAppointment
                           ? this.agentInfo['appointmentId']
-                          : this.latestReservedAppointment.id;
+                          : this.latestNotClosedAppointment.id;
 
         const reviewParams: UserReviewsConsultantsParams = {
             appointmentId: appointmentId,
@@ -381,7 +381,7 @@
     }
 
     cancel() {
-        appointmentService.cancelAppointment(this.latestReservedAppointment.id).then(res => {
+        appointmentService.cancelAppointment(this.latestNotClosedAppointment.id).then(res => {
             this.storeConsultantList();
             this.isVisibleDialog = false;
             this.isCancelPopup = false;

--
Gitblit v1.8.0