保誠-保戶業務員媒合平台
Mila
2022-01-19 e471f81737e1e113f913ac615a0a368ab3ca2cd1
PAMapp/pages/appointment/_appointmentId/index.vue
@@ -4,10 +4,10 @@
      <div>{{ appointmentDetail.appointmentDate | formatDate }}</div>
      <div>{{ appointmentDetail.consultantReadTime | formatDate }}</div>
    </div>
    <!-- TODO: re-send api to update progress [Tomas, 2022/1/17 17:02] -->
    <AppointmentProgress
      class="mt-10"
      :currentStep="appointmentDetail.communicateStatus"
      :currentStep="appointmentProgress"
    ></AppointmentProgress>
    <section class="client-detail">
@@ -80,41 +80,38 @@
    <section class="mt-30">
      <AppointmentInterviewList />
      <AppointmentInterviewList :interviewList="appointmentDetail.interviewRecordDTOs" />
    </section>
    <section class="mt-30">
      <AppointmentRecordList />
      <AppointmentRecordList :noticeLogs="appointmentDetail.appointmentNoticeLogs" />
    </section>
  </div>
</template>
<script lang="ts">
import { Context } from '@nuxt/types';
import { Vue, Component } from 'vue-property-decorator';
import { namespace } from 'nuxt-property-decorator';
import appointmentService from '~/shared/services/appointment.service';
import { AppointmentDetail } from '~/shared/models/appointment.model';
import { Appointment } from '~/shared/models/appointment.model';
import { ContactStatus } from '~/shared/models/enum/contact-status';
const appointmentStore = namespace('appointment.store');
@Component
export default class AppointmentDetailComponent extends Vue {
  appointmentDetail!: AppointmentDetail;
  @appointmentStore.State('appointmentDetail')
  appointmentDetail!: Appointment;
  @appointmentStore.Getter('appointmentProgress')
  appointmentProgress!: ContactStatus;
  isVisibleDialog = false;
  interviewTxt = "";
  contactStatus = ContactStatus;
  //////////////////////////////////////////////////////////////////////
  async asyncData(context: Context) {
    const appointmentId = +context.route.params.appointmentId;
    return {
      appointmentDetail: await appointmentService.getAppointmentDetail(appointmentId).then((res) => res)
    }
  }
  //////////////////////////////////////////////////////////////////////