From 8b4abeb21d586eb60b434f698a109463133afd34 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 5 Dec 2024 20:44:40 +0200 Subject: [PATCH] fix: fix header scroll and card items in the table view - all teams page --- apps/web/app/[locale]/all-teams/component.tsx | 84 ++++++++++--------- .../all-teams/users-teams-card/user-card.tsx | 14 ++-- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/apps/web/app/[locale]/all-teams/component.tsx b/apps/web/app/[locale]/all-teams/component.tsx index 184a9a59f..a62530752 100644 --- a/apps/web/app/[locale]/all-teams/component.tsx +++ b/apps/web/app/[locale]/all-teams/component.tsx @@ -5,7 +5,7 @@ import { useAtomValue } from 'jotai'; import { fullWidthState } from '@app/stores/fullWidth'; import { withAuthentication } from 'lib/app/authenticator'; import { Breadcrumb, Container } from 'lib/components'; -import { MainHeader, MainLayout } from 'lib/layout'; +import { MainLayout } from 'lib/layout'; import { useOrganizationAndTeamManagers } from '@app/hooks/features/useOrganizationTeamManagers'; import { useEffect } from 'react'; import { useTranslations } from 'next-intl'; @@ -18,55 +18,57 @@ import { MemberFilter } from 'lib/features/all-teams/all-team-members-filter'; import { useOrganizationTeams } from '@app/hooks'; function AllTeamsPage() { - const t = useTranslations(); - const fullWidth = useAtomValue(fullWidthState); - const view = useAtomValue(allTeamsHeaderTabs); - const { filteredTeams, userManagedTeams } = useOrganizationAndTeamManagers(); - const { isTrackingEnabled } = useOrganizationTeams(); + const t = useTranslations(); + const fullWidth = useAtomValue(fullWidthState); + const view = useAtomValue(allTeamsHeaderTabs); + const { filteredTeams, userManagedTeams } = useOrganizationAndTeamManagers(); + const { isTrackingEnabled } = useOrganizationTeams(); - const breadcrumb = [ - { title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' }, - { title: t('common.ALL_TEAMS'), href: '/all-teams' } - ]; + const breadcrumb = [ + { title: JSON.parse(t('pages.home.BREADCRUMB')), href: '/' }, + { title: t('common.ALL_TEAMS'), href: '/all-teams' } + ]; - /* If the user is not a manager in any team or if he's + /* If the user is not a manager in any team or if he's manager in only one team, then redirect him to the home page */ - if (userManagedTeams.length < 2) return ; + if (userManagedTeams.length < 2) return ; - return ( - - - {/* Breadcrumb */} -
- -
-
- -
- -
-
- -
- - - -
- ); + return ( + +
+ +
+
+ +
+ +
+
+ + {view == IssuesView.CARDS && } + + } + > + + + +
+ ); } function RedirectUser() { - const router = useRouter(); - useEffect(() => { - router.push('/'); - }, [router]); - return <>; + const router = useRouter(); + useEffect(() => { + router.push('/'); + }, [router]); + return <>; } export default withAuthentication(AllTeamsPage, { - displayName: 'AllManagedTeams' + displayName: 'AllManagedTeams' }); diff --git a/apps/web/lib/features/all-teams/users-teams-card/user-card.tsx b/apps/web/lib/features/all-teams/users-teams-card/user-card.tsx index 1920fee16..7e922dc24 100644 --- a/apps/web/lib/features/all-teams/users-teams-card/user-card.tsx +++ b/apps/web/lib/features/all-teams/users-teams-card/user-card.tsx @@ -34,38 +34,38 @@ export default function UserTeamCard({ className )} > -
+
{/* User information */} -
+
{/* Task information */} -
+
- + {/* Task worked Times */} - + {/* Task estimate Info */} - + - + {/* Card Menu */}