保誠-保戶業務員媒合平台
charlie
2022-01-21 b9658b7c42ca15e11153f782949c33a9b2d6a07a
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');
@@ -210,7 +211,7 @@
    updateMyAppointmentList!: (data: Appointment) => void;
    @appointmentStore.Action
    setAppointmentDetail!: (appointmentId: number) => Promise<Appointment>;
    getAppointmentDetail!: (appointmentId: number) => Promise<Appointment>;
    @appointmentStore.Getter
    appointmentProgress!: ContactStatus;
@@ -256,7 +257,8 @@
    //////////////////////////////////////////////////////////////////////
    viewAppointmentDetail(): void {
      this.setAppointmentDetail(this.client.id).then((_) => {
      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() {