From a7b45caf5b3784f65ba82793d87f5ffb202fca1e Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期五, 21 一月 2022 11:42:07 +0800
Subject: [PATCH] update#134555: [顧問] 預約單結案/編輯結案功能串接

---
 PAMapp/components/Client/ClientCard.vue |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue
index f203dd0..cfe5154 100644
--- a/PAMapp/components/Client/ClientCard.vue
+++ b/PAMapp/components/Client/ClientCard.vue
@@ -257,6 +257,7 @@
 
     viewAppointmentDetail(): void {
       this.getAppointmentDetail(this.client.id).then((_) => {
+        this.readAppointment();
         this.$router.push(`/appointment/${this.client.id}`);
       });
     }
@@ -289,7 +290,13 @@
     }
 
     closeInformDialog(): void {
-      const unread = !this.client.consultantReadTime;
+        this.readAppointment();
+        this.isEdit = false;
+        this.clearAppointmentIdFromMsg();
+    }
+
+    private readAppointment(): void {
+        const unread = !this.client.consultantReadTime;
         if (unread) {
             appointmentService.recordRead(this.client.id).then((_) => {
                 const updatedClient = {...this.client};
@@ -297,8 +304,6 @@
                 this.updateMyAppointmentList(updatedClient);
             });
         };
-        this.isEdit = false;
-        this.clearAppointmentIdFromMsg();
     }
 
     private clearAppointmentIdFromMsg() {

--
Gitblit v1.8.0