Skip to content

Commit

Permalink
add info missing
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Dec 13, 2023
1 parent 8c6ee35 commit e596a39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions app/hooks/scenarios/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ export function useScenarioPU(
excluded: ScenarioPlanningUnit['id'][];
included: ScenarioPlanningUnit['id'][];
available: ScenarioPlanningUnit['id'][];
total: number;
}
>
) {
Expand Down Expand Up @@ -613,11 +614,13 @@ export function useScenarioPU(
const available = data
.filter((p) => p.inclusionStatus === 'available' && p.setByUser)
.map((p) => p.id);
const total = data.length;

return {
included,
excluded,
available,
total,
};
},
...queryOptions,
Expand Down
8 changes: 2 additions & 6 deletions app/layout/scenarios/reports/solutions/resume/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const ResumePage = (): JSX.Element => {

{projectQuery.data?.planningUnitAreakm2 && (
<div className={SECTION_CLASSES}>
<h3 className={TITLE_CLASSES}>Planning Area (KM2):</h3>
<h3 className={TITLE_CLASSES}>Planning Unit Grid Area (KM2):</h3>
<p className={TEXT_CLASSES}>{projectQuery.data?.planningUnitAreakm2}</p>
</div>
)}
Expand All @@ -75,11 +75,6 @@ export const ResumePage = (): JSX.Element => {
<p className={TEXT_CLASSES}>{projectQuery.data?.planningUnitGridShape}</p>
</div>
)}

<div className={SECTION_CLASSES}>
<h3 className={TITLE_CLASSES}>Planning Unit Grid Area:</h3>
<p className={TEXT_CLASSES}>{projectQuery.data.planningAreaName}</p>
</div>
</div>
<div>
<div className={SECTION_CLASSES}>
Expand All @@ -95,6 +90,7 @@ export const ResumePage = (): JSX.Element => {
<p className={TEXT_CLASSES}>Available PU: {PUDataQuery.data?.available.length}</p>
<p className={TEXT_CLASSES}>Included PU: {PUDataQuery.data?.included.length}</p>
<p className={TEXT_CLASSES}>Excluded PU: {PUDataQuery.data?.excluded.length}</p>
<p className={TEXT_CLASSES}>Total PU: {PUDataQuery.data?.total}</p>
</div>
</div>
</div>
Expand Down

0 comments on commit e596a39

Please sign in to comment.