保誠-保戶業務員媒合平台
Tomas
2021-12-20 0ecbccb5e5f04cec5dcd264293cd5a3091a6dc1a
fixed: [客戶] 我的顧問清單-已聯絡的 action btn 判斷錯誤
修改1個檔案
25 ■■■■■ 已變更過的檔案
PAMapp/components/Consultant/ConsultantCard.vue 25 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Consultant/ConsultantCard.vue
@@ -82,13 +82,12 @@
                    </div>
                </div>
                <div v-if="agentInfo.contactStatus === 'contacted'
                        && !appointmentDetail.satisfactionScore" class="dialogInfo-btn">
                <div v-if="notScoreAppointmentYet" class="dialogInfo-btn">
                    <el-button type="primary"
                        @click.native="reviewsBtn = true">給予滿意度評分</el-button>
                </div>
                <div v-if="agentInfo.contactStatus === 'reserved'" class="text--center mt-10">
                <div v-if="agentInfo.contactStatus === 'reserved' && !isAppointment" class="text--center mt-10">
                    <el-button @click="isCancelPopup = true">取消預約</el-button>
                    <el-button @click="edit" type="primary">編輯</el-button>
                </div>
@@ -179,8 +178,13 @@
    isConfirmPopup = false;
    get notScoreAppointmentYet(): boolean {
      if (this.agentInfo.contactStatus !== 'contacted') return false;
      const isAppointment = !!this.agentInfo['appointmentStatus'];
      if (!isAppointment) return false;
      return !this.agentInfo['appointmentScore'];
    }
    get isAppointment(): boolean {
      return !!this.agentInfo['appointmentStatus'];;
    }
    get latestReservedAppointment(): Appointment {
@@ -306,8 +310,9 @@
    //////////////////////////////////////////////////////////////////////
    reserveCommunication() {
        const contactStatus = this.agentInfo.contactStatus;
        if (!contactStatus || contactStatus === 'picked') {
      const isAppointment = !!this.agentInfo['appointmentStatus'];
      const contactStatus = this.agentInfo.contactStatus;
        if (!isAppointment && (!contactStatus || contactStatus === 'picked')) {
            this.currentRole === Role.USER
                ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`)
                : this.$router.push('/login');
@@ -316,15 +321,17 @@
        }
    }
    openPopUp() {
      const appointmentId = this.agentInfo.contactStatus === 'contacted'
    openPopUp(): void {
      const isAppointment = !!this.agentInfo['appointmentStatus'];
      const appointmentId = isAppointment
                          ? this.agentInfo['appointmentId']
                          : this.latestReservedAppointment.id;
        getAppointmentDetail(appointmentId!).then(res => {
            this.appointmentDetail = {
                ...this.appointmentDetail,
                ...res.data
                ...res.data,
                satisfactionScore:  this.agentInfo['appointmentScore'],
            };
            this.width = isMobileDevice() ? '80%' : '';
            this.isVisibleDialog = true;