From 38b68f92b9a47ca3947985d6b581603fe05106c7 Mon Sep 17 00:00:00 2001
From: charlie <charlie@lvguanqingdeMacBook-Pro.local>
Date: 星期六, 22 一月 2022 11:56:00 +0800
Subject: [PATCH] update: 1. 新增約訪預約資訊頭像圖片和型別icon,微調對齊方式         2. 約訪結案列表的樣式修正並調整進度條色彩

---
 PAMapp/components/AddAndReservedBtns.vue |   47 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/PAMapp/components/AddAndReservedBtns.vue b/PAMapp/components/AddAndReservedBtns.vue
index fe0f2e7..f2f3177 100644
--- a/PAMapp/components/AddAndReservedBtns.vue
+++ b/PAMapp/components/AddAndReservedBtns.vue
@@ -1,40 +1,53 @@
 <template>
     <el-row type="flex" justify="center" :class="cusClass">
         <el-button @click="addConsultant(agentInfo)" :disabled="isAdded">
-            <span> + 憿批��</span>
+            <span> {{ isAdded ? '撌脣�憿批��' : '+ 憿批��' }}</span>
         </el-button>
         <el-button
-            @click="reserveCommunication"
+            @click="navigateToReservationForm"
             type="primary"
         >�脰����</el-button>
     </el-row>
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Emit, Action, State } from 'nuxt-property-decorator';
-import { Consultants } from '~/assets/ts/api/consultant';
-import { isLogin } from '~/assets/ts/auth';
+import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator';
+import { Consultant } from '~/shared/models/consultant.model';
 
 @Component
 export default class AddAndReservedBtns extends Vue {
-    @Action addToMyConsultantList!: (consultantToAdd: Consultants) => Promise<boolean>
-    @State('myConsultantList') myConsultantList!: Consultants[];
 
-    @Prop() agentInfo!: Consultants;
-    @Prop() cusClass!: string;
+    @Action
+    addToMyConsultantList!: (consultantToAdd: Consultant) => Promise<boolean>
+
+    @State('myConsultantList')
+    myConsultantList!: Consultant[];
+
+    @Prop()
+    agentInfo!: Consultant;
+
+    @Prop()
+    cusClass!: string;
+
     isVisiblePopUp = false;
-    addConsultant(item: Consultants) {
+
+    //////////////////////////////////////////////////////////////////////
+
+    @Emit('openPopUp')
+    openPopUp(popUpTxt: string = '����憿批��'): string {
+        return popUpTxt;
+    }
+
+    //////////////////////////////////////////////////////////////////////
+
+    addConsultant(item: Consultant): void {
         this.addToMyConsultantList(item).then(addOk => {
             addOk && this.openPopUp();
         });
     }
 
-    reserveCommunication() {
-        isLogin() ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`) : this.$router.push('/login');
-    }
-
-    @Emit('openPopUp') openPopUp(popUpTxt: string = '����憿批��') {
-        return popUpTxt
+    navigateToReservationForm(): void {
+        this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`);
     }
 
     get isAdded() {
@@ -42,4 +55,4 @@
                 ? true : false
     }
 }
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.8.0