From 82e2a62e7c90cc191f9e2ebc569fe3a3663b68b0 Mon Sep 17 00:00:00 2001
From: wayne <wayne8692wayne8692@gmail.com>
Date: 星期五, 03 十二月 2021 11:19:00 +0800
Subject: [PATCH] Merge branch '預約單更新與刪除'

---
 PAMapp/components/Consultant/ConsultantCard.vue |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index c5ac775..de521db 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -46,6 +46,7 @@
         <Ui-Dialog
             :isVisible.sync="isVisibleDialog"
             :width="width"
+            class="pam-myDemand-dialog"
         >
             <div v-if="appointmentDetail">
                 <h5 class="subTitle text--center mb-30">������</h5>
@@ -55,13 +56,13 @@
                     <p>�閰梧�{appointmentDetail.phone}}</p>
                     <p>Email嚗{appointmentDetail.email}}</p>
                     <p>�批嚗{gender}}</p>
-                    <p>撟湧翩嚗{appointmentDetail.age}}</p>
+                    <p>撟湧翩嚗{appointmentDetail.age | toAgeLabel }}</p>
                     <p>�璆哨�{appointmentDetail.job}}</p>
-                    <p>��瘙�{appointmentDetail.requirement.replace(',', '��')}}</p>
+                    <p>��瘙�{appointmentDetail.requirement.split(',').join('��')}}</p>
                     <p
                         v-for="(item, index) in hopeContactTime"
                         :key="index"
-                    >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{item}}</p>
+                    >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{ item | formatHopeContactTime }}</p>
                 </div>
             </div>
         </Ui-Dialog>
@@ -82,6 +83,15 @@
                 const upperNumber = ['�', '銝�', '鈭�', '銝�', '���', '鈭�', '�', '銝�', '�', '銋�', '���']
                 return upperNumber[index];
             }
+        },
+        formatHopeContactTime(item: string): string {
+          if (item) {
+            const [hopeDay, hopeTime] = item.split('��');
+            const day = hopeDay.split(',').length > 6 ? '銝����' : hopeDay;
+            const time = hopeTime.split(',').length > 3 ? '銝����' : hopeTime;
+            return `${day}��${time}`;
+          }
+          return '';
         }
     }
 })
@@ -139,14 +149,12 @@
     get hopeContactTime() {
         const contactList = this.appointmentDetail.hopeContactTime
             .split("'").map(item => item.slice(0, item.length));
-        return contactList.filter(item => !!item)
+        return contactList.filter(item => !!item && item !== ",")
     }
     reserveCommunication() {
         const contactStatus = this.agentInfo.contactStatus;
         if (!contactStatus || contactStatus === 'picked') {
-            isLogin()
-                ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`)
-                : this.$router.push('/login');
+            this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`)
         } else {
             this.openPopUp();
         }
@@ -253,6 +261,11 @@
 
     .dialogInfo {
         font-size: 20px;
+        overflow-y:scroll;
+        max-height: 50vh;
+        @include desktop {
+            height: 400px;
+        }
     }
 
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0