From 83757a31e7b1593d2cce267061722c259c0d5800 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 24 三月 2022 23:20:40 +0800 Subject: [PATCH] update: [客戶端] 我的顧問清單 refactoring (已聯絡清單使用新 api) --- PAMapp/store/index.ts | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts index 9dd6256..f4120ca 100644 --- a/PAMapp/store/index.ts +++ b/PAMapp/store/index.ts @@ -3,7 +3,7 @@ import myConsultantService from '~/shared/services/my-consultant.service'; import queryConsultantService, { AddFavoriteConsultantItem } from '~/shared/services/query-consultant.service'; import reviewsService from '~/shared/services/reviews.service'; -import { Consultant } from '~/shared/models/consultant.model'; +import { Consultant, ConsultantWithAppointmentId } from '~/shared/models/consultant.model'; import { getFavoriteFromStorage, setFavoriteToStorage } from '~/shared/storageConsultant'; import { AppointmentLog } from '~/shared/models/appointment.model'; import { AgentOfStrictQuery, StrictQueryParams } from '~/shared/models/strict-query.model'; @@ -14,6 +14,7 @@ recommendList: Consultant[] = []; strictQueryList: AgentOfStrictQuery[] = []; myConsultantList: Consultant[] = []; + myAppointmentGroupByConsultantList: ConsultantWithAppointmentId[] = []; reviewLogList: AppointmentLog[] = []; unReviewLogList: AppointmentLog[] = []; @@ -60,6 +61,11 @@ this.notificationList = data; } + @Mutation + updateAppointmentGroupByConsultantList(data: ConsultantWithAppointmentId[]) { + this.myAppointmentGroupByConsultantList = data; + } + @Action storeRecommendList() { queryConsultantService.getRecommendConsultantList().then(data => { @@ -87,6 +93,10 @@ myConsultantService.getFavoriteConsultantList().then(data => { this.context.commit('updateConsultantList', data); }) + + myConsultantService.getAllGroupByConsultant().then((data) => { + this.context.commit('updateAppointmentGroupByConsultantList', data); + }) } @Action -- Gitblit v1.8.0