From ff6cb58bffa6483e9349a7b32cc8838f2fa4f62d Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期五, 10 十二月 2021 18:35:13 +0800
Subject: [PATCH] TODO#132188 [顧問的滿意度評比分數與篩選功能先不顯示,但保戶依然可以進行滿意度評比與查看]

---
 PAMapp/components/QuickFilter/QuickFilterSelector.vue       |    9 +++-
 PAMapp/pages/quickFilter/index.vue                          |   15 ++++---
 PAMapp/components/Consultant/ConsultantCard.vue             |   13 ++++--
 PAMapp/components/QuickFilter/QuickFilterConsultantList.vue |    6 ++-
 PAMapp/pages/agentInfo/_agentNo.vue                         |    7 ++-
 PAMapp/pages/recommendConsultant/result.vue                 |    5 ++
 PAMapp/assets/ts/const/hide-reviews.ts                      |    1 
 PAMapp/components/Consultant/ConsultantSwiper.vue           |    8 +++-
 PAMapp/components/Client/ClientCard.vue                     |    6 ++-
 PAMapp/pages/recommendConsultant/index.vue                  |    5 +-
 10 files changed, 49 insertions(+), 26 deletions(-)

diff --git a/PAMapp/assets/ts/const/hide-reviews.ts b/PAMapp/assets/ts/const/hide-reviews.ts
new file mode 100644
index 0000000..e8a6eb8
--- /dev/null
+++ b/PAMapp/assets/ts/const/hide-reviews.ts
@@ -0,0 +1 @@
+export const hideReviews = true;
\ No newline at end of file
diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue
index 44a5316..76e6f2b 100644
--- a/PAMapp/components/Client/ClientCard.vue
+++ b/PAMapp/components/Client/ClientCard.vue
@@ -15,8 +15,9 @@
                     :size="50"
                     src=""
                 ></el-avatar>
-                <div class="satisfaction">
+                <div class="satisfaction" v-if="!hideReviews">
                     <template v-if="client.satisfactionScore">
+                        TODO:���遛��漲
                         <i class="icon-star pam-icon icon--yellow satisfaction"></i>
                         <span>{{client.satisfactionScore}}</span>
                     </template>
@@ -97,7 +98,7 @@
 import { Vue, Component, Prop, Action } from 'nuxt-property-decorator';
 import { isMobileDevice } from '~/assets/ts/device';
 import { ClientInfo, markAsContact, recordRead } from '~/assets/ts/api/appointment';
-
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 @Component({
     filters: {
         formatNumber(index: number) {
@@ -124,6 +125,7 @@
     @Prop() client!: ClientInfo;
     isVisibleDialog = false;
     width = '';
+    hideReviews = hideReviews;
 
     get requirements() {
         return this.client.requirement.split(',');
diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index 7348481..fe39db9 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -11,7 +11,8 @@
                             :fileName="avatarFileName"
                             @click.native="showAgentDetail(agentInfo.agentNo)"
                         ></UiAvatar>
-                        <div>
+                            <!-- TODO:���遛��漲 -->
+                        <div v-if="!hideReviews">    
                             <i class="icon-star pam-icon icon--yellow satisfaction"  v-if="!(latestContactedAppointment && !latestContactedAppointment.satisfactionScore)"></i>
                             <span v-if="agentInfo.contactStatus === 'contacted' && latestContactedAppointment && latestContactedAppointment.satisfactionScore">
                                 {{ latestContactedAppointment && latestContactedAppointment.satisfactionScore}}
@@ -45,7 +46,7 @@
                             @click="reserveCommunication"
                             :class="agentInfo.contactStatus + 'Btn'"
                         >{{ contactTxt }}</el-button>
-                        <div class="updateTime">
+                        <div class="updateTime mt-10">
                             {{ displayTime | formatDate }}
                         </div>
                     </el-col>
@@ -74,7 +75,7 @@
                         :key="index"
                     >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{ item | formatHopeContactTime }}</p>
                     <div v-if="appointmentDetail.satisfactionScore">
-                        <div class="mdTxt mt-10 mb-10">皛踵�漲</div>
+                        <div class="mdTxt mt-10 mb-10" v-if="!hideReviews">皛踵�漲</div>
                             <el-rate
                             :value="appointmentDetail.satisfactionScore"
                             class="pam-myDemand-dialog__rate"
@@ -127,6 +128,7 @@
 import { Consultant, Appointment } from '~/assets/ts/models/consultant.model';
 import { isMobileDevice } from '~/assets/ts/device';
 import { Role } from '~/assets/ts/models/enum/Role';
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 
 const roleStorage = namespace('localStorage');
 @Component({
@@ -160,6 +162,7 @@
     width: string = '';
     inputScore = 0;
     isCancelPopup = false;
+    hideReviews = hideReviews;
 
     get latestContactedAppointment(): Appointment | null {
         if (!(this.agentInfo && this.agentInfo.appointments && this.agentInfo.appointments.length)) return null;
@@ -173,10 +176,10 @@
         return this.agentInfo.appointments!
                 .filter((appointment) => appointment.communicateStatus !== 'contacted')
                 .map((reversedAppointment) => {
-                  return {
+                    return {
                     ...reversedAppointment,
                     sortDate: new Date(reversedAppointment.appointmentDate)
-                  }
+                    }
                 })
                 .sort((preAppointment, nextAppointment) => +nextAppointment.sortDate - +preAppointment.sortDate)[0];
     }
diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue
index bacf1ca..7f8d13b 100644
--- a/PAMapp/components/Consultant/ConsultantSwiper.vue
+++ b/PAMapp/components/Consultant/ConsultantSwiper.vue
@@ -12,7 +12,8 @@
             <div class="consultantCardStyle" >
               <UiAvatar :size="80" :fileName="agentInfo.img" class="mb-10"></UiAvatar>
               <div class="name">{{agentInfo.name}}</div>
-              <div>
+              <div v-if="!hideReviews">
+                <!-- TODO:���遛��漲 -->
                 <i class="icon-star pam-icon icon--yellow"></i>
                 <span class="satisfaction">{{agentInfo.avgScore}}</span>
               </div>
@@ -29,12 +30,15 @@
 import { Vue, Component, Prop } from 'vue-property-decorator';
 import { SwiperOptions } from 'swiper';
 import { Consultant } from '~/assets/ts/models/consultant.model';
-
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 
 @Component
 export default class UiSwiper extends Vue {
+
     @Prop() agents!: Consultant[];
 
+    hideReviews = hideReviews ;
+    
     swiperOptions: SwiperOptions = {
       loop: false,
         slideToClickedSlide: false,
diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue
index 93250cd..d76e739 100644
--- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue
+++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue
@@ -31,7 +31,8 @@
                         <div class="smTxt_bold mb-10 text--prudential_grey">����風</div>
                         <div class="mb-10">{{item.seniority}}</div>
                     </el-col>
-                    <el-col :span="12">
+                    <el-col :span="12" v-if="!hideReviews">
+                        <!-- TODO:���遛��漲 -->
                         <div class="smTxt_bold mb-10 text--prudential_grey">摰X皛踵�漲</div>
                         <div>
                             <i class="icon-star pam-icon icon--yellow "></i>
@@ -82,7 +83,7 @@
 import { ElCarousel } from 'element-ui/types/carousel';
 import { Vue, Component, Prop } from 'vue-property-decorator';
 import { Consultant } from '~/assets/ts/models/consultant.model';
-
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 
 @Component
 export default class QuickFilterConsultantList extends Vue {
@@ -93,6 +94,7 @@
     endPosition = 0;
     startYPosition = 0;
     endYPosition = 0;
+    hideReviews = hideReviews ;
 
     moveStart(event: TouchEvent) {
         this.startPosition = event.changedTouches[0].clientX;
diff --git a/PAMapp/components/QuickFilter/QuickFilterSelector.vue b/PAMapp/components/QuickFilter/QuickFilterSelector.vue
index 915eca1..558e338 100644
--- a/PAMapp/components/QuickFilter/QuickFilterSelector.vue
+++ b/PAMapp/components/QuickFilter/QuickFilterSelector.vue
@@ -44,8 +44,9 @@
             </el-radio-group>
         </div>
 
-        <div v-else>
+        <div v-else> 
             <el-rate
+            v-if="!hideReviews"
                 class="pam-quickFilter-rate"
                 v-model="pickedItem.avgScore"
             ></el-rate>
@@ -67,9 +68,10 @@
 import { Vue, Component, Prop, Watch, Emit } from 'nuxt-property-decorator';
 import { FastQueryParams } from '~/assets/ts/api/consultant';
 import { QuestionOption } from '~/pages/quickFilter/index.vue';
-
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 @Component
 export default class QuickFilterDrawer extends Vue {
+
 
     pickedItem: FastQueryParams = {
         communicationStyles: [],
@@ -77,7 +79,8 @@
         gender: '',
         avgScore: 0
     }
-
+    hideReviews = hideReviews ;
+    
     @Prop() questionOption!: QuestionOption;
     @Prop() isOpenQuestionPopUp!: boolean;
     @Prop() confirmItem!: Selected[];
diff --git a/PAMapp/pages/agentInfo/_agentNo.vue b/PAMapp/pages/agentInfo/_agentNo.vue
index 738b438..fb9be0a 100644
--- a/PAMapp/pages/agentInfo/_agentNo.vue
+++ b/PAMapp/pages/agentInfo/_agentNo.vue
@@ -10,7 +10,8 @@
         type="flex"
         class="pt-10"
         justify="center"
-        align="middle">
+        align="middle" v-if="!hideReviews">
+        <!-- TODO:���遛��漲 -->
           <i class="pam-icon icon--primary icon-star"></i>
           <h3 class="mdTxt">{{ agentInfo.avgScore }}</h3>
       </el-row>
@@ -190,6 +191,8 @@
 import { Vue, Component } from 'vue-property-decorator';
 import { getConsultantDetail } from '~/assets/ts/api/consultant';
 import { Role } from '~/assets/ts//models/enum/Role';
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
+
 const roleStorage = namespace('localStorage');
 @Component
 export default class AgentInfoComponent extends Vue {
@@ -200,7 +203,7 @@
   isAlertFieldInfo = false;
   fieldInfoTitle = '';
   fieldInfoDesc = '';
-
+  hideReviews = hideReviews ;
   async asyncData(context: Context) {
     const agentNo = context.route.params.agentNo;
     let agentInfo = {};
diff --git a/PAMapp/pages/quickFilter/index.vue b/PAMapp/pages/quickFilter/index.vue
index 44e739e..2e35267 100644
--- a/PAMapp/pages/quickFilter/index.vue
+++ b/PAMapp/pages/quickFilter/index.vue
@@ -17,7 +17,8 @@
                     @removeTag="removeTag(item.value)"
                 >
                     <span v-if="item.option === 'gender'">{{item.value === 'male' ? '���' : '憟單��'}}</span>
-                    <span v-else-if="item.option === 'avgScore'">{{item.value + '��誑銝遛��漲'}}</span>
+                    <!-- TODO:���遛��漲 -->
+                    <!-- <span v-else-if="item.option === 'avgScore'">{{item.value + '��誑銝遛��漲'}}</span> -->
                     <span v-else>{{item.value}}</span>
                 </UiTags>
             </template>
@@ -90,12 +91,12 @@
             ],
             type: 'radio'
         },
-        {
-            name: 'avgScore',
-            title: '憿批�遛��漲',
-            detail: [],
-            type: ''
-        },
+        // { TODO:���遛��漲
+        //     name: 'avgScore',
+        //     title: '憿批�遛��漲',
+        //     detail: [],
+        //     type: ''
+        // },
         {
             name: 'communicationStyles',
             title: '皞�◢�',
diff --git a/PAMapp/pages/recommendConsultant/index.vue b/PAMapp/pages/recommendConsultant/index.vue
index e313313..1efe136 100644
--- a/PAMapp/pages/recommendConsultant/index.vue
+++ b/PAMapp/pages/recommendConsultant/index.vue
@@ -32,11 +32,12 @@
       <div class="pb-10 mdTxt">憿批�僑鞈�</div>
         <SingleSelectBtn :singleSelected.sync="strictQueryDto.seniority" :options="seniorityOptions"/>
     </div>
-    <div class="pam-paragraph">
+    <!-- <div class="pam-paragraph">
+      TODO:���遛��漲
       <div class="pb-10 mdTxt">靽憿批�遛��漲</div>
       <el-rate class="pam-consultant-rate" v-model="strictQueryDto.avgScore">
       </el-rate>
-    </div>
+    </div> -->
     <div class="pam-paragraph">
       <div class="rec-popular">
         <div class="pb-10 mdTxt">���瑼Y揣</div>
diff --git a/PAMapp/pages/recommendConsultant/result.vue b/PAMapp/pages/recommendConsultant/result.vue
index 0c06be1..9f04e1e 100644
--- a/PAMapp/pages/recommendConsultant/result.vue
+++ b/PAMapp/pages/recommendConsultant/result.vue
@@ -35,7 +35,8 @@
                             {{ info.seniority }}
                             </div>
                         </el-col>
-                        <el-col :span="12">
+                        <!-- TODO:���遛��漲 -->
+                        <el-col :span="12" v-if="!hideReviews">
                             <div class="field__label">
                             摰X皛踵�漲
                             </div>
@@ -83,6 +84,7 @@
 <script lang="ts">
 import {Vue,Component, State, namespace, Action} from 'nuxt-property-decorator';
 import { AgentOfStrictQuery } from '~/assets/ts/api/consultant';
+import { hideReviews } from '~/assets/ts/const/hide-reviews';
 
 const localStorage = namespace('localStorage');
 
@@ -95,6 +97,7 @@
     pageList: any[] = [];
     isVisiblePopUp = false;
     popUpTxt = '';
+    hideReviews = hideReviews;
     mounted() {
         if (this.recommendConsultantItem && this.strictQueryList.length === 0) {
             const strictQueryDto = JSON.parse(this.recommendConsultantItem);

--
Gitblit v1.8.0