From 42beea233cd7d041cbb206130f2c932461119d91 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 19 一月 2022 16:10:11 +0800
Subject: [PATCH] clean code

---
 PAMapp/store/index.ts                   |   13 ++++---------
 PAMapp/store/appointment.store.ts       |    2 +-
 PAMapp/components/Client/ClientCard.vue |    4 ++--
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue
index 6afbe92..f203dd0 100644
--- a/PAMapp/components/Client/ClientCard.vue
+++ b/PAMapp/components/Client/ClientCard.vue
@@ -210,7 +210,7 @@
     updateMyAppointmentList!: (data: Appointment) => void;
 
     @appointmentStore.Action
-    setAppointmentDetail!: (appointmentId: number) => Promise<Appointment>;
+    getAppointmentDetail!: (appointmentId: number) => Promise<Appointment>;
 
     @appointmentStore.Getter
     appointmentProgress!: ContactStatus;
@@ -256,7 +256,7 @@
     //////////////////////////////////////////////////////////////////////
 
     viewAppointmentDetail(): void {
-      this.setAppointmentDetail(this.client.id).then((_) => {
+      this.getAppointmentDetail(this.client.id).then((_) => {
         this.$router.push(`/appointment/${this.client.id}`);
       });
     }
diff --git a/PAMapp/store/appointment.store.ts b/PAMapp/store/appointment.store.ts
index 8c7b3e5..02576cb 100644
--- a/PAMapp/store/appointment.store.ts
+++ b/PAMapp/store/appointment.store.ts
@@ -63,7 +63,7 @@
   }
 
   @Action({ commit: 'SET_APPOINTMENT'})
-  async setAppointmentDetail(appointmentId: number): Promise<Appointment> {
+  async getAppointmentDetail(appointmentId: number): Promise<Appointment> {
     if (this.appointmentDetail && this.appointmentDetail.id === appointmentId) {
       return this.appointmentDetail;
     } else {
diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts
index 5ccdda4..6b00e79 100644
--- a/PAMapp/store/index.ts
+++ b/PAMapp/store/index.ts
@@ -1,18 +1,13 @@
-import { StrictQueryParams } from '~/shared/models/strict-query.model';
 import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'
-
-import { getFavoriteFromStorage, setFavoriteToStorage } from '~/shared/storageConsultant';
 
 import myConsultantService from '~/shared/services/my-consultant.service';
 import queryConsultantService from '~/shared/services/query-consultant.service';
-import appointmentService from '~/shared/services/appointment.service';
 import reviewsService from '~/shared/services/reviews.service';
-
 import { Consultant } from '~/shared/models/consultant.model';
-import { Appointment, AppointmentLog, InterviewRecord } from '~/shared/models/appointment.model';
-import { AgentOfStrictQuery } from '~/shared/models/strict-query.model';
-import { AgentInfo } from '~/shared/models/agent-info.model';
-import { agentCommunicationStyleList } from '~/shared/const/agent-communication-style-list';
+import { getFavoriteFromStorage, setFavoriteToStorage } from '~/shared/storageConsultant';
+import { AppointmentLog, InterviewRecord } from '~/shared/models/appointment.model';
+import { AgentOfStrictQuery, StrictQueryParams } from '~/shared/models/strict-query.model';
+
 @Module
 export default class Store extends VuexModule {
     recommendList: Consultant[] = [];

--
Gitblit v1.8.0