From 9aa5a3e13c1d65ded9c01709ee6a9ca0ad40ce7b Mon Sep 17 00:00:00 2001 From: Arif Date: Fri, 2 Aug 2024 11:50:57 +0530 Subject: [PATCH 1/2] Issue-1388 chore: Bar diagram library RND and setup for showing attendance report --- src/pages/dashboard.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/dashboard.tsx b/src/pages/dashboard.tsx index 4cf4b858..4f9edcf5 100644 --- a/src/pages/dashboard.tsx +++ b/src/pages/dashboard.tsx @@ -86,7 +86,7 @@ const Dashboard: React.FC = () => { const formattedSevenDaysAgo = shortDateFormat(sevenDaysAgo); const [userId, setUserId] = React.useState(null); const [blockName, setBlockName] = React.useState(''); - + const role = localStorage.getItem('role'); useEffect(() => { setIsClient(true); const calculateDateRange = () => { @@ -873,9 +873,11 @@ const Dashboard: React.FC = () => { - - - + {role === 'Team Leader' && ( + + + + )} {/* Date: Fri, 2 Aug 2024 12:10:08 +0530 Subject: [PATCH 2/2] role fixes --- src/pages/dashboard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/dashboard.tsx b/src/pages/dashboard.tsx index 4f9edcf5..c3c9b01a 100644 --- a/src/pages/dashboard.tsx +++ b/src/pages/dashboard.tsx @@ -48,6 +48,7 @@ import calendar from '../assets/images/calendar.svg'; import Header from '../components/Header'; import Loader from '../components/Loader'; import useDeterminePathColor from '../hooks/useDeterminePathColor'; +import { Role } from '@/utils/app.constant'; interface DashboardProps {} @@ -873,7 +874,7 @@ const Dashboard: React.FC = () => { - {role === 'Team Leader' && ( + {role === Role.TEAM_LEADER && (