Skip to content

Commit

Permalink
Merge pull request #112 from Salesforce-org-Impact-Labs/refresh-from-…
Browse files Browse the repository at this point in the history
…flow

Refresh from flow
  • Loading branch information
mshanemc authored Jul 1, 2020
2 parents d0b3b13 + e14e4bc commit 06a76fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions force-app/main/default/classes/Scoring.cls
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ public with sharing class Scoring {
indicator.IndicatorType = metricIterator.Label;
// base percentile * this metric's share of the total weight
indicator.IndicatorValue = string.valueOf(serviceValue);
indicator.IndicatorPercentile =
indicator.IndicatorPercentile = Math.round(
((serviceValue - metricIterator.Org_Minimum__c) / spread) *
(metricIterator.Weighting__c / weightTotal);
(metricIterator.Weighting__c / weightTotal) *
100
);
Rec.Indicators.add(indicator);
Rec.Relevance = Rec.Relevance + indicator.IndicatorPercentile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class ServiceRecommendations extends LightningElement {
if (this.showRecommendations === false) {
this.showRecommendations = !this.showRecommendations;
}
window.console.log('result' + JSON.stringify(result));
console.log('result', JSON.parse(JSON.stringify(result)));
this.returnRecommendations = result;
})
.catch((error) => {
Expand Down

0 comments on commit 06a76fa

Please sign in to comment.