From 3f2ccf2d8bc8ff6ca9fbc72e831b7b2eb4bc5f06 Mon Sep 17 00:00:00 2001
From: wayne <wayne8692wayne8692@gmail.com>
Date: 星期四, 10 二月 2022 16:58:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/Phase3' into Phase3

---
 PAMapp/plugins/filters/serve-area.filter.ts       |   16 ++++++++++++++++
 PAMapp/pages/agentInfo/_agentNo.vue               |    2 +-
 PAMapp/nuxt.config.js                             |    1 +
 PAMapp/pages/appointment/_appointmentId/index.vue |    4 ++--
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/PAMapp/nuxt.config.js b/PAMapp/nuxt.config.js
index d4252d5..73033a1 100644
--- a/PAMapp/nuxt.config.js
+++ b/PAMapp/nuxt.config.js
@@ -40,6 +40,7 @@
     '~/plugins/filters/date.filter.ts',
     '~/plugins/filters/age.filter.ts',
     '~/plugins/filters/appointment-fail-reason.filter.ts',
+    '~/plugins/filters/serve-area.filter.ts',
   ],
 
   // Auto import components: https://go.nuxtjs.dev/config-components
diff --git a/PAMapp/pages/agentInfo/_agentNo.vue b/PAMapp/pages/agentInfo/_agentNo.vue
index 5b948c9..9313a1a 100644
--- a/PAMapp/pages/agentInfo/_agentNo.vue
+++ b/PAMapp/pages/agentInfo/_agentNo.vue
@@ -47,7 +47,7 @@
         type="flex"
         class="pam-paragraph">
         <UiField icon="company" label="�����">
-          {{ agentInfo.serveArea }}
+          {{ agentInfo.serveArea | toServeArea }}
         </UiField>
       </el-row>
 
diff --git a/PAMapp/pages/appointment/_appointmentId/index.vue b/PAMapp/pages/appointment/_appointmentId/index.vue
index 3a76624..7ede7ae 100644
--- a/PAMapp/pages/appointment/_appointmentId/index.vue
+++ b/PAMapp/pages/appointment/_appointmentId/index.vue
@@ -55,7 +55,7 @@
         </div>
       </div>
 
-      <div class="client-detail-action" v-if="showWhenAppointmentHasClosed">
+      <div class=" btn-center" v-if="showWhenAppointmentHasClosed">
         <el-button @click="inviteReview">��遛��漲</el-button>
       </div>
 
@@ -64,7 +64,7 @@
         <el-button @click="sendMsg" style="margin-left: 0px">�蝝赤</el-button>
       </div>
 
-     <div class="client-detail-action btn-center" v-if="showWhenAppointmentHasCreate">
+     <div class=" btn-center" v-if="showWhenAppointmentHasCreate">
         <el-button @click="sendMsg">���赤�</el-button>
       </div>
     </section>
diff --git a/PAMapp/plugins/filters/serve-area.filter.ts b/PAMapp/plugins/filters/serve-area.filter.ts
new file mode 100644
index 0000000..fea5751
--- /dev/null
+++ b/PAMapp/plugins/filters/serve-area.filter.ts
@@ -0,0 +1,16 @@
+import { taiwanCities } from '~/shared/const/taiwan-cities';
+
+import Vue from 'vue'
+
+Vue.filter('toServeArea', (value: string): string => {
+
+  if (!value || typeof value !== 'string') {
+    return '--';
+  }
+
+  const serveAreaLength = value.split('��').length;
+
+  return serveAreaLength === taiwanCities.length
+        ? '��'
+        : value;
+})

--
Gitblit v1.8.0