From b429f9ddcc2635c659371404357420e372d3be06 Mon Sep 17 00:00:00 2001 From: ashwinpraveengo Date: Thu, 19 Dec 2024 21:16:03 +0530 Subject: [PATCH] feat: Add conditional styling for tags based on completed status in Resource and Shifting sections --- src/components/Common/Export.tsx | 8 ++++++-- src/components/Kanban/Board.tsx | 16 ++++++++++++++-- src/components/Resource/ResourceBoard.tsx | 1 + src/components/Shifting/ShiftingBoard.tsx | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index 6cd786977ed..3dd8cbeeae6 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -113,7 +113,7 @@ export const ExportButton = ({ ...props }: ExportButtonProps) => { const { isExporting, exportFile } = useExport(); - + const isCompleted = props.tooltip?.toLowerCase() === "completed"; return ( <> ( } >
-
-
{section.title}
+
+
+ {section.id === "COMPLETED" ? ( + {section.title} + ) : ( + section.title + )} +
{typeof totalCount === "undefined" ? "..." : totalCount} diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index 39b6f5184e5..f15a6aa6d74 100644 --- a/src/components/Resource/ResourceBoard.tsx +++ b/src/components/Resource/ResourceBoard.tsx @@ -116,6 +116,7 @@ export default function BoardView() {

{board}{" "} { const { data } = await request( routes.downloadResourceRequests, diff --git a/src/components/Shifting/ShiftingBoard.tsx b/src/components/Shifting/ShiftingBoard.tsx index 068820d3311..c0fd4b116b1 100644 --- a/src/components/Shifting/ShiftingBoard.tsx +++ b/src/components/Shifting/ShiftingBoard.tsx @@ -147,6 +147,7 @@ export default function BoardView() {

{board.label || board.text}{" "} { const { data } = await request( routes.downloadShiftRequests,