| | |
| | | class="user-reviews-card" |
| | | v-for="(appointmentLog, index) in myAppointmentReviewLogList" |
| | | :key="index"> |
| | | <div class="user-reviews-card-content" v-if="currentRole === 'user'"> |
| | | <div class="user-reviews-card-content" v-if="isUserLogin"> |
| | | 您對<span class="mdTxt">{{ ` ${appointmentLog.agentName} ` }}</span>做了 <UiReviewScore :score="appointmentLog.score" /> 評價! |
| | | </div> |
| | | <div class="user-reviews-card-content" v-else> |
| | |
| | | |
| | | </template> |
| | | <script lang="ts"> |
| | | import { Vue, Component, Action, State, namespace } from 'nuxt-property-decorator'; |
| | | import { AppointmentLog } from '~/shared/models/appointment.model'; |
| | | import { Vue, Component, Action, State } from 'nuxt-property-decorator'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | import authService from '~/shared/services/auth.service'; |
| | | import { AppointmentLog } from '~/shared/models/appointment.model'; |
| | | |
| | | @Component |
| | | export default class UserReviewsRecord extends Vue{ |
| | | |
| | | today = new Date(); |
| | | @State('myAppointmentReviewLogList') |
| | | myAppointmentReviewLogList!: AppointmentLog[]; |
| | | |
| | | @roleStorage.Getter currentRole!:string; |
| | | |
| | | @State('myAppointmentReviewLogList') myAppointmentReviewLogList!: AppointmentLog[]; |
| | | |
| | | @Action storeMyAppointmentReviewLog!: any; |
| | | @Action |
| | | storeMyAppointmentReviewLog!: any; |
| | | |
| | | appointmentLogList: AppointmentLog[] = []; |
| | | isUserLogin = false; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | mounted() { |
| | | this.storeMyAppointmentReviewLog(); |
| | | this.isUserLogin = authService.isUserLogin(); |
| | | this.storeMyAppointmentReviewLog(); |
| | | } |
| | | |
| | | } |