From 0971aed43313512c50a28aa9af01c5401a0ad1ce Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期五, 14 一月 2022 16:19:38 +0800
Subject: [PATCH] update: client-card 動態顯示主要行動功能(傳送約訪通知/結案/發送滿意度)

---
 PAMapp/components/Client/ClientCard.vue |   51 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue
index 13d43a5..8d3d7fd 100644
--- a/PAMapp/components/Client/ClientCard.vue
+++ b/PAMapp/components/Client/ClientCard.vue
@@ -51,13 +51,26 @@
             </el-col> -->
 
             <div class="flex-column contactInfo" :xs="4" :sm="6">
-                <!-- <div
-                    class="smTxt_bold fix-chrome-click--issue"
-                    :class="{'unread-txt': reservedTxt === '�霈�', 'read-txt': reservedTxt !== '�霈�'}"
-                >{{ reservedTxt }}</div> -->
-                <div class="invite-msg smTxt_bold" @click.stop="showMsgDialog">
-                    ���赤�
+
+                <div
+                  class="invite-msg smTxt_bold"
+                  @click.stop="makeInterview"
+                  v-if="client.communicateStatus === contactStatus.RESERVED">
+                  ���赤�
                 </div>
+                <div
+                  class="invite-msg smTxt_bold"
+                  @click.stop="closeAppointment"
+                  v-else-if="client.communicateStatus === contactStatus.CONTACTED">
+                  蝯��
+                </div>
+                <div
+                  class="invite-msg smTxt_bold"
+                  @click.stop="inviteReview"
+                  v-else>
+                  ��遛��漲
+                </div>
+
                 <div
                     class="date xsTxt text--black"
                 >{{ date }}</div>
@@ -142,6 +155,7 @@
 import myConsultantService from '~/shared/services/my-consultant.service';
 import { ElRow } from 'element-ui/types/row';
 import { Appointment, AppointmentMemoInfo } from '~/shared/models/appointment.model';
+import { ContactStatus } from '~/shared/models/enum/contact-status';
 
 const localStorage = namespace('localStorage');
 @Component({
@@ -178,6 +192,9 @@
     dialogWidth = '';
     hideReviews = hideReviews;
 
+    contactStatus = ContactStatus;
+    // currentAppointmentStatus = this.contactStatus.RESERVED;
+
     isEdit = false;
     memoInfo: AppointmentMemoInfo = {
         appointmentId: 0,
@@ -211,9 +228,18 @@
       this.$router.push(`/appointment/${this.client.id}`);
     }
 
-    showMsgDialog(): void {
+    makeInterview(): void {
       this.isMsgDialog = true;
     }
+
+    closeAppointment(): void {
+      this.$router.push(`/appointment/${this.client.id}/close`);
+    }
+
+    makeAppointment(): void {
+      alert('MAKE AN APPOINTMENT!');
+    }
+
     get newAppointment(): boolean {
       return !this.client.consultantViewTime
             && this.client.communicateStatus === 'reserved';
@@ -444,14 +470,7 @@
         display: flex;
     }
     .invite-msg{
-        color: #ED1B2E;
-        border-bottom: 1px solid #ED1B2E;
-        width: 97px;
-    }
-    .line{
-        height: 4px;
-        width: 10px;
-        background-color: $PRUDENTIAL_GREY;
-
+      color: $PRIMARY_RED;
+        @extend .text--underline;
     }
 </style>

--
Gitblit v1.8.0