From 7eb57571830d0677857cea565b09c4f38d286b8d Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期三, 29 十二月 2021 10:31:36 +0800 Subject: [PATCH] [update] 調整預約單通知的簡訊與email文案,並重購SendMsgService --- PAMapp/components/Client/ClientCard.vue | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index 4fca204..aff2a7e 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -96,10 +96,11 @@ <script lang="ts"> import { Vue, Component, Prop, Action } from 'nuxt-property-decorator'; -import appointmentService from '~/assets/ts/services/appointment.service'; -import { isMobileDevice } from '~/assets/ts/device'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import appointmentService from '~/shared/services/appointment.service'; +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'; -- Gitblit v1.8.0