| | |
| | | </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> |
| | |
| | | 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 { |
| | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | 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'); |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |