File tree Expand file tree Collapse file tree 4 files changed +15
-71
lines changed
views/OperationalLearning Expand file tree Collapse file tree 4 files changed +15
-71
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ import { type EntriesAsList } from '@togglecorp/toggle-form';
1717
1818import CountryMultiSelectInput , { type CountryOption } from '#components/domain/CountryMultiSelectInput' ;
1919import RegionSelectInput , { type RegionOption } from '#components/domain/RegionSelectInput' ;
20+ import { type PerComponents } from '#contexts/domain' ;
2021import { type components } from '#generated/types' ;
2122import { type DisasterType } from '#hooks/domain/useDisasterType' ;
22- import { type PerComponent } from '#hooks/domain/usePerComponent' ;
2323import { type SecondarySector } from '#hooks/domain/useSecondarySector' ;
2424import { getFormattedComponentName } from '#utils/domain/per' ;
2525import { type GoApiResponse } from '#utils/restRequest' ;
2626
2727import i18n from './i18n.json' ;
2828
29+ export type PerComponent = NonNullable < PerComponents [ 'results' ] > [ number ] ;
30+
2931type OpsLearningOrganizationType = NonNullable < GoApiResponse < '/api/v2/ops-learning/organization-type/' > [ 'results' ] > [ number ] ;
3032export type PerLearningType = components < 'read' > [ 'schemas' ] [ 'PerLearningTypeEnum' ] ;
3133
Original file line number Diff line number Diff line change @@ -182,7 +182,11 @@ function Stats(props: Props) {
182182 return (
183183 < div className = { styles . stats } >
184184 { learningStatsPending && < BlockLoading /> }
185- < div className = { styles . keyFigureList } >
185+ < Container
186+ contentViewType = "grid"
187+ numPreferredGridContentColumns = { 4 }
188+ spacing = "compact"
189+ >
186190 < KeyFigure
187191 className = { styles . keyFigure }
188192 value = { learningStatsResponse ?. operations_included }
@@ -207,7 +211,7 @@ function Stats(props: Props) {
207211 label = { strings . sectorsCovered }
208212 labelClassName = { styles . keyFigureDescription }
209213 />
210- </ div >
214+ </ Container >
211215 < div className = { styles . learningOverview } >
212216 < OperationalLearningMap
213217 learningByCountry = { learningStatsResponse ?. learning_by_country }
Original file line number Diff line number Diff line change 33 flex-direction : column;
44 gap : var (--go-ui-spacing-md );
55
6- .key-figure-list {
7- display : grid;
8- grid-gap : var (--go-ui-spacing-2xs );
9- grid-template-columns : repeat (auto-fit, minmax (13rem , 1fr ));
10-
11- .key-figure {
12- border : var (--go-ui-width-separator-sm ) solid var (--go-ui-color-separator );
13- border-radius : var (--go-ui-border-radius-lg );
14- background-color : var (--go-ui-color-white );
15- padding : var (--go-ui-spacing-lg ) var (--go-ui-spacing-md );
16- height : 100% ;
17- }
6+ .key-figure {
7+ border : var (--go-ui-width-separator-sm ) solid var (--go-ui-color-separator );
8+ border-radius : var (--go-ui-border-radius-lg );
9+ background-color : var (--go-ui-color-white );
10+ padding : var (--go-ui-spacing-lg ) var (--go-ui-spacing-md );
11+ height : 100% ;
1812 }
1913
2014 .learning-overview {
You can’t perform that action at this time.
0 commit comments