diff --git a/ui/src/views/Resolve.vue b/ui/src/views/Resolve.vue index 229abf3d..1d0eaf6b 100644 --- a/ui/src/views/Resolve.vue +++ b/ui/src/views/Resolve.vue @@ -213,7 +213,7 @@
Scores
{{getSource(source_id)}} @@ -318,11 +318,20 @@ export default { created: function() { this.$store.state.progress.enable = true; this.$store.state.progress.width = "300px"; - this.$store.state.progress.title = this.$t('loading_potential'); + this.$store.state.progress.title = this.$route.query.flagType === 'autoMatches' ? this.$t('loading_auto') : this.$t('loading_potential'); + + axios.get(`/ocrux/match/potential-matches/${this.$route.params.clientId}`).then((resp) => { + + let responseData = resp.data; if(this.$route.query.flagType === 'autoMatches'){ - this.$store.state.progress.title = this.$t('loading_auto'); + + const parentObject = responseData.find(item => item.id === this.$route.params.clientId); + + if (parentObject) { + responseData = responseData.filter(item => item.uid === parentObject.uid); + } + } - axios.get(`/ocrux/match/potential-matches/${this.$route.params.clientId}`).then((resp) => { let extRegexPattern = /^extension_/; let matchingKeys = []; @@ -364,6 +373,19 @@ export default { cridHeader: function() { return this.useNickname ? this.$t('Temporary_cr_id') + ( this.includeCRID ? " / Actual CR ID" : "") : "CR ID" }, + filteredScores(scores) { + return (data) => { + const filteredScores = {}; + + Object.entries(data) + .forEach(([source_id, value]) => { + if (this.getSource(source_id) !== null && this.getSource(source_id) !== '') { + filteredScores[source_id] = value; + } + }); + return filteredScores; + } + }, bucketsModified () { for(let matrix of this.resolves) { if(matrix.uid !== matrix.ouid) { @@ -416,7 +438,8 @@ export default { return this.useNickname ? this.nickname[crid] + ( this.includeCRID ? " ("+crid+")" : "" ): crid }, getSource: function(source_id) { - return this.resolves.find( resolve => resolve.source_id === source_id ).source + const resolvedObject = this.resolves.find(resolve => resolve.source_id === source_id); + return resolvedObject ? resolvedObject.source : ''; }, moveClient: function(val,item) { this.copyCohortInfo = { old_id: item.uid, new_id: val, item: item }