From df439775f9806bac93b39051382e658d92c6c04e Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期二, 15 二月 2022 12:20:26 +0800
Subject: [PATCH] ADD:#135212 [嚴選配對] 結果頁面顯示匹配度資訊(前端)

---
 PAMapp/store/index.ts |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts
index 3fe527f..b4cd250 100644
--- a/PAMapp/store/index.ts
+++ b/PAMapp/store/index.ts
@@ -23,6 +23,13 @@
         return this.context.getters['localStorage/isUserLogin'];
     }
 
+    get strictResultList(): AgentOfStrictQuery[] {
+      const perfectMatchList = this.strictQueryList.filter((i) => i.suitability === 100);
+      return perfectMatchList.length > 5
+            ? perfectMatchList
+            : this.strictQueryList;
+    }
+
     @Mutation
     updateRecommend(data: Consultant[]) {
       this.recommendList = data;
@@ -35,7 +42,7 @@
 
     @Mutation
     updateStrictQueryList(data: AgentOfStrictQuery[]) {
-        this.strictQueryList = data;
+        this.strictQueryList = data.sort((a, b) => b.suitability - a.suitability);
     }
 
     @Mutation

--
Gitblit v1.8.0