Skip to content

Commit

Permalink
attempt to add new flood report form fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wadhwamatic committed Sep 19, 2024
1 parent b75055b commit 0f3332f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import {
const colWidth = 8 * 9;

const AgricultureColumns: GridColDef[] = [
getColumnSetup({
field: FloodSpecific.ToNamAgriAff,
disaster: FLOOD,
width: colWidth + 8 * 2,
}),
getColumnSetup({
field: FloodSpecific.NumFarmCroAff,
disaster: FLOOD,
width: colWidth + 8 * 2,
}),
getColumnSetup({
field: FloodSpecific.FarmAff,
disaster: FLOOD,
Expand All @@ -23,6 +33,7 @@ const AgricultureColumns: GridColDef[] = [
}),
getColumnSetup({ field: FloodSpecific.SamNabAff, disaster: FLOOD }),
getColumnSetup({ field: FloodSpecific.SamNabDam, disaster: FLOOD }),
getColumnSetup({ field: FloodSpecific.NumFarmPaddyAff, disaster: FLOOD }),
getColumnSetup({ field: FloodSpecific.PaddyAff, disaster: FLOOD }),
getColumnSetup({ field: FloodSpecific.PaddyDam, disaster: FLOOD }),
getColumnSetup({ field: FloodSpecific.CowEva, disaster: FLOOD }),
Expand All @@ -37,6 +48,13 @@ const AgricultureColumns: GridColDef[] = [
];

const AgricultureColumnGroup: GridColumnGroupingModel = [
{
...getGroupSetup('families', FLOOD),
children: [
{ field: FloodSpecific.ToNamAgriAff },
{ field: FloodSpecific.NumFarmCroAff },
],
},
{
...getGroupSetup('plantation', FLOOD),
children: [
Expand All @@ -47,6 +65,7 @@ const AgricultureColumnGroup: GridColumnGroupingModel = [
{
...getGroupSetup('seedling', FLOOD),
children: [
{ field: FloodSpecific.NumFarmPaddyAff },
{ field: FloodSpecific.SamNabAff },
{ field: FloodSpecific.SamNabDam },
],
Expand Down
5 changes: 5 additions & 0 deletions apps/frontend/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,11 @@
"NumWareHDam": "Damaged",
"NumCraftAff": "Affected",
"NumCraftDam": "Damaged",
"ToNamAgriAff": "Affected",
"NumFarmCroAff": "Affected",
"FarmAff": "Affected",
"FarmDam": "Damaged",
"NumFarmPaddyAff": "Affected",
"SamNabAff": "Affected",
"SamNabDam": "Damaged",
"PaddyAff": "Affected",
Expand Down Expand Up @@ -548,6 +551,8 @@
"NumFe": "Women Missing Water",
"TNumDeath": "Total Death Toll",
"FamAgriAff": "Families with Affected Plantations",
"ToNamAgriAff": "Total number of households affecting farmland",
"NumFarmCroAff": "Number of households affected by mixed crops",
"FarmAff": "Crop/Subsidiary plants Affected (ha)",
"FarmDam": "Crop/Subsidiary plants Damaged (ha)",
"SamNabAff": "Seedlings Affected (ha)",
Expand Down
3 changes: 3 additions & 0 deletions packages/interfaces/src/kobo/FloodDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export class FloodDto {
@IsOptional() @IsNumberString() readonly 'g10/g10_8/NumCraftDam'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_1/FarmAff'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_1/FarmDam'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_1/ToNamAgriAff'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_1/NumFarmCroAff'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_2/NumFarmPaddyAff'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_2/SamNabAff'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_2/SamNabDam'?: string;
@IsOptional() @IsNumberString() readonly 'g11/g11_3/PaddyAff'?: string;
Expand Down

0 comments on commit 0f3332f

Please sign in to comment.