From abc1e8353491b3abf7d638cc11b48b137816382d Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期六, 22 一月 2022 16:01:12 +0800 Subject: [PATCH] fixed: TODO#134588 約訪時間/約訪記錄顯示必填「*」 --- PAMapp/components/Client/ClientCard.vue | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index f203dd0..294eb5f 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -179,6 +179,7 @@ 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'); @@ -257,6 +258,7 @@ viewAppointmentDetail(): void { this.getAppointmentDetail(this.client.id).then((_) => { + this.readAppointment(); this.$router.push(`/appointment/${this.client.id}`); }); } @@ -266,11 +268,16 @@ } 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() { @@ -289,7 +296,13 @@ } 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}; @@ -297,8 +310,6 @@ this.updateMyAppointmentList(updatedClient); }); }; - this.isEdit = false; - this.clearAppointmentIdFromMsg(); } private clearAppointmentIdFromMsg() { -- Gitblit v1.8.0