| | |
| | | import { getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests'; |
| | | import _ from 'lodash'; |
| | | |
| | | import queryConsultantService from '~/shared/services/query-consultant.service'; |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import authService from '~/shared/services/auth.service'; |
| | | import queryConsultantService from '~/shared/services/query-consultant.service'; |
| | | import { Consultant } from '~/shared/models/consultant.model'; |
| | | import { ContactType } from '~/shared/models/enum/ContactType'; |
| | | import { Gender } from '~/shared/models/enum/Gender'; |
| | |
| | | |
| | | beforeRouteEnter(to: any, from: any, next: any) { |
| | | next(vm => { |
| | | const isUserLogin = vm.$store.getters['localStorage/isUserLogin']; |
| | | const isUserLogin = authService.isUserLogin(); |
| | | if (from.name === 'login' && !isUserLogin) { |
| | | vm.$router.go(-1); |
| | | return; |
| | |
| | | } |
| | | |
| | | async fetch() { |
| | | if (this.isUserLogin) { |
| | | if (authService.isUserLogin()) { |
| | | await this.storeConsultantList(); |
| | | }; |
| | | } |
| | |
| | | : appointmentInfo.appointmentDate; |
| | | } |
| | | @Watch('myConsultantList') onMyConsultantListChange() { |
| | | if (this.isUserLogin && this.myConsultantList.length > 0) { |
| | | if (authService.isUserLogin() && this.myConsultantList.length > 0) { |
| | | const editAppointment = this.getLatestReserved(this.$route.params.agentNo); |
| | | |
| | | if (editAppointment && editAppointment.agentNo) { |