From d96ae656010587cdae8cbbc9d341b3a284eaae94 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期二, 28 十二月 2021 14:15:03 +0800
Subject: [PATCH] fixed#133252: [客戶端] 已聯絡顧問列表,在外部即可點擊並使用"給予滿意度評分"功能

---
 PAMapp/components/Consultant/ConsultantCard.vue |   34 +++++++++++-----------------------
 PAMapp/assets/scss/utilities/_heading.scss      |   10 +++++++++-
 2 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/PAMapp/assets/scss/utilities/_heading.scss b/PAMapp/assets/scss/utilities/_heading.scss
index 6287ea0..e73182d 100644
--- a/PAMapp/assets/scss/utilities/_heading.scss
+++ b/PAMapp/assets/scss/utilities/_heading.scss
@@ -96,4 +96,12 @@
   font-size: 18px;
   color: $ORANGE;
   cursor: pointer;
-}
\ No newline at end of file
+}
+
+.text--center {
+  text-align: center;
+}
+
+.text--underline {
+  text-decoration: underline;
+}
diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index fa95d2d..1a9d104 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -44,8 +44,12 @@
                             @click="reserveCommunication"
                             :class="actionBtnStyle"
                         >{{ actionBtnLabel }}</el-button>
+                        <div
+                          v-if="notScoreAppointmentYet"
+                          class="text--primary mt-10 text--center text--underline cursor--pointer"
+                          @click="reviewsBtn = true">蝯虫�遛��漲閰��</div>
                         <div class="updateTime mt-10">
-                            {{ displayTime | formatDate }}
+                            {{ agentInfo.updateTime | formatDate }}
                         </div>
                     </el-col>
                 </el-row>
@@ -229,27 +233,6 @@
       }
     }
 
-    get displayTime(): string {
-      const isAppointment = !!this.agentInfo['appointmentStatus'];
-      let time: Date | string = '';
-      if (isAppointment) {
-        time = this.agentInfo['appointmentDate'];
-      } else {
-        switch(this.agentInfo.contactStatus) {
-            case 'reserved':
-                time = this.agentInfo.updateTime;
-                break;
-            case 'picked':
-                time = this.agentInfo.updateTime;
-                break;
-        }
-      }
-        if (typeof time !== 'string') {
-          time.toString();
-        }
-        return time as string;
-    }
-
     get avatarFileName() {
         return this.agentInfo.img;
     }
@@ -349,8 +332,13 @@
     }
 
     userReviewsConsultants() {
+      const isAppointment = !!this.agentInfo['appointmentStatus'];
+      const appointmentId = isAppointment
+                          ? this.agentInfo['appointmentId']
+                          : this.latestReservedAppointment.id;
+
         const reviewParams: UserReviewsConsultantsParams = {
-            appointmentId: this.appointmentDetail.id,
+            appointmentId: appointmentId,
             score: this.inputScore,
         }
         this.appointmentDetail.satisfactionScore = this.inputScore;

--
Gitblit v1.8.0