From db5614ba62f5855e5d7f7ed980c8630afc779343 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期一, 06 十二月 2021 10:59:04 +0800
Subject: [PATCH] update: TODO#131490 [預約清單]: 1. 顧問登入後通知新加入預約單有幾筆, 2. 增加新預約單與未讀樣式

---
 PAMapp/store/index.ts |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts
index 9092dfb..1f7af2a 100644
--- a/PAMapp/store/index.ts
+++ b/PAMapp/store/index.ts
@@ -1,5 +1,5 @@
 import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'
-import { ClientInfo, getMyAppointmentList } from '~/assets/ts/api/appointment';
+import { allAppointmentsView, ClientInfo, getMyAppointmentList } from '~/assets/ts/api/appointment';
 // import * as consultant from '~/assets/ts/api/consultant';
 import { Consultants,recommend,AgentOfStrictQuery, getFavoriteConsultant, addFavoriteConsultant, deleteConsultant, strictQuery } from '~/assets/ts/api/consultant';
 import { isLogin } from '~/assets/ts/auth';
@@ -97,9 +97,10 @@
     }
 
     @Action
-    storeMyAppointmentList() {
-        getMyAppointmentList().then((data) => {
-            this.context.commit('updateMyAppointmentList', data)
+    async storeMyAppointmentList() {
+        return await getMyAppointmentList().then((data) => {
+            this.context.commit('updateMyAppointmentList', data);
+            return data.filter(item => !item.consultantViewTime || item.consultantViewTime === null).length
         });
     }
 

--
Gitblit v1.8.0