From 98a92f7083e4ca742340b8f01abe46ea8278c490 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 十二月 2021 15:22:10 +0800 Subject: [PATCH] fixed TODO#132182 [我的顧問清單] 新增顧問後,最新一筆的顧問應顯示加入的時間,目前未顯示 --- PAMapp/components/Consultant/ConsultantCard.vue | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index 20de228..78c7153 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -45,7 +45,9 @@ @click="reserveCommunication" :class="agentInfo.contactStatus + 'Btn'" >{{ contactTxt }}</el-button> - <div class="updateTime" v-if="updateTime">{{updateTime | formatDate}}</div> + <div class="updateTime"> + {{ displayTime | formatDate }} + </div> </el-col> </el-row> </el-col> @@ -72,13 +74,13 @@ :key="index" >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{ item | formatHopeContactTime }}</p> <div v-if="appointmentDetail.satisfactionScore"> - <div class="mdTxt mt-10 mb-10">皛踵�漲</div> - <el-rate - :value="appointmentDetail.satisfactionScore" - class="pam-myDemand-dialog__rate" - disabled> - </el-rate> - </div> + <div class="mdTxt mt-10 mb-10">皛踵�漲</div> + <el-rate + :value="appointmentDetail.satisfactionScore" + class="pam-myDemand-dialog__rate" + disabled> + </el-rate> + </div> </div> <div v-if="agentInfo.contactStatus === 'contacted' @@ -176,6 +178,21 @@ }) .sort((preAppointment, nextAppointment) => +nextAppointment.sortDate - +preAppointment.sortDate)[0]; } + get displayTime(): string { + let time = ''; + switch(this.agentInfo.contactStatus) { + case 'reserved': + time = this.agentInfo.updateTime + break; + case 'contacted': + time = this.agentInfo.updateTime + break; + case 'picked': + time = this.agentInfo.createTime + break; + } + return time; + } appointmentDetail: any = { age : '', @@ -218,10 +235,6 @@ return '撌脤���'; } return '�脰����'; - } - - get updateTime() { - return isLogin() ? this.agentInfo.updateTime : ''; } get hopeContactTime() { -- Gitblit v1.8.0