Skip to content

Commit 4e401fe

Browse files
samsharafrozenhelium
authored andcommitted
feat: eru readiness ui updates
1 parent b057075 commit 4e401fe

5 files changed

Lines changed: 20 additions & 10 deletions

File tree

app/src/components/DisplayName/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
interface DisplayNameOuputProps {
1+
interface DisplayNameOutputProps {
22
name: string;
33
}
44

5-
function DisplayName({ name }: DisplayNameOuputProps) {
5+
function DisplayName({ name }: DisplayNameOutputProps) {
66
return name;
77
}
88

app/src/utils/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,7 @@ export const multiMonthSelectDefaultValue = listToMap(
208208
(key) => key,
209209
() => false,
210210
);
211+
212+
export const ERU_READINESS_READY = 1;
213+
export const ERU_READINESS_CAN_CONTRIBUTE = 2;
214+
export const ERU_READINESS_NO_CAPACITY = 3;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"deploymentEndDate": "Deployment End Date",
1515
"emergencyTimeline": "Emergency Timeline",
1616
"deploymentDate": "Deployment Timeline",
17-
"rapidReponseDeploymentCountry": "Deployed To"
17+
"rapidResponseDeploymentCountry": "Deployed To"
1818
}
1919
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function OngoingRapidResponseDeployments() {
143143
),
144144
createStringColumn<RapidResponseByEventItem, number>(
145145
'country',
146-
strings.rapidReponseDeploymentCountry,
146+
strings.rapidResponseDeploymentCountry,
147147
() => '',
148148
{
149149
defaultEmptyValue: '',
@@ -184,7 +184,7 @@ function OngoingRapidResponseDeployments() {
184184
strings.rapidResponseEmergency,
185185
strings.rapidResponsePosition,
186186
strings.rapidResponseDeployingOrganisation,
187-
strings.rapidReponseDeploymentCountry,
187+
strings.rapidResponseDeploymentCountry,
188188
strings.emergencyEndDate,
189189
strings.emergencyStartDate,
190190
strings.deploymentStartDate,
@@ -217,7 +217,7 @@ function OngoingRapidResponseDeployments() {
217217
),
218218
createLinkColumn<Personnel, number>(
219219
'country',
220-
strings.rapidReponseDeploymentCountry,
220+
strings.rapidResponseDeploymentCountry,
221221
(item) => item?.country_deployed_to?.name,
222222
(item) => ({
223223
to: 'countriesLayout',
@@ -242,7 +242,7 @@ function OngoingRapidResponseDeployments() {
242242
strings.rapidResponseRole,
243243
strings.rapidResponseName,
244244
strings.rapidResponseOrganisation,
245-
strings.rapidReponseDeploymentCountry,
245+
strings.rapidResponseDeploymentCountry,
246246
],
247247
);
248248

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ import {
33
CloseCircleLineIcon,
44
} from '@ifrc-go/icons';
55

6+
import {
7+
ERU_READINESS_CAN_CONTRIBUTE,
8+
ERU_READINESS_NO_CAPACITY,
9+
ERU_READINESS_READY,
10+
} from '#utils/constants';
11+
612
import styles from './styles.module.css';
713

814
interface ReadinessIconProps {
915
readiness: number | undefined;
1016
}
1117

1218
function ReadinessIcon({ readiness }: ReadinessIconProps) {
13-
if (readiness === 3) {
19+
if (readiness === ERU_READINESS_NO_CAPACITY) {
1420
return <CloseCircleLineIcon className={styles.redIcon} />;
1521
}
16-
if (readiness === 2) {
22+
if (readiness === ERU_READINESS_CAN_CONTRIBUTE) {
1723
return <CheckboxCircleLineIcon className={styles.yellowIcon} />;
1824
}
19-
if (readiness === 1) {
25+
if (readiness === ERU_READINESS_READY) {
2026
return <CheckboxCircleLineIcon className={styles.greenIcon} />;
2127
}
2228
return <CheckboxCircleLineIcon className={styles.grayIcon} />;

0 commit comments

Comments
 (0)