From 4e2d4a859ec0516de067622412cfa1933163a2bb Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期一, 17 一月 2022 11:21:54 +0800
Subject: [PATCH] update: 顧問登入-未聯絡清單,發送約訪通知 api 串接

---
 PAMapp/components/Client/ClientCard.vue |   77 +++++++++++++++++++++++++-------------
 1 files changed, 50 insertions(+), 27 deletions(-)

diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue
index 6d7e821..1b145bc 100644
--- a/PAMapp/components/Client/ClientCard.vue
+++ b/PAMapp/components/Client/ClientCard.vue
@@ -30,7 +30,7 @@
                     </template>
                 </div>
                 <AppointmentProgress
-                  :currentStep="'contacted'"
+                  :currentStep="client.communicateStatus"
                 ></AppointmentProgress>
             </div>
         </div>
@@ -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">
-                    ���赤�
+
+                <div
+                  class="invite-msg smTxt_bold"
+                  @click.stop="showAddInterviewDialog"
+                  v-if="client.communicateStatus === contactStatus.RESERVED">
+                  ���赤�
                 </div>
+                <div
+                  class="invite-msg smTxt_bold"
+                  @click.stop="navigateToCloseAppointment"
+                  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>
@@ -128,6 +141,12 @@
                 <el-button @click="markAppointment">璅酉�撌脤��蝯�</el-button>
             </div>
         </Ui-Dialog>
+
+        <InterviewMsg
+          :isVisible.sync="isShowAddInterviewDialog"
+          :client="client"
+          >
+        </InterviewMsg>
     </div>
 </template>
 
@@ -135,11 +154,12 @@
 import { Vue, Component, Prop, Action, namespace, Watch } from 'nuxt-property-decorator';
 
 import appointmentService from '~/shared/services/appointment.service';
+import myConsultantService from '~/shared/services/my-consultant.service';
 import UtilsService from '~/shared/services/utils.service';
 import { hideReviews } from '~/shared/const/hide-reviews';
-import { AppointmentMemoInfo, ClientInfo } from '~/shared/models/client.model';
-import myConsultantService from '~/shared/services/my-consultant.service';
 import { ElRow } from 'element-ui/types/row';
+import { Appointment, AppointmentMemoInfo, ToInformAppointment } from '~/shared/models/appointment.model';
+import { ContactStatus } from '~/shared/models/enum/contact-status';
 
 const localStorage = namespace('localStorage');
 @Component({
@@ -163,25 +183,27 @@
 })
 export default class ClientList extends Vue {
     @Action
-    updateMyAppointment!: (data: ClientInfo) => void;
+    updateMyAppointment!: (data: Appointment) => void;
 
     @Prop()
-    client!: ClientInfo;
+    client!: Appointment;
 
     @localStorage.Mutation
     storageClearAppointmentIdFromMsg!: () => void;
 
-    isVisibleDialog = false;
-    dialogWidth = '';
-    hideReviews = hideReviews;
+    contactStatus            = ContactStatus;
+    dialogWidth              = '';
+    hideReviews              = hideReviews;
+    isEdit                   = false;
+    isShowAddInterviewDialog = false;
+    isVisibleDialog          = false;
+    memo                     = '';
 
-    isEdit = false;
     memoInfo: AppointmentMemoInfo = {
         appointmentId: 0,
-        content: '',
-        id: 0
+        content      : '',
+        id           : 0
     }
-    memo = '';
 
     //////////////////////////////////////////////////////////////////////
 
@@ -206,6 +228,14 @@
 
     viewDetail(): void {
       this.$router.push(`/appointment/${this.client.id}`);
+    }
+
+    showAddInterviewDialog(): void {
+      this.isShowAddInterviewDialog = true;
+    }
+
+    navigateToCloseAppointment(): void {
+      this.$router.push(`/appointment/${this.client.id}/close`);
     }
 
     get newAppointment(): boolean {
@@ -438,14 +468,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