| | |
| | | |
| | | viewAppointmentDetail(): void { |
| | | this.getAppointmentDetail(this.client.id).then((_) => { |
| | | this.readAppointment(); |
| | | this.$router.push(`/appointment/${this.client.id}`); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | closeInformDialog(): void { |
| | | const unread = !this.client.consultantReadTime; |
| | | this.readAppointment(); |
| | | this.isEdit = false; |
| | | this.clearAppointmentIdFromMsg(); |
| | | } |
| | | |
| | | private readAppointment(): void { |
| | | const unread = !this.client.consultantReadTime; |
| | | if (unread) { |
| | | appointmentService.recordRead(this.client.id).then((_) => { |
| | | const updatedClient = {...this.client}; |
| | |
| | | this.updateMyAppointmentList(updatedClient); |
| | | }); |
| | | }; |
| | | this.isEdit = false; |
| | | this.clearAppointmentIdFromMsg(); |
| | | } |
| | | |
| | | private clearAppointmentIdFromMsg() { |