Skip to content

Commit f8906f8

Browse files
committed
fix(typing): Fix existing typing issues
1 parent 5b283d2 commit f8906f8

File tree

8 files changed

+16
-8
lines changed

8 files changed

+16
-8
lines changed

app/src/components/PerExportModal/index.tsx

+1
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: false,
4849
}),
4950
[perId, countryId],
5051
);

app/src/components/SelectOutput/index.tsx

+1-1
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ function DrefExportModal(props: Props) {
5757
export_id: id,
5858
export_type: type,
5959
selector: '#pdf-preview-ready',
60-
per_country: undefined, // FIXME: typing is altered by the useRequest function
60+
per_country: undefined,
61+
is_pga: false,
6162
};
6263
},
6364
[id, applicationType],

app/src/views/AccountMyFormsDref/DrefTableActions/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ function DrefTableActions(props: Props) {
142142
allocationRequested: response?.additional_allocation,
143143
previousAllocation: response?.dref_allocated_so_far ?? 0,
144144
totalDREFAllocation: response?.total_dref_allocation,
145+
noOfPeopleTargeted: response?.number_of_people_targeted,
145146
toBeAllocatedFrom:
146147
response?.type_of_dref_display === 'Imminent'
147148
// FIXME: can't compare imminent with Anticipatory Pillar

app/src/views/DrefOperationalUpdateForm/schema.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ export type OpsUpdateRequestBody = GoApiBody<'/api/v2/dref-op-update/{id}/', 'PA
5252
};
5353

5454
type NeedIdentifiedResponse = NonNullable<OpsUpdateRequestBody['needs_identified']>[number];
55+
type NsActionResponse = NonNullable<OpsUpdateRequestBody['national_society_actions']>[number];
5556
type InterventionResponse = NonNullable<OpsUpdateRequestBody['planned_interventions']>[number];
5657
type IndicatorResponse = NonNullable<InterventionResponse['indicators']>[number];
5758
type RiskSecurityResponse = NonNullable<OpsUpdateRequestBody['risk_security']>[number];
5859
type ImagesFileResponse = NonNullable<OpsUpdateRequestBody['images_file']>[number];
5960
type SourceInformationResponse = NonNullable<OpsUpdateRequestBody['source_information']>[number];
6061

6162
type NeedIdentifiedFormFields = NeedIdentifiedResponse & { client_id: string };
63+
type NsActionFormFields = NsActionResponse & { client_id: string; }
6264
type InterventionFormFields = InterventionResponse & { client_id: string };
6365
type IndicatorFormFields = IndicatorResponse & { client_id: string };
6466
type SourceInformationFormFields = SourceInformationResponse & { client_id: string };
@@ -81,9 +83,13 @@ type OpsUpdateFormFields = (
8183
DeepReplace<
8284
DeepReplace<
8385
DeepReplace<
84-
OpsUpdateRequestBody,
85-
NeedIdentifiedResponse,
86-
NeedIdentifiedFormFields
86+
DeepReplace<
87+
OpsUpdateRequestBody,
88+
NeedIdentifiedResponse,
89+
NeedIdentifiedFormFields
90+
>,
91+
NsActionResponse,
92+
NsActionFormFields
8793
>,
8894
InterventionResponse,
8995
InterventionFormFields

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

+1-1
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

+1-1
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

-1
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}

0 commit comments

Comments
 (0)