保誠-保戶業務員媒合平台
Tomas
2021-12-22 8f5057969ef0943cd4ee68fa8770aeb3e4737b67
PAMapp/pages/record/index.vue
@@ -1,69 +1,29 @@
<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="currentRole === 'user'">
                您對<span class="mdTxt">{{ ` ${appointmentLog.agentName} ` }}</span>做了 <UiReviewScore :score="appointmentLog.score" /> 評價!
            </div>
            <div class="user-reviews-card-content" v-else>
                {{ `${appointmentLog.customerName} `}} 對您做了 <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>
    <ReviewRecords
      :myAppointmentReviewLogList="myAppointmentReviewLogList"
    ></ReviewRecords>
</div>
</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 { AppointmentLog } from '~/shared/models/appointment.model';
@Component
export default  class Reviews extends Vue{
    today = new Date();
    @State('myAppointmentReviewLogList')
    myAppointmentReviewLogList!: AppointmentLog[];
    @roleStorage.Getter currentRole!:string;
    @Action
    storeMyAppointmentReviewLog!: any;
    @State('myAppointmentReviewLogList') myAppointmentReviewLogList!: AppointmentLog[];
    @Action storeMyAppointmentReviewLog!: any;
    appointmentLogList: AppointmentLog[] = [];
    //////////////////////////////////////////////////////////////////////
    mounted() {
        this.storeMyAppointmentReviewLog();
    }
}
</script>