From 97c350dfeccad759ce37b04e50306e80a4ad2f15 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 7 Nov 2022 17:14:01 +0200 Subject: [PATCH] [Library]: #7883 - searchResearchResults.service.ts: Added parsing for C1-C5 classes | result-preview.component.less: Added css rules for C1-C5 classes in (influence/popularity) --- services/searchResearchResults.service.ts | 24 +++++++++++++++++-- .../result-preview.component.less | 6 ++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 4609e22c..9bdf803d 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -205,7 +205,17 @@ export class SearchResearchResultsService { for (let i = 0; i < resData['measure'].length; i++) { if (resData['measure'][i].id == 'influence') { result.measure[1] = resData['measure'][i].class; - if (resData['measure'][i].class == 'A') { + if (resData['measure'][i].class == 'C1') { + result.measure[3] = 'Top 0.01% in'; + } else if (resData['measure'][i].class == 'C2') { + result.measure[3] = 'Top 0.1% in'; + } else if (resData['measure'][i].class == 'C3') { + result.measure[3] = 'Top 1% in'; + } else if (resData['measure'][i].class == 'C4') { + result.measure[3] = 'Top 10% in'; + } else if (resData['measure'][i].class == 'C5') { + result.measure[3] = 'Average/low'; + } else if (resData['measure'][i].class == 'A') { result.measure[3] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { result.measure[3] = 'Substantial'; @@ -215,7 +225,17 @@ export class SearchResearchResultsService { } if (resData['measure'][i].id == 'popularity') { result.measure[0] = resData['measure'][i].class; - if (resData['measure'][i].class == 'A') { + if (resData['measure'][i].class == 'C1') { + result.measure[2] = 'Top 0.01% in'; + } else if (resData['measure'][i].class == 'C2') { + result.measure[2] = 'Top 0.1% in'; + } else if (resData['measure'][i].class == 'C3') { + result.measure[2] = 'Top 1% in'; + } else if (resData['measure'][i].class == 'C4') { + result.measure[2] = 'Top 10% in'; + } else if (resData['measure'][i].class == 'C5') { + result.measure[2] = 'Average/low'; + } else if (resData['measure'][i].class == 'A') { result.measure[2] = 'Exceptional'; } else if (resData['measure'][i].class == 'B') { result.measure[2] = 'Substantial'; diff --git a/utils/result-preview/result-preview.component.less b/utils/result-preview/result-preview.component.less index 93da8f46..ee271cfc 100644 --- a/utils/result-preview/result-preview.component.less +++ b/utils/result-preview/result-preview.component.less @@ -1,10 +1,10 @@ // Impact Factors -.popularity-A svg .a, .influence-A svg .a { +.popularity-A svg .a, .popularity-C1 svg .a, .popularity-C2 svg .a, .influence-A svg .a, .influence-C1 svg .a, .influence-C2 svg .a { fill:#d51717; } -.popularity-B svg .a, .influence-B svg .a { +.popularity-B svg .a, .popularity-C3 svg .a, .popularity-C4 svg .a, .influence-B svg .a, .influence-C3 svg .a, .influence-C4 svg .a { fill: #e1920a; } -.popularity-C svg .a, .influence-C svg .a { +.popularity-C svg .a, .popularity-C5 svg .a, .influence-C svg .a, .influence-C5 svg .a { fill: #444; } \ No newline at end of file