保誠-保戶業務員媒合平台
Tomas
2022-01-13 46da7429ca192bf6a947d79437e8076b94676a05
PAMapp/store/index.ts
@@ -9,8 +9,7 @@
import reviewsService from '~/shared/services/reviews.service';
import { Consultant } from '~/shared/models/consultant.model';
import { AppointmentLog } from '~/shared/models/appointment.model';
import { ClientInfo } from '~/shared/models/client.model';
import { Appointment, AppointmentLog } from '~/shared/models/appointment.model';
import { AgentOfStrictQuery } from '~/shared/models/strict-query.model';
@Module
export default class Store extends VuexModule {
@@ -18,7 +17,7 @@
    strictQueryList: AgentOfStrictQuery[] = [];
    myConsultantList: Consultant[] = [];
    myAppointmentList: ClientInfo[] = [];
    myAppointmentList: Appointment[] = [];
    myNewAppointmentSum: number = 0;
    myAppointmentReviewLogList: AppointmentLog[] = [];
@@ -43,7 +42,7 @@
    }
    @Mutation
    updateMyAppointmentList(data: ClientInfo[]) {
    updateMyAppointmentList(data: Appointment[]) {
        this.myAppointmentList = data;
    }
@@ -149,7 +148,7 @@
    }
    @Action
    updateMyAppointment(myAppointment: ClientInfo) {
    updateMyAppointment(myAppointment: Appointment) {
        const data = this.myAppointmentList.filter(item => item.id !== myAppointment.id);
        data.unshift(myAppointment);
        this.context.commit('updateMyAppointmentList', data)