Skip to content

Commit b28bf56

Browse files
samsharafrozenhelium
authored andcommitted
feat: update ui for readiness pages and eru readiness form update
1 parent ca8ca68 commit b28bf56

14 files changed

Lines changed: 61 additions & 132 deletions

File tree

app/src/views/ActiveSurgeDeployments/ActiveRapidResponseTable/i18n.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"surgeAlertsTableStartDate": "Start Date",
99
"surgeAlertsTablePosition": "Position",
1010
"surgeAlertsTableKeywords": "Keywords",
11-
"surgeAlertsSurgeType": "Surge Type",
1211
"surgeAlertsTableEmergency": "Emergency",
1312
"surgeAlertsTableCountry": "Country",
1413
"surgeAlertsTableStatus": "Status",

app/src/views/ActiveSurgeDeployments/ActiveRapidResponseTable/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@ function ActiveRapidResponseAlertsTable() {
137137
strings.surgeAlertsTableKeywords,
138138
(surgeAlert) => getMolnixKeywords(surgeAlert.molnix_tags),
139139
),
140-
createStringColumn<SurgeAlertListItem, number>(
141-
'atype_display',
142-
strings.surgeAlertsSurgeType,
143-
(surgeAlert) => surgeAlert.atype_display,
144-
),
145140
createLinkColumn<SurgeAlertListItem, number>(
146141
'event',
147142
strings.surgeAlertsTableEmergency,
@@ -179,7 +174,6 @@ function ActiveRapidResponseAlertsTable() {
179174
strings.surgeAlertsTableEmergency,
180175
strings.surgeAlertsTableCountry,
181176
strings.surgeAlertsTableStatus,
182-
strings.surgeAlertsSurgeType,
183177
]);
184178

185179
return (

app/src/views/ActiveSurgeDeployments/SurgeMap/index.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import MapContainerWithDisclaimer from '#components/MapContainerWithDisclaimer';
3939
import MapPopup from '#components/MapPopup';
4040
import useCountryRaw from '#hooks/domain/useCountryRaw';
4141
import useInputState from '#hooks/useInputState';
42+
import { MAX_PAGE_LIMIT } from '#utils/constants';
4243
import { useRequest } from '#utils/restRequest';
4344

4445
import {
@@ -54,7 +55,6 @@ import {
5455

5556
import i18n from './i18n.json';
5657
import styles from './styles.module.css';
57-
import { MAX_PAGE_LIMIT } from '#utils/constants';
5858

5959
const sourceOptions: mapboxgl.GeoJSONSourceRaw = {
6060
type: 'geojson',
@@ -74,13 +74,6 @@ interface Props {
7474
className?: string;
7575
}
7676

77-
interface NameOutputProps {
78-
name: string;
79-
}
80-
function NameOutput({ name }: NameOutputProps) {
81-
return name;
82-
}
83-
8477
function SurgeMap(props: Props) {
8578
const {
8679
className,
@@ -433,13 +426,13 @@ function SurgeMap(props: Props) {
433426
labelClassName={styles.label}
434427
value={(
435428
<ReducedListDisplay
436-
list={event.roleProfile}
429+
list={event.eruType}
437430
keySelector={stringNameSelector}
438431
renderer={DisplayName}
439432
rendererParams={rendererParams}
440433
/>
441434
)}
442-
label={strings.roleProfile}
435+
label={strings.eruType}
443436
strongLabel
444437
/>
445438
<TextOutput

app/src/views/EmergencySurge/DeployedErusTable/styles.module.css

Lines changed: 0 additions & 20 deletions
This file was deleted.

app/src/views/EruReadinessForm/EruInputItem/index.tsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useMemo } from 'react';
22
import {
3-
Checkbox,
43
InputSection,
54
RadioInput,
65
TextArea,
@@ -83,6 +82,7 @@ function EruInputItem(props: Props) {
8382
<InputSection
8483
title={strings.eruEquipmentReadiness}
8584
className={styles.inputSection}
85+
withoutPadding
8686
>
8787
<RadioInput
8888
className={styles.readinessInput}
@@ -99,6 +99,7 @@ function EruInputItem(props: Props) {
9999
<InputSection
100100
title={strings.eruPeopleReadiness}
101101
className={styles.inputSection}
102+
withoutPadding
102103
>
103104
<RadioInput
104105
className={styles.readinessInput}
@@ -115,6 +116,7 @@ function EruInputItem(props: Props) {
115116
<InputSection
116117
title={strings.eruFundingReadiness}
117118
className={styles.inputSection}
119+
withoutPadding
118120
>
119121
<RadioInput
120122
className={styles.readinessInput}
@@ -131,27 +133,14 @@ function EruInputItem(props: Props) {
131133
<InputSection
132134
title={strings.eruComments}
133135
className={styles.inputSection}
136+
withoutPadding
134137
>
135138
<TextArea
136139
name="comment"
137140
value={value?.comment}
138141
onChange={onFieldChange}
139142
error={error?.comment}
140143
/>
141-
<Checkbox
142-
label={strings.eruLead}
143-
name="has_capacity_to_lead"
144-
value={value?.has_capacity_to_lead}
145-
onChange={onFieldChange}
146-
error={error?.has_capacity_to_lead}
147-
/>
148-
<Checkbox
149-
label={strings.eruSupport}
150-
name="has_capacity_to_support"
151-
value={value?.has_capacity_to_support}
152-
onChange={onFieldChange}
153-
error={error?.has_capacity_to_support}
154-
/>
155144
</InputSection>
156145
</InputSection>
157146
);

app/src/views/EruReadinessForm/schema.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ const schema: FormSchema = {
5151
people_readiness: { required: true },
5252
funding_readiness: { required: true },
5353
comment: {},
54-
has_capacity_to_lead: { defaultValue: false },
55-
has_capacity_to_support: { defaultValue: false },
5654
}),
5755
}),
5856
},

app/src/views/SurgeOverview/EmergencyResponseUnit/EmergencyResponseUnitReadiness/EmergencyResponseUnitCard/i18n.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"emergencyResponseUnitOwnerCardDeployed": "{count} Deployed ERUs",
77
"emergencyResponseUnitNationalSociety": "National Society",
88
"eruSeeReadinessInfoButton": "See readiness info",
9-
"eruEquipmentReadiness": "Equipment Readiness",
10-
"eruPeopleReadiness": "People Readiness",
11-
"eruFundingReadiness": "Funding Readiness",
9+
"eruEquipmentReadiness": "Equipment",
10+
"eruPeopleReadiness": "People",
11+
"eruFundingReadiness": "Funding",
1212
"eruReadinessInformationHeading": "Readiness Information by National Society"
1313
}
1414
}

app/src/views/SurgeOverview/EmergencyResponseUnit/EmergencyResponseUnitReadiness/EmergencyResponseUnitCard/index.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,37 +91,37 @@ function EmergencyResponseUnitTypeCard(props: Props) {
9191
<>
9292
<TextOutput
9393
className={styles.readiness}
94-
label={strings.eruEquipmentReadiness}
95-
value={(
94+
value={strings.eruEquipmentReadiness}
95+
label={(
9696
<ReadinessIcon
9797
readiness={equipmentReadiness}
9898
/>
9999
)}
100-
valueClassName={styles.icon}
100+
labelClassName={styles.icon}
101101
withoutLabelColon
102102
/>
103103
<div className={styles.separatorLeft} />
104104
<TextOutput
105105
className={styles.readiness}
106-
label={strings.eruPeopleReadiness}
107-
value={(
106+
value={strings.eruPeopleReadiness}
107+
label={(
108108
<ReadinessIcon
109109
readiness={peopleReadiness}
110110
/>
111111
)}
112-
valueClassName={styles.icon}
112+
labelClassName={styles.icon}
113113
withoutLabelColon
114114
/>
115115
<div className={styles.separatorLeft} />
116116
<TextOutput
117117
className={styles.readiness}
118-
label={strings.eruFundingReadiness}
119-
value={(
118+
value={strings.eruFundingReadiness}
119+
label={(
120120
<ReadinessIcon
121121
readiness={fundingReadiness}
122122
/>
123123
)}
124-
valueClassName={styles.icon}
124+
labelClassName={styles.icon}
125125
withoutLabelColon
126126
/>
127127
</>
@@ -159,37 +159,37 @@ function EmergencyResponseUnitTypeCard(props: Props) {
159159
>
160160
<TextOutput
161161
className={styles.readiness}
162-
label={strings.eruEquipmentReadiness}
163-
value={(
162+
value={strings.eruEquipmentReadiness}
163+
label={(
164164
<ReadinessIcon
165165
readiness={readiness.equipment_readiness}
166166
/>
167167
)}
168-
valueClassName={styles.icon}
168+
labelClassName={styles.icon}
169169
withoutLabelColon
170170
/>
171171
<div className={styles.separatorLeft} />
172172
<TextOutput
173173
className={styles.readiness}
174-
label={strings.eruPeopleReadiness}
175-
value={(
174+
value={strings.eruPeopleReadiness}
175+
label={(
176176
<ReadinessIcon
177177
readiness={readiness.people_readiness}
178178
/>
179179
)}
180-
valueClassName={styles.icon}
180+
labelClassName={styles.icon}
181181
withoutLabelColon
182182
/>
183183
<div className={styles.separatorLeft} />
184184
<TextOutput
185185
className={styles.readiness}
186-
label={strings.eruFundingReadiness}
187-
value={(
186+
value={strings.eruFundingReadiness}
187+
label={(
188188
<ReadinessIcon
189189
readiness={readiness.funding_readiness}
190190
/>
191191
)}
192-
valueClassName={styles.icon}
192+
labelClassName={styles.icon}
193193
withoutLabelColon
194194
/>
195195
</Container>

app/src/views/SurgeOverview/EmergencyResponseUnit/EmergencyResponseUnitReadiness/EmergencyResponseUnitCard/styles.module.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
gap: var(--go-ui-spacing-md);
2020

2121
.readiness {
22+
align-items: center;
2223
flex: 1 0 0;
23-
flex-direction: column-reverse;
24+
flex-wrap: nowrap;
2425

2526
.icon {
27+
display: flex;
28+
align-items: center;
2629
color: var(--go-ui-color-primary-gray);
2730
font-size: var(--go-ui-height-compact-status-icon);
2831
}
@@ -34,19 +37,24 @@
3437
max-height: 90vh;
3538

3639
.content {
40+
display: flex;
3741
overflow: auto;
42+
gap: var(--go-ui-spacing-xl);
3843

3944
.readiness-container {
4045
display: flex;
4146
border-bottom: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator);
42-
padding-bottom: var(--go-ui-spacing-md);
43-
gap: var(--go-ui-spacing-md);
47+
padding-bottom: var(--go-ui-spacing-sm);
48+
gap: var(--go-ui-spacing-sm);
4449

4550
.readiness {
51+
align-items: center;
4652
flex: 1 0 0;
47-
flex-direction: column-reverse;
53+
flex-wrap: nowrap;
4854

4955
.icon {
56+
display: flex;
57+
align-items: center;
5058
color: var(--go-ui-color-primary-gray);
5159
font-size: var(--go-ui-height-compact-status-icon);
5260
}

app/src/views/SurgeOverview/EmergencyResponseUnit/EmergencyResponseUnitReadiness/NationalSocietyCard/i18n.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"emergencyResponseUnitOwnerNSCardDeployed": "{count} Deployed ERUs",
77
"eruNSSeeReadinessInfoButton": "See readiness info",
88
"eruTypesLabel": "ERU Type(s)",
9-
"eruNSEquipmentReadiness": "Equipment Readiness",
10-
"eruNSPeopleReadiness": "People Readiness",
11-
"eruNSFundingReadiness": "Funding Readiness",
9+
"eruNSEquipmentReadiness": "Equipment",
10+
"eruNSPeopleReadiness": "People",
11+
"eruNSFundingReadiness": "Funding",
1212
"eruNSReadinessInformationHeading": "Readiness Information by ERU Type"
1313
}
1414
}

0 commit comments

Comments
 (0)