Skip to content

Commit

Permalink
[TM-1407] Small fixes in dashboard (#642)
Browse files Browse the repository at this point in the history
* [TM-1407] add no data available when no data for charts

* [TM-1407] change placeholder for dropdowns in dashboard

* [TM-1407] redirecto to project list when clicking link in dashboard top project section

* [TM-1407] remove reports from sidebar and change tooltip to coming soon for project insights

* [TM-1407] show programme names instead of frameworks

* [TM-1407] add blur container

* [TM-1407] add blur container

* [TM-1407] add component blur in dashboar

* [TM-1407] add framework and update reference for project details

* [TM-1407] add dummy data to show chart behind a blured div

* [TM-1407] add link text to redirect to project list and rename prefix on header

---------

Co-authored-by: Dotty <[email protected]>
  • Loading branch information
cesarLima1 and dottyy authored Nov 8, 2024
1 parent 9b30e77 commit 0df4856
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/pages/dashboard/components/HeaderDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const HeaderDashboard = (props: HeaderDashboardProps) => {
showSelectAll
showLabelAsMultiple
showClear
prefix={<Text variant="text-14-light">{t("Organization:")}</Text>}
prefix={<Text variant="text-14-light">{t("Organization Type:")}</Text>}
inputVariant="text-14-semibold"
multiSelect
variant={VARIANT_DROPDOWN_HEADER}
Expand Down
27 changes: 21 additions & 6 deletions src/pages/dashboard/components/SecDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useT } from "@transifex/react";
import classNames from "classnames";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { When } from "react-if";

Expand Down Expand Up @@ -63,6 +64,7 @@ const SecDashboard = ({
dataForChart?: any;
chartType?: string;
}) => {
const router = useRouter();
const [toggleValue, setToggleValue] = useState(0);
const [restorationGoalResume, setRestorationGoalResume] = useState<
{ name: string; value: number | undefined; color: string }[]
Expand All @@ -87,6 +89,10 @@ const SecDashboard = ({
}
];

const handleViewAllClick = () => {
router.push("/dashboard/project-list");
};

useEffect(() => {
if (data?.tableData) {
setToggleValue(1);
Expand Down Expand Up @@ -247,12 +253,21 @@ const SecDashboard = ({
<When condition={toggleValue === 0}>
<div className="w-full">
{data && (
<Table
data={data?.tableData ?? []}
hasPagination={false}
columns={tableColumns}
variant={VARIANT_TABLE_SITE_POLYGON_REVIEW}
/>
<>
<Table
data={data?.tableData ?? []}
hasPagination={false}
columns={tableColumns}
variant={VARIANT_TABLE_SITE_POLYGON_REVIEW}
/>
<Text
variant="text-14"
className="mt-1 cursor-pointer pt-2 pl-4 text-primary underline"
onClick={handleViewAllClick}
>
{t("VIEW ALL PROJECTS")}
</Text>
</>
)}
</div>
</When>
Expand Down

0 comments on commit 0df4856

Please sign in to comment.