From 1592d266eb7cea3a096c17d4ae3c0d01c679da7b Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期五, 21 一月 2022 16:15:01 +0800
Subject: [PATCH] update: TODO#134585 串接 顧問主動發送滿意度 API

---
 PAMapp/components/Interview/InterviewMsg.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewMsg.vue b/PAMapp/components/Interview/InterviewMsg.vue
index eaffa87..2a81ac3 100644
--- a/PAMapp/components/Interview/InterviewMsg.vue
+++ b/PAMapp/components/Interview/InterviewMsg.vue
@@ -17,16 +17,18 @@
         :autosize="true"
         placeholder="蝝赤�"
         resize="none"
-        v-model="isInterviewTxt">
+        v-model="interviewTxt">
         </el-input>
 
-      <div class="mdTxt mt-30 mb-10">����赤��挾</div>
-      <DateTimePicker
-        @changeDateTime="interviewTime = $event"
-      ></DateTimePicker>
+      <div v-if="client.phone">
+        <div class="mdTxt mt-30 mb-10">����赤��挾</div>
+        <DateTimePicker
+          @changeDateTime="interviewTime = $event"
+        ></DateTimePicker>
+      </div>
 
       <div class="msg-dialog-btn">
-        <el-button @click="addInterview"  :disabled="!interviewTime">���</el-button>
+        <el-button @click="addInterview"  :disabled="isBtnDisabled">���</el-button>
       </div>
 
         </el-dialog>
@@ -82,6 +84,10 @@
     interviewTime = '';
     //////////////////////////////////////////////////////////////////////
 
+    mounted() {
+      this.interviewTxt = "�憟踝��靽���像����憿批��" + this.loginConsultant.name + "嚗�����������銝膩������蝜�"+"\n"+"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + this.loginConsultant.phoneNumber + "\n" + this.loginConsultant.email + "\n"+"�甇斗���靘選����蝜恬�����"
+    }
+
     addInterview() {
       const appointmentInformation: ToInformAppointment = {
         appointmentId: this.client.id,
@@ -102,8 +108,9 @@
       this.storeMyAppointmentList();
     }
 
-    get isInterviewTxt() : string{
-      return this.interviewTxt = "�憟踝��靽���像����憿批��" + this.loginConsultant?.name + "嚗�����������銝膩������蝜�"+"\n"+"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + this.loginConsultant?.phoneNumber + "\n" + this.loginConsultant?.email + "\n"+"�甇斗���靘選����蝜恬�����"
+    get isBtnDisabled() :Boolean {
+      const isFormValid = this.client.phone ? this.interviewTxt && this.interviewTime :this.interviewTxt
+      return !isFormValid
     }
 
 }

--
Gitblit v1.8.0