| | |
| | | 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 { |
| | |
| | | strictQueryList: AgentOfStrictQuery[] = []; |
| | | myConsultantList: Consultant[] = []; |
| | | |
| | | myAppointmentList: ClientInfo[] = []; |
| | | myAppointmentList: Appointment[] = []; |
| | | myNewAppointmentSum: number = 0; |
| | | |
| | | myAppointmentReviewLogList: AppointmentLog[] = []; |
| | |
| | | } |
| | | |
| | | @Mutation |
| | | updateMyAppointmentList(data: ClientInfo[]) { |
| | | updateMyAppointmentList(data: Appointment[]) { |
| | | this.myAppointmentList = data; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @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) |