| | |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator'; |
| | | import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment } from '~/shared/api/consultant'; |
| | | import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests'; |
| | | 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 { Consultant } from '~/shared/models/consultant.model'; |
| | | import { ContactType } from '~/shared/models/enum/ContactType'; |
| | | import { Gender } from '~/shared/models/enum/Gender'; |
| | | import { RegisterInfo } from '~/shared/models/registerInfo'; |
| | | import { AppointmentParams, AppointmentRequests } from '~/shared/models/appointment.model'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | @Component |
| | |
| | | if (this.isEditBtn) { |
| | | this.sentEditAppointmentDemand(); |
| | | } else { |
| | | addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand()); |
| | | queryConsultantService.addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand()); |
| | | } |
| | | |
| | | } |
| | |
| | | agentNo: this.$route.params.agentNo |
| | | }; |
| | | |
| | | appointmentDemand(data).then(res => { |
| | | queryConsultantService.appointmentDemand(data).then(res => { |
| | | this.sendReserve = true; |
| | | this.myRequest.hopeContactTime = []; |
| | | setRequestsToStorage(this.myRequest); |
| | |
| | | id: this.appointmentId, |
| | | otherRequirement: null |
| | | } |
| | | editAppointment(info).then(res => { |
| | | appointmentService.editAppointment(info).then(res => { |
| | | this.sendReserve = true; |
| | | this.myRequest.hopeContactTime = []; |
| | | setRequestsToStorage(this.myRequest); |