diff --git a/index.html b/index.html index 14fa5017..dd8569fd 100644 --- a/index.html +++ b/index.html @@ -52,9 +52,9 @@ } - + - + diff --git a/src/assets/styles/genericStyles.scss b/src/assets/styles/genericStyles.scss index 3cc298d4..02a2267f 100644 --- a/src/assets/styles/genericStyles.scss +++ b/src/assets/styles/genericStyles.scss @@ -122,3 +122,10 @@ font-style: normal; letter-spacing: -0.0125em; } + +.teamLeadContainer { + .ag-header-cell, + .ag-header-group-cell { + padding-right: 0px !important; + } +} diff --git a/src/components/TopNavBar/TopNavBar.tsx b/src/components/TopNavBar/TopNavBar.tsx index a0187acf..37993616 100644 --- a/src/components/TopNavBar/TopNavBar.tsx +++ b/src/components/TopNavBar/TopNavBar.tsx @@ -26,18 +26,30 @@ const TopNavBar = ({ isDc97User, isAgentDashboard }: ITopNavbarProps) => { const navigate = useNavigate(); const currentPath = useLocation().pathname; const isCasesListingPage = useLocation().pathname === APP_ROUTES.CASES.path; - const { isPlayerVisible, isPerformanceDashboardVisible } = useSelector((state: RootState) => ({ - isPlayerVisible: state.common.globalPlayer?.visible, - isPerformanceDashboardVisible: state.common.isPerformanceDashboardVisible - })); + const hideForTLCase = useLocation().pathname === APP_ROUTES.TEAM_LEAD_DASHBOARD.path; + const { isPlayerVisible, isPerformanceDashboardVisible, isTeamLead } = useSelector( + (state: RootState) => ({ + isPlayerVisible: state.common.globalPlayer?.visible, + isPerformanceDashboardVisible: state.common.isPerformanceDashboardVisible, + isTeamLead: state.common.isTeamLead + }) + ); const navigateToCases = useCallback(() => { + let url: string; addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.LH_CaseDetails_BackButtonClick); - const url = (document.getElementById(APP_ROUTES.CASES.path) as HTMLAnchorElement).href.split( + if (isTeamLead) { + url = ( + document.getElementById(APP_ROUTES.TEAM_LEAD_DASHBOARD.path) as HTMLAnchorElement + ).href.split(APP_ROUTES.TEAM_LEAD_DASHBOARD.path)[1]; + return navigate(APP_ROUTES.TEAM_LEAD_DASHBOARD.path + `${url}`); + } + + url = (document.getElementById(APP_ROUTES.CASES.path) as HTMLAnchorElement).href.split( APP_ROUTES.CASES.path )[1]; navigate(APP_ROUTES.CASES.path + `?${url}`); - }, []); + }, [isTeamLead]); const toggleNotifications = (show: boolean) => { setShowNotifications(show); @@ -50,8 +62,8 @@ const TopNavBar = ({ isDc97User, isAgentDashboard }: ITopNavbarProps) => { setShowCaseHistory(show); }; - const hideBackButton = isCasesListingPage || isDc97User || isAgentDashboard; - const showTopNavItems = !isDc97User && !isPerformanceDashboardVisible; + const hideBackButton = isCasesListingPage || isDc97User || isAgentDashboard || hideForTLCase; + const showTopNavItems = !isDc97User && !isPerformanceDashboardVisible && !isTeamLead; return (