Skip to content

Commit

Permalink
[TM-1562] add replanting collection and some changes (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
LimberHope authored Dec 19, 2024
1 parent f73b765 commit c8778e3
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/pages/reports/site-report/[uuid].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TextField from "@/components/elements/Field/TextField";
import Paper from "@/components/elements/Paper/Paper";
import Text from "@/components/elements/Text/Text";
import EntityMapAndGalleryCard from "@/components/extensive/EntityMapAndGalleryCard/EntityMapAndGalleryCard";
import Icon, { IconNames } from "@/components/extensive/Icon/Icon";
import { IconNames } from "@/components/extensive/Icon/Icon";
import PageBody from "@/components/extensive/PageElements/Body/PageBody";
import PageBreadcrumbs from "@/components/extensive/PageElements/Breadcrumbs/PageBreadcrumbs";
import PageCard from "@/components/extensive/PageElements/Card/PageCard";
Expand Down Expand Up @@ -152,29 +152,25 @@ const SiteReportDetailPage = () => {
uuid={siteReportUUID}
entity={"site-report" as EstablishmentEntityType}
total={siteReport.total_non_tree_species_planted_count}
totalText={t("TOTAL SEEDS PLANTED (ON REPORT)")}
totalText={t("TOTAL NON-TREES SPECIES PLANTED (ON REPORT)")}
title={t("Non-Trees Planted")}
countColumnName={t("NON-TREE COUNT")}
collection="non-tree"
/>
<TreeSpeciesTableTF
uuid={siteReportUUID}
entity={"site-report" as EstablishmentEntityType}
total={siteReport.total_tree_replanting_count}
totalText={t("TOTAL TREE REPLANTING (ON REPORT)")}
title={t("Tree Replanting")}
countColumnName={t("TREE REPLANTING COUNT")}
collection="replanting"
/>
<Box paddingX={3} paddingY={1}>
<Text variant="text-24-bold" className="text-darkCustom">
{t("Assisted Natural Regeneration")}
</Text>
</Box>
<Box paddingX={3} paddingY={1}>
<div className="flex items-center gap-1">
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-[#00000008]">
<Icon name={IconNames.ASSISTED_NATURAL_REGENERATION} className="text-primary" />
</div>
<Text variant="text-16-semibold" className="text-grey-500">
{t("ESTIMATED NUMBER OF TREES REGENERATING (ON REPORT)")}:
</Text>
<Text variant="text-24-bold" className="text-black">
{new Intl.NumberFormat("en-US").format(siteReport.total_trees_planted_count!) ?? "N/A"}
</Text>
</div>
</Box>
<Box paddingX={3} paddingY={1}>
<Text variant="text-16-semibold" className="text-grey-500">
{t("DESCRIPTION OF ANR ACTIVITIES")}:
Expand All @@ -192,7 +188,7 @@ const SiteReportDetailPage = () => {
/>
<TreeSpeciesTable modelName="site-report" modelUUID={siteReportUUID} collection="tree-planted" />
</GenericField>
<GenericField label={t("Direct Seeding")} frameworksHide={[Framework.HBF]}>
<GenericField label={t("Direct Seeding")} frameworksShow={[Framework.PPC]}>
<TextField
className="mt-2"
label={t("Total Direct Seedings")}
Expand Down

0 comments on commit c8778e3

Please sign in to comment.