保誠-保戶業務員媒合平台
PAMapp/components/Consultant/ConsultantCard.vue
@@ -11,7 +11,8 @@
                            :fileName="avatarFileName"
                            @click.native="showAgentDetail(agentInfo.agentNo)"
                        ></UiAvatar>
                        <div>
                            <!-- TODO:隱藏滿意度 -->
                        <div v-if="!hideReviews">
                            <i class="icon-star pam-icon icon--yellow satisfaction"  v-if="!(latestContactedAppointment && !latestContactedAppointment.satisfactionScore)"></i>
                            <span v-if="agentInfo.contactStatus === 'contacted' && latestContactedAppointment && latestContactedAppointment.satisfactionScore">
                                {{ latestContactedAppointment && latestContactedAppointment.satisfactionScore}}
@@ -45,7 +46,7 @@
                            @click="reserveCommunication"
                            :class="agentInfo.contactStatus + 'Btn'"
                        >{{ contactTxt }}</el-button>
                        <div class="updateTime">
                        <div class="updateTime mt-10">
                            {{ displayTime | formatDate }}
                        </div>
                    </el-col>
@@ -74,7 +75,7 @@
                        :key="index"
                    >連絡時段{{index + 1 | formatNumber}}:{{ item | formatHopeContactTime }}</p>
                    <div v-if="appointmentDetail.satisfactionScore">
                        <div class="mdTxt mt-10 mb-10">滿意度</div>
                        <div class="mdTxt mt-10 mb-10" v-if="!hideReviews">滿意度</div>
                            <el-rate
                            :value="appointmentDetail.satisfactionScore"
                            class="pam-myDemand-dialog__rate"
@@ -127,6 +128,7 @@
import { Consultant, Appointment } from '~/assets/ts/models/consultant.model';
import { isMobileDevice } from '~/assets/ts/device';
import { Role } from '~/assets/ts/models/enum/Role';
import { hideReviews } from '~/assets/ts/const/hide-reviews';
const roleStorage = namespace('localStorage');
@Component({
@@ -160,6 +162,7 @@
    width: string = '';
    inputScore = 0;
    isCancelPopup = false;
    hideReviews = hideReviews;
    get latestContactedAppointment(): Appointment | null {
        if (!(this.agentInfo && this.agentInfo.appointments && this.agentInfo.appointments.length)) return null;
@@ -173,10 +176,10 @@
        return this.agentInfo.appointments!
                .filter((appointment) => appointment.communicateStatus !== 'contacted')
                .map((reversedAppointment) => {
                  return {
                    return {
                    ...reversedAppointment,
                    sortDate: new Date(reversedAppointment.appointmentDate)
                  }
                    }
                })
                .sort((preAppointment, nextAppointment) => +nextAppointment.sortDate - +preAppointment.sortDate)[0];
    }