From e912d42c4a9d806c2a498fef458ef8cb4e9ba405 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 23 二月 2022 15:54:12 +0800
Subject: [PATCH] update#135494: [ 客戶端 ] 加入顧問到我的顧問清單後,未顯示加入日期

---
 PAMapp/components/AddAndReservedBtns.vue |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/PAMapp/components/AddAndReservedBtns.vue b/PAMapp/components/AddAndReservedBtns.vue
index f2f3177..b42bee8 100644
--- a/PAMapp/components/AddAndReservedBtns.vue
+++ b/PAMapp/components/AddAndReservedBtns.vue
@@ -14,6 +14,8 @@
 import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator';
 import { Consultant } from '~/shared/models/consultant.model';
 
+const roleStorage = namespace('localStorage');
+
 @Component
 export default class AddAndReservedBtns extends Vue {
 
@@ -29,6 +31,9 @@
     @Prop()
     cusClass!: string;
 
+    @roleStorage.Getter
+    isUserLogin!: boolean;
+
     isVisiblePopUp = false;
 
     //////////////////////////////////////////////////////////////////////
@@ -41,6 +46,12 @@
     //////////////////////////////////////////////////////////////////////
 
     addConsultant(item: Consultant): void {
+        if (!this.isUserLogin) {
+          item = {
+            ...item,
+            updateTime: new Date().toString()
+          };
+        }
         this.addToMyConsultantList(item).then(addOk => {
             addOk && this.openPopUp();
         });

--
Gitblit v1.8.0