保誠-保戶業務員媒合平台
Mila
2022-01-22 c047a3336ff1efc7d21edee6f0c8811264eebae7
PAMapp/pages/userReviewsRecord/index.vue
@@ -1,69 +1,19 @@
<template>
<div class="user-reviews-page">
    <section class="mdTxt">
        查看紀錄
    </section>
    <section class="user-reviews-header">
        <div class="header-title mdTxt">
            滿意度紀錄
        </div>
    </section>
    <section class="user-reviews-content">
        <div
            class="user-reviews-card"
            v-for="(appointmentLog, index) in myAppointmentReviewLogList"
            :key="index">
            <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>
                {{ `${appointmentLog.clientName} `}} 對您做了 <UiReviewScore :score="appointmentLog.score" /> 評價!
            </div>
            <div class="user-reviews-card-date">
                <div class="date">
                    <UiDateFormat
                        :date="appointmentLog.lastModifiedDate"
                        onlyShowSection="DAY" />
                </div>
                <div class="time">
                    <UiDateFormat
                        :date="appointmentLog.lastModifiedDate"
                        onlyShowSection="TIME" />
                </div>
            </div>
        </div>
    </section>
</div>
  <div>
    <ReviewRecords
      :reviewLogList="reviewLogList"
    ></ReviewRecords>
  </div>
</template>
<script lang="ts">
import { Vue, Component, Action, State } from 'nuxt-property-decorator';
import authService from '~/shared/services/auth.service';
import { AppointmentLog } from '~/shared/models/appointment.model';
import { Vue, Component, Action, State } from 'nuxt-property-decorator';
@Component
export default  class UserReviewsRecord extends Vue{
    @State('myAppointmentReviewLogList')
    myAppointmentReviewLogList!: AppointmentLog[];
    @Action
    storeMyAppointmentReviewLog!: any;
    appointmentLogList: AppointmentLog[] = [];
    isUserLogin = false;
    //////////////////////////////////////////////////////////////////////
    mounted() {
      this.isUserLogin = authService.isUserLogin();
      this.storeMyAppointmentReviewLog();
    }
    @State('reviewLogList')
    reviewLogList!: AppointmentLog[];
}
</script>