From 7cfc771d3ace8f057ef7f534b9ee7c9649ac7d8f Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 30 十二月 2021 10:09:25 +0800
Subject: [PATCH] [Fix] TODO#133359 [調整文案 - 「你」調整成「您」]

---
 PAMapp/pages/questionnaire/_agentNo.vue |   50 ++++++++++++++++++++++++++++----------------------
 1 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue
index 7426d2d..7599a69 100644
--- a/PAMapp/pages/questionnaire/_agentNo.vue
+++ b/PAMapp/pages/questionnaire/_agentNo.vue
@@ -6,7 +6,7 @@
           class="ques-header__info"
           v-if="myRequest.contactType==='phone'">
           <div class="text--middle">
-              <div class="mdTxt">雿���蝜急撘�</div>
+              <div class="mdTxt">�����蝜急撘�</div>
               <div class="mt-10">
                   <span>�����</span>
                   <span>{{myRequest.phone}}</span>
@@ -16,7 +16,7 @@
               <div class="datepicker required">
                   <span class="mdTxt">�����蝯∠�靘踵���</span>
                   <PhoneContactTimePicker
-                  :scheduleList.sync="myRequest.hopeContactTime"/>
+                  :scheduleList="myRequest.hopeContactTime"/>
               </div>
           </div>
           <div class="mt-30">
@@ -31,7 +31,7 @@
         </div>
         <div class="ques-header__info" v-else>
           <div class="text--middle">
-              <div class="mdTxt">雿���蝜急撘�</div>
+              <div class="mdTxt">�����蝜急撘�</div>
               <div class="mt-10 ques-header__input-block">
                   <span>Email嚗�</span>
                   <span>{{myRequest.email}}</span>
@@ -55,7 +55,7 @@
               <div class="datepicker">
                   <span class="mdTxt">�����蝯∠�靘踵���</span>
                   <PhoneContactTimePicker
-                  :scheduleList.sync="myRequest.hopeContactTime"/>
+                  :scheduleList="myRequest.hopeContactTime"/>
               </div>
           </div>
         </div>
@@ -80,7 +80,7 @@
           :options="genderOptions" />
       </div>
       <div class="pam-paragraph">
-        <div class="mdTxt">撟湧翩</div>
+        <div class="mdTxt">���僑朣�</div>
         <SingleSelectBtn class="mt-10"
           :singleSelected.sync="myRequest.age"
           :options="ageRangeOptions" />
@@ -115,8 +115,8 @@
     </PopUpFrame>
 
     <PopUpFrame :isOpen.sync="sendReserve" @update:isOpen="closeReservePopUp">
-        <div class="text--middle  mt-30 sendReserve-txt">�����������憿批���</div>
-        <div class="text--middle  sendReserve-txt">�����蝯∴��</div>
+        <div class="text--middle  mt-30 sendReserve-txt">�������</div>
+        <div class="text--middle sendReserve-txt">�����“�������蝯∴��</div>
         <div class="text--center mdTxt">
           <el-button type="primary"
             @click="closeReservePopUp">
@@ -140,12 +140,17 @@
 
 <script lang="ts">
 import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator';
-import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment,RegisterInfo } from '~/assets/ts/api/consultant';
-import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/assets/ts/storageRequests';
+import { getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests';
 import _ from 'lodash';
-import { Consultant } from '~/assets/ts/models/consultant.model';
-import { ContactType } from '~/assets/ts/models/enum/ContactType';
-import { Gender } from '~/assets/ts/models/enum/Gender';
+
+import appointmentService from '~/shared/services/appointment.service';
+import authService from '~/shared/services/auth.service';
+import queryConsultantService from '~/shared/services/query-consultant.service';
+import { Consultant } from '~/shared/models/consultant.model';
+import { ContactType } from '~/shared/models/enum/ContactType';
+import { Gender } from '~/shared/models/enum/Gender';
+import { RegisterInfo } from '~/shared/models/registerInfo';
+import { AppointmentParams, AppointmentRequests } from '~/shared/models/appointment.model';
 
   const roleStorage = namespace('localStorage');
   @Component
@@ -153,6 +158,7 @@
     @State('myConsultantList') myConsultantList!: Consultant[];
     @Action storeConsultantList!: () => Promise<number>;
     @roleStorage.Getter isUserLogin!:boolean;
+    @roleStorage.State recommendConsultantItem!:string;
 
     genderOptions=[
       {
@@ -246,7 +252,7 @@
                   },
                   {
                       title:'����',
-                      content:'���� ���������憸券�����鈭怒�����嚗���摰帘摰漲嚗��隞亙��澈��ˊ�靽���嚗�'
+                      content:'���������憸券�����鈭怒�����嚗���摰帘摰漲嚗��隞亙��澈��ˊ�靽���嚗�'
                   }
     ];
 
@@ -275,7 +281,7 @@
 
     beforeRouteEnter(to: any, from: any, next: any) {
       next(vm => {
-        const isUserLogin = vm.$store.getters['localStorage/isUserLogin'];
+        const isUserLogin = authService.isUserLogin();
         if (from.name === 'login' && !isUserLogin) {
           vm.$router.go(-1);
           return;
@@ -288,7 +294,7 @@
     }
 
     async fetch() {
-      if (this.isUserLogin) {
+      if (authService.isUserLogin()) {
         await this.storeConsultantList();
       };
     }
@@ -299,7 +305,7 @@
 
     private setMyRequest(): void {
       const storageMyRequest = getRequestsFromStorage();
-      const storageMyQuestion = getRequestQuestionFromStorage();
+      const storageMyRequirement = this.recommendConsultantItem ? JSON.parse(this.recommendConsultantItem).requirements:[];
 
       if (storageMyRequest) {
         this.myRequest = {
@@ -313,10 +319,10 @@
         };
       }
 
-      if (storageMyQuestion) {
+      if (storageMyRequirement) {
         this.myRequest = {
           ...this.myRequest,
-          requirement: storageMyQuestion
+          requirement: storageMyRequirement
         }
         removeRequestQuestionFromStorage();
       }
@@ -348,7 +354,7 @@
       if (this.isEditBtn) {
         this.sentEditAppointmentDemand();
       } else {
-        addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand());
+        queryConsultantService.addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand());
       }
 
     }
@@ -361,7 +367,7 @@
           agentNo: this.$route.params.agentNo
         };
 
-        appointmentDemand(data).then(res => {
+        queryConsultantService.appointmentDemand(data).then(res => {
             this.sendReserve = true;
             this.myRequest.hopeContactTime = [];
             setRequestsToStorage(this.myRequest);
@@ -376,7 +382,7 @@
           id: this.appointmentId,
           otherRequirement: null
         }
-        editAppointment(info).then(res => {
+        appointmentService.editAppointment(info).then(res => {
           this.sendReserve = true;
           this.myRequest.hopeContactTime = [];
           setRequestsToStorage(this.myRequest);
@@ -446,7 +452,7 @@
                   : appointmentInfo.appointmentDate;
     }
     @Watch('myConsultantList') onMyConsultantListChange() {
-      if (this.isUserLogin && this.myConsultantList.length > 0) {
+      if (authService.isUserLogin() && this.myConsultantList.length > 0) {
           const editAppointment = this.getLatestReserved(this.$route.params.agentNo);
 
           if (editAppointment && editAppointment.agentNo) {

--
Gitblit v1.8.0