File tree Expand file tree Collapse file tree 4 files changed +24
-26
lines changed
app/src/components/domain/RiskSeasonalMap Expand file tree Collapse file tree 4 files changed +24
-26
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " go-web-app " : patch
3+ ---
4+
5+ Fix seasonal risk score in regional and global risk watch
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ function Filters(props: Props) {
7575 ) ;
7676
7777 return (
78- < div className = { styles . filters } >
78+ < >
7979 < MultiSelectInput
8080 placeholder = { strings . riskAllCountries }
8181 name = "countries"
@@ -115,21 +115,23 @@ function Filters(props: Props) {
115115 onChange = { handleChange }
116116 withSelectAll
117117 />
118- < div className = { styles . riskScoreAdditionalOptions } >
118+ < div className = { styles . additionalOptions } >
119119 < Checkbox
120120 name = "normalizeByPopulation"
121121 label = { strings . riskNormalize }
122122 value = { value . normalizeByPopulation }
123123 onChange = { handleChange }
124124 />
125- < Checkbox
126- name = "includeCopingCapacity"
127- label = { strings . riskCopingCapacity }
128- value = { value . includeCopingCapacity }
129- onChange = { handleChange }
130- />
125+ { value . riskMetric !== 'riskScore' && (
126+ < Checkbox
127+ name = "includeCopingCapacity"
128+ label = { strings . riskCopingCapacity }
129+ value = { value . includeCopingCapacity }
130+ onChange = { handleChange }
131+ />
132+ ) }
131133 </ div >
132- </ div >
134+ </ >
133135 ) ;
134136}
135137
Original file line number Diff line number Diff line change 1- .filters {
2- display : grid;
3- grid-gap : var (--go-ui-spacing-md );
4- grid-template-columns : repeat (auto-fit, minmax (16rem , 1fr ));
5-
6- .risk-score-additional-options {
7- grid-column : 1 / -1 ;
8- display : flex;
9- flex-wrap : wrap;
10- gap : var (--go-ui-spacing-md );
11- }
1+ .additional-options {
2+ grid-column : 1 / -1 ;
3+ display : flex;
4+ flex-wrap : wrap;
5+ gap : var (--go-ui-spacing-md );
126}
Original file line number Diff line number Diff line change @@ -666,11 +666,7 @@ function RiskSeasonalMap(props: Props) {
666666
667667 const newValue = filters . riskMetric === 'riskScore'
668668 ? riskScoreToCategory (
669- // NOTE: Risk Scores are multiplited
670- // by vulnerability (from server)
671- // So, dividing by 10 to
672- // correct the range (0 - 100 -> 0 - 10)
673- item . hazard_type === 'WF' ? value : ( value / 10 ) ,
669+ value ,
674670 item . hazard_type ,
675671 ) : value ;
676672
@@ -697,7 +693,7 @@ function RiskSeasonalMap(props: Props) {
697693 }
698694 }
699695
700- if ( filters . includeCopingCapacity ) {
696+ if ( filters . riskMetric !== 'riskScore' && filters . includeCopingCapacity ) {
701697 const lccFactor = mappings ?. lccFactor [
702698 item . country_details . iso3
703699 ] ;
@@ -880,6 +876,7 @@ function RiskSeasonalMap(props: Props) {
880876 < Container
881877 className = { _cs ( styles . riskSeasonalMapContainer , className ) }
882878 heading = { strings . riskSeasonalMapHeading }
879+ withGridViewInFilter
883880 filters = { (
884881 < Filters
885882 regionId = { Number ( regionId ) }
You can’t perform that action at this time.
0 commit comments