From e143ee9f40fe269f57c0269f548d459c196f3c89 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 17 十一月 2021 16:52:30 +0800
Subject: [PATCH] update 我的顧問清單/預約清單: 需求單連絡時段格式

---
 PAMapp/components/Consultant/ConsultantCard.vue |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index 8ff803e..0f2dac1 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -69,8 +69,9 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator';
-import { AppointmentDetail, Consultants, getAppointmentDetail } from '~/assets/ts/api/consultant';
+import { Vue, Component, Prop, Emit, Action } from 'nuxt-property-decorator';
+import { Consultants, getAppointmentDetail } from '~/assets/ts/api/consultant';
+import { AppointmentDetail } from '~/assets/ts/models/AppointmentDetail';
 import { isLogin } from '~/assets/ts/auth';
 import { isMobileDevice } from '~/assets/ts/device';
 
@@ -85,6 +86,8 @@
     }
 })
 export default class ConsultantCard extends Vue {
+    @Action removeFromMyConsultantList!: (agentNo: string) => Promise<boolean>;
+
     @Prop() agentInfo!: Consultants;
     isVisibleDialog = false;
     width: string = '';
@@ -136,7 +139,7 @@
     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;
@@ -157,8 +160,10 @@
         });
     }
 
-    @Emit('removeAgent') removeAgent() {
-        return this.agentInfo.agentNo;
+    removeAgent() {
+        this.removeFromMyConsultantList(this.agentInfo.agentNo).then((removeOk) => {
+            console.log('removeOk?', removeOk);
+        });
     }
 
     showAgentDetail(agentNo: string): void {
@@ -248,6 +253,8 @@
 
     .dialogInfo {
         font-size: 20px;
+        overflow:scroll;
+        height: 400px;
     }
 
 </style>
\ No newline at end of file

--
Gitblit v1.8.0