From 76c1ce3c2eb001560bfb785f7b2f62d4ec64dcb6 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期五, 10 十二月 2021 09:49:50 +0800
Subject: [PATCH] update 使用 currentRole 判斷目前是否為顧問/客戶登入狀態

---
 PAMapp/components/Consultant/ConsultantList.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index 90bd709..1a1b3fb 100644
--- a/PAMapp/components/Consultant/ConsultantList.vue
+++ b/PAMapp/components/Consultant/ConsultantList.vue
@@ -23,16 +23,19 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop } from 'nuxt-property-decorator';
+import { Vue, Component, Prop, namespace } from 'nuxt-property-decorator';
 import { Consultant } from '~/assets/ts/models/consultant.model';
-import { isLogin } from '~/assets/ts/auth';
+import { Role } from '~/assets/ts/models/enum/Role';
+
+const roleStorage = namespace('localStorage');
 
 @Component
 export default class ConsultantList extends Vue {
     @Prop() agents!: Consultant[];
+    @roleStorage.Getter currentRole!:string;
 
     get isLogin() {
-        return isLogin();
+        return this.currentRole === Role.USER;
     }
     get agentList(){
         return this.agents.map((agentDto)=>

--
Gitblit v1.8.0