| | |
| | | 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; |
| | |
| | | |
| | | @Mutation |
| | | updateStrictQueryList(data: AgentOfStrictQuery[]) { |
| | | this.strictQueryList = data; |
| | | this.strictQueryList = data.sort((a, b) => b.suitability - a.suitability); |
| | | } |
| | | |
| | | @Mutation |
| | |
| | | @Action |
| | | storeMyPersonalNotification() { |
| | | reviewsService.getMyPersonalNotification().then(data => { |
| | | this.context.commit('updateNotification', data); |
| | | const sortData = data |
| | | .sort((preItem, nextItem) => +new Date(nextItem.createdDate) - +new Date(preItem.createdDate)) |
| | | this.context.commit('updateNotification', sortData); |
| | | }) |
| | | } |
| | | |