| | |
| | | import { ElRow } from 'element-ui/types/row'; |
| | | import { Appointment, AppointmentMemoInfo } from '~/shared/models/appointment.model'; |
| | | import { ContactStatus } from '~/shared/models/enum/contact-status'; |
| | | import reviewsService from '~/shared/services/reviews.service'; |
| | | |
| | | const appointmentStore = namespace('appointment.store'); |
| | | const localStorage = namespace('localStorage'); |
| | |
| | | |
| | | @appointmentStore.Action |
| | | getAppointmentDetail!: (appointmentId: number) => Promise<Appointment>; |
| | | |
| | | @appointmentStore.Action |
| | | updateAppointmentDetail!: (id: number) => Appointment; |
| | | |
| | | @appointmentStore.Getter |
| | | appointmentProgress!: ContactStatus; |
| | |
| | | |
| | | viewAppointmentDetail(): void { |
| | | this.getAppointmentDetail(this.client.id).then((_) => { |
| | | this.readAppointment(); |
| | | const unread = !this.client.consultantReadTime; |
| | | if (unread) { |
| | | this.readAppointment(); |
| | | } |
| | | this.$router.push(`/appointment/${this.client.id}`); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | navigateToCloseAppointment(): void { |
| | | this.$router.push(`/appointment/${this.client.id}/close`); |
| | | this.getAppointmentDetail(this.client.id).then((_) => { |
| | | this.$router.push(`/appointment/${this.client.id}/close`); |
| | | }); |
| | | } |
| | | |
| | | inviteReview(): void { |
| | | this.isShowInviteReviewDialog = true ; |
| | | reviewsService.sendSatisfactionToClient(this.client.id).then(res => { |
| | | this.isShowInviteReviewDialog = true ; |
| | | }) |
| | | } |
| | | |
| | | openDetail() { |
| | |
| | | } |
| | | |
| | | private readAppointment(): void { |
| | | const unread = !this.client.consultantReadTime; |
| | | if (unread) { |
| | | appointmentService.recordRead(this.client.id).then((_) => { |
| | | const updatedClient = {...this.client}; |
| | | updatedClient.consultantReadTime = new Date().toString(); |
| | | this.updateMyAppointmentList(updatedClient); |
| | | }); |
| | | }; |
| | | appointmentService.recordRead(this.client.id).then((_) => { |
| | | const updatedClient = {...this.client}; |
| | | updatedClient.consultantReadTime = new Date().toString(); |
| | | this.updateMyAppointmentList(updatedClient); |
| | | this.updateAppointmentDetail(this.client.id); |
| | | }); |
| | | } |
| | | |
| | | private clearAppointmentIdFromMsg() { |
| | |
| | | .professionals { |
| | | overflow : hidden; |
| | | text-overflow: ellipsis; |
| | | white-space : nowrap; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 1; |
| | | .professionalsTxt { |
| | | font-size : 12px; |
| | | margin-right: 5px; |
| | | |
| | | |
| | | } |
| | | .noProfessionalsTxt { |
| | | color : $PRUDENTIAL_GREY; |
| | |
| | | display: flex; |
| | | } |
| | | .invite-msg{ |
| | | width: 96px; |
| | | color: $PRIMARY_RED; |
| | | @extend .text--underline; |
| | | } |