保誠-保戶業務員媒合平台
Tomas
2021-12-27 176b380f392efab0a84dd79560dca22e8053d0e4
PAMapp/components/Client/ClientCard.vue
@@ -97,9 +97,10 @@
import { Vue, Component, Prop, Action } from 'nuxt-property-decorator';
import appointmentService from '~/shared/services/appointment.service';
import { isMobileDevice } from '~/shared/device';
import UtilsService from '~/shared/services/utils.service';
import { hideReviews } from '~/shared/const/hide-reviews';
import { ClientInfo } from '~/shared/models/client.model';
import myConsultantService from '~/shared/services/my-consultant.service';
@Component({
@@ -174,31 +175,31 @@
        }
    }
    get latestUpdateTime() {
    get displayTime(): string {
        if (this.isReserved) {
            return this.client.consultantReadTime ? this.client.consultantReadTime : this.client.appointmentDate;
            return this.client.appointmentDate;
        } else {
            return this.client.contactTime;
            return this.client.lastModifiedDate;
        }
    }
    get time() {
        const formatDate = (this.$options.filters as any).formatDate(this.latestUpdateTime);
        const formatDate = (this.$options.filters as any).formatDate(this.displayTime);
        return formatDate.split(' ')[1]
    }
    get date() {
        const formatDate = (this.$options.filters as any).formatDate(this.latestUpdateTime);
        const formatDate = (this.$options.filters as any).formatDate(this.displayTime);
        return formatDate.split(' ')[0];
    }
    openDetail() {
        this.dialogWidth = isMobileDevice() ? '80%' : '';
        this.dialogWidth = UtilsService.isMobileDevice() ? '80%' : '';
        this.isVisibleDialog = true;
    }
    markAppointment() {
        appointmentService.markAsContact(this.client.id).then(data => {
        myConsultantService.markAsContact(this.client.id).then(data => {
            // TODO: 要接後台傳回的 updated client 資料 - Ben 2021/11/16
            const updatedClient = {...this.client};
            updatedClient.communicateStatus = 'contacted';