Skip to content

Commit efa417d

Browse files
committed
fix: resolve all typing issues
1 parent 0f0b90d commit efa417d

8 files changed

Lines changed: 17 additions & 8 deletions

File tree

app/src/components/PerExportModal/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function PerExportModal(props: Props) {
4545
export_id: Number(perId),
4646
export_type: 'per' as const,
4747
per_country: Number(countryId),
48+
is_pga: undefined, // FIXME: this should be fixed in export endpoint
4849
}),
4950
[perId, countryId],
5051
);

app/src/components/SelectOutput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TextOutput } from '@ifrc-go/ui';
33
import { isDefined } from '@togglecorp/fujs';
44

55
interface Props<VALUE, OPTION> {
6-
className: string;
6+
className?: string;
77
value: VALUE | undefined;
88
options: OPTION[] | undefined;
99
keySelector: (datum: OPTION) => VALUE;

app/src/components/domain/DrefExportModal/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function DrefExportModal(props: Props) {
5858
export_type: type,
5959
selector: '#pdf-preview-ready',
6060
per_country: undefined, // FIXME: typing is altered by the useRequest function
61+
is_pga: undefined, // //FIXME: typing is altered by the useRequest function
6162
};
6263
},
6364
[id, applicationType],

app/src/views/EmergencySurge/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ export function Component() {
3838
<KeyFigure
3939
icon={<DeployedIcon />}
4040
className={styles.keyFigure}
41-
value={deploymentResponse?.active_deployments}
41+
value={deploymentResponse?.active_rapid_response_personnel}
4242
compactValue
4343
label={strings.emergencyActiveDeployments}
4444
/>
4545
<KeyFigure
4646
icon={<EmergencyResponseUnitIcon />}
4747
className={styles.keyFigure}
48-
value={deploymentResponse?.active_erus}
48+
value={deploymentResponse?.active_emergency_response_units}
4949
compactValue
5050
label={strings.emergencyActiveErus}
5151
/>

app/src/views/OperationalLearning/Sources/AllExtractsModal/Extract/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Props {
1515
emergencyName: string | null | undefined;
1616
appealDocumentURL: string;
1717
extract: string | null | undefined;
18-
operationStartDate: string;
18+
operationStartDate: string | null | undefined;
1919
}
2020
function Extract(props: Props) {
2121
const {

app/src/views/OperationalLearning/Stats/OperationalLearningMap/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function OperationalLearningMap(props: Props) {
8787
}
8888

8989
const features = learningByCountry
90-
.map((value) => {
90+
?.map((value) => {
9191
const country = countriesMap?.[value.country_id];
9292
if (isNotDefined(country)) {
9393
return undefined;

app/src/views/SurgeCatalogueBasecampOffice/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export function Component() {
6666
label={strings.compositionLabel}
6767
strongLabel
6868
/>
69-
<div>{strings.compositionDescription}</div>
7069
</SurgeContentContainer>
7170
<SurgeContentContainer
7271
heading={strings.standardComponents}

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
stringKeySelector,
2222
} from '@ifrc-go/ui/utils';
2323
import {
24+
compareString,
2425
isDefined,
2526
listToGroupList,
2627
mapToList,
@@ -88,6 +89,7 @@ function EmergencyResponseUnitReadiness() {
8889
url: '/api/v2/eru-readiness/',
8990
preserveResponse: true,
9091
query: {
92+
ordering: '-updated-at',
9193
eru_type: filter.selectEruTypes,
9294
eru_owner: filter.selectEruOwner,
9395
},
@@ -101,6 +103,7 @@ function EmergencyResponseUnitReadiness() {
101103
url: '/api/v2/eru-readiness-type/',
102104
preserveResponse: true,
103105
query: {
106+
ordering: '-updated-at',
104107
type: filter.selectEruTypes,
105108
eru_owner: filter.selectEruOwner,
106109
},
@@ -124,14 +127,19 @@ function EmergencyResponseUnitReadiness() {
124127
eruData,
125128
(eru) => eru.type,
126129
),
127-
(readinessList, eruType) => ({ key: eruType, readinessList }),
128-
)
130+
(readinessList, eruType) => ({
131+
key: eruType,
132+
readinessList,
133+
eruType: readinessList?.[0].type_display,
134+
}),
135+
)?.sort((a, b) => (compareString(a.eruType, b.eruType)))
129136
);
130137
}, [eruReadinessTypeResponse?.results]);
131138

132139
const eruRendererParams = useCallback((_: string, item: {
133140
key: string;
134141
readinessList: ReadinessList;
142+
updatedAt: number | undefined;
135143
}) => ({
136144
typeDisplay: item.readinessList?.[0]?.type_display,
137145
nationalSocieties: joinStrings(unique(item.readinessList.map((v) => (

0 commit comments

Comments
 (0)