Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TM-1601] comment species table in PD view
Browse files Browse the repository at this point in the history
cesarLima1 committed Jan 21, 2025
1 parent c96caa5 commit de7e3b6
Showing 2 changed files with 149 additions and 149 deletions.
146 changes: 73 additions & 73 deletions src/pages/reports/site-report/[uuid].page.tsx
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import PageCard from "@/components/extensive/PageElements/Card/PageCard";
import PageColumn from "@/components/extensive/PageElements/Column/PageColumn";
import PageFooter from "@/components/extensive/PageElements/Footer/PageFooter";
import PageRow from "@/components/extensive/PageElements/Row/PageRow";
import TreeSpeciesTablePD from "@/components/extensive/Tables/TreeSpeciesTablePD";
// import TreeSpeciesTablePD from "@/components/extensive/Tables/TreeSpeciesTablePD";
import Loader from "@/components/generic/Loading/Loader";
import LoadingContainer from "@/components/generic/Loading/LoadingContainer";
import { COLLECTION_SITE_PAID_OTHER, SITE_WORKDAY_COLLECTIONS } from "@/constants/workdayCollections";
@@ -65,75 +65,75 @@ const SiteReportDetailPage = () => {
"Site Workdays"
);

const dataTreeCount = [
{
name: ["Species scientific name", "tree"],
treeCount: "45,000"
},
{
name: ["Species scientific name", "Native species"],
treeCount: "45,000"
},
{
name: ["Species scientific name", "tree"],
treeCount: "10,350"
},
{
name: ["Species scientific name", "tree"],
treeCount: "7,500"
},
{
name: ["Non-scientific name", "tree"],
treeCount: "4,040"
},
{
name: ["Species scientific name", "tree"],
treeCount: "3,200"
},
{
name: ["Species scientific name", "new"],
treeCount: "3,000"
},
{
name: ["Species scientific name", "tree"],
treeCount: "0"
}
];
// const dataTreeCount = [
// {
// name: ["Species scientific name", "tree"],
// treeCount: "45,000"
// },
// {
// name: ["Species scientific name", "Native species"],
// treeCount: "45,000"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "10,350"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "7,500"
// },
// {
// name: ["Non-scientific name", "tree"],
// treeCount: "4,040"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "3,200"
// },
// {
// name: ["Species scientific name", "new"],
// treeCount: "3,000"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "0"
// }
// ];

const dataNonTreeCount = [
{
name: ["Species scientific name", "tree"],
nonTreeCount: "45,000"
},
{
name: ["Species scientific name", "Native species"],
nonTreeCount: "45,000"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "10,350"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "7,500"
},
{
name: ["Non-scientific name", "tree"],
nonTreeCount: "4,040"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "3,200"
},
{
name: ["Species scientific name", "new"],
nonTreeCount: "3,000"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "0"
}
];
// const dataNonTreeCount = [
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "45,000"
// },
// {
// name: ["Species scientific name", "Native species"],
// nonTreeCount: "45,000"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "10,350"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "7,500"
// },
// {
// name: ["Non-scientific name", "tree"],
// nonTreeCount: "4,040"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "3,200"
// },
// {
// name: ["Species scientific name", "new"],
// nonTreeCount: "3,000"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "0"
// }
// ];

return (
<FrameworkProvider frameworkKey={siteReport.framework_key}>
@@ -222,7 +222,7 @@ const SiteReportDetailPage = () => {
className="mb-5 mt-4 pr-[41px] lg:pr-[150px]"
/>
<div className="mb-2 border-b border-dashed border-blueCustom-700 pb-6">
<TreeSpeciesTablePD modelName="treeCount" data={dataTreeCount} />
{/* <TreeSpeciesTablePD modelName="treeCount" data={dataTreeCount} /> */}
</div>
</ContextCondition>
<ContextCondition frameworksShow={[Framework.HBF]}>
@@ -243,7 +243,7 @@ const SiteReportDetailPage = () => {
className="mb-5 mt-4 pr-[41px] lg:pr-[150px]"
/>
<div className="mb-2 border-b border-dashed border-blueCustom-700 pb-6">
<TreeSpeciesTablePD modelName="saplingsCount" data={dataTreeCount} />
{/* <TreeSpeciesTablePD modelName="saplingsCount" data={dataTreeCount} /> */}
</div>
</ContextCondition>
<ContextCondition frameworksHide={[Framework.TF]}>
@@ -264,7 +264,7 @@ const SiteReportDetailPage = () => {
className="mb-5 mt-4 pr-[41px] lg:pr-[150px]"
/>
<div className="mb-2 border-b border-dashed border-blueCustom-700 pb-6">
<TreeSpeciesTablePD modelName="saplingsCount" data={dataTreeCount} />
{/* <TreeSpeciesTablePD modelName="saplingsCount" data={dataTreeCount} /> */}
</div>
</ContextCondition>
<ContextCondition frameworksShow={[Framework.TF]}>
@@ -285,7 +285,7 @@ const SiteReportDetailPage = () => {
className="mb-5 mt-4 pr-[41px] lg:pr-[150px]"
/>
<div className="mb-2 border-b border-dashed border-blueCustom-700 pb-6">
<TreeSpeciesTablePD modelName="nonTreeCount" data={dataNonTreeCount} />
{/* <TreeSpeciesTablePD modelName="nonTreeCount" data={dataNonTreeCount} /> */}
</div>
</ContextCondition>
<div>
152 changes: 76 additions & 76 deletions src/pages/site/[uuid]/tabs/GoalsAndProgress.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useT } from "@transifex/react";
import { Else, If, Then, When } from "react-if";
import { When } from "react-if";

import GoalProgressCard from "@/components/elements/Cards/GoalProgressCard/GoalProgressCard";
import Text from "@/components/elements/Text/Text";
import { IconNames } from "@/components/extensive/Icon/Icon";
import PageBody from "@/components/extensive/PageElements/Body/PageBody";
import PageCard from "@/components/extensive/PageElements/Card/PageCard";
import PageRow from "@/components/extensive/PageElements/Row/PageRow";
import TreeSpeciesTablePD from "@/components/extensive/Tables/TreeSpeciesTablePD";
// import TreeSpeciesTablePD from "@/components/extensive/Tables/TreeSpeciesTablePD";
import { Framework } from "@/context/framework.provider";

interface GoalsAndProgressTabProps {
@@ -32,77 +32,77 @@ export const LABEL_LEGEND = [
const GoalsAndProgressTab = ({ site }: GoalsAndProgressTabProps) => {
const t = useT();

const dataTreeCount = [
{
name: ["Species scientific name", "tree"],
treeCount: "45,000"
},
{
name: ["Species scientific name", "Native species"],
treeCount: "45,000"
},
{
name: ["Species scientific name", "tree"],
treeCount: "10,350"
},
{
name: ["Species scientific name", "tree"],
treeCount: "7,500"
},
{
name: ["Non-scientific name", "tree"],
treeCount: "4,040"
},
{
name: ["Species scientific name", "tree"],
treeCount: "3,200"
},
{
name: ["Species scientific name", "new"],
treeCount: "3,000"
},
{
name: ["Species scientific name", "tree"],
treeCount: "0"
}
];
// const dataTreeCount = [
// {
// name: ["Species scientific name", "tree"],
// treeCount: "45,000"
// },
// {
// name: ["Species scientific name", "Native species"],
// treeCount: "45,000"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "10,350"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "7,500"
// },
// {
// name: ["Non-scientific name", "tree"],
// treeCount: "4,040"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "3,200"
// },
// {
// name: ["Species scientific name", "new"],
// treeCount: "3,000"
// },
// {
// name: ["Species scientific name", "tree"],
// treeCount: "0"
// }
// ];

const dataSeedCount = [
{
name: ["Species scientific name", "tree"],
seedCount: "45,000"
},
{
name: ["Species scientific name", "Native species"],
seedCount: "45,000"
},
{
name: ["Species scientific name", "tree"],
seedCount: "10,350"
},
{
name: ["Species scientific name", "tree"],
seedCount: "7,500"
}
];
const dataNonTreeCount = [
{
name: ["Species scientific name", "tree"],
nonTreeCount: "45,000"
},
{
name: ["Species scientific name", "Native species"],
nonTreeCount: "45,000"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "10,350"
},
{
name: ["Species scientific name", "tree"],
nonTreeCount: "7,500"
}
];
// const dataSeedCount = [
// {
// name: ["Species scientific name", "tree"],
// seedCount: "45,000"
// },
// {
// name: ["Species scientific name", "Native species"],
// seedCount: "45,000"
// },
// {
// name: ["Species scientific name", "tree"],
// seedCount: "10,350"
// },
// {
// name: ["Species scientific name", "tree"],
// seedCount: "7,500"
// }
// ];
// const dataNonTreeCount = [
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "45,000"
// },
// {
// name: ["Species scientific name", "Native species"],
// nonTreeCount: "45,000"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "10,350"
// },
// {
// name: ["Species scientific name", "tree"],
// nonTreeCount: "7,500"
// }
// ];

return (
<PageBody>
@@ -264,9 +264,9 @@ const GoalsAndProgressTab = ({ site }: GoalsAndProgressTabProps) => {
<img src="/images/graphic-2.png" alt="progress" className="mt-8 w-full" />
</div>
</div>
<div>
{/* <div>
<TreeSpeciesTablePD modelName="treeCount" data={dataTreeCount} />
</div>
</div> */}
</div>
</PageCard>
</PageRow>
@@ -374,14 +374,14 @@ const GoalsAndProgressTab = ({ site }: GoalsAndProgressTabProps) => {
</When>
</div>
<div>
<If condition={site.framework_key === Framework.TF}>
{/* <If condition={site.framework_key === Framework.TF}>
<Then>
<TreeSpeciesTablePD modelName="nonTreeCount" data={dataNonTreeCount} />
</Then>
<Else>
<TreeSpeciesTablePD modelName="seedCount" data={dataSeedCount} />
</Else>
</If>
</If> */}
</div>
</div>
</PageCard>

0 comments on commit de7e3b6

Please sign in to comment.