diff --git a/apps/web/app/[locale]/page-component.tsx b/apps/web/app/[locale]/page-component.tsx index 0841dfee7..17892dd2a 100644 --- a/apps/web/app/[locale]/page-component.tsx +++ b/apps/web/app/[locale]/page-component.tsx @@ -7,7 +7,7 @@ import { useOrganizationTeams } from '@app/hooks'; import { clsxm } from '@app/utils'; import NoTeam from '@components/pages/main/no-team'; import { withAuthentication } from 'lib/app/authenticator'; -import { Breadcrumb, Card, Container } from 'lib/components'; +import { Breadcrumb, Card } from 'lib/components'; import { AuthUserTaskInput, TeamInvitations, TeamMembers, Timer, UnverifiedEmail } from 'lib/features'; import { MainHeader, MainLayout } from 'lib/layout'; import { IssuesView } from '@app/constants'; @@ -28,6 +28,7 @@ import HeaderTabs from '@components/pages/main/header-tabs'; import { headerTabs } from '@app/stores/header-tabs'; import { usePathname } from 'next/navigation'; import { PeoplesIcon } from 'assets/svg'; +import TeamMemberHeader from 'lib/features/team-member-header'; function MainPage() { const t = useTranslations(); @@ -60,7 +61,7 @@ function MainPage() { <> - +
@@ -73,14 +74,12 @@ function MainPage() { + {isTeamMember ? : null} + {/*
*/} - - {isTeamMember ? : null} - {isTeamMember ? : } - - + {isTeamMember ? : } diff --git a/apps/web/components/ui/data-table.tsx b/apps/web/components/ui/data-table.tsx index 094216675..b0a2b3e9e 100644 --- a/apps/web/components/ui/data-table.tsx +++ b/apps/web/components/ui/data-table.tsx @@ -61,9 +61,9 @@ function DataTable({ columns, data, footerRows, isHeader }: DataT getFacetedUniqueValues: getFacetedUniqueValues() }); return ( - +
{isHeader && ( - + {table.getHeaderGroups().map((headerGroup) => ( {headerGroup.headers.map((header, index) => { diff --git a/apps/web/lib/features/team-member-header.tsx b/apps/web/lib/features/team-member-header.tsx new file mode 100644 index 000000000..ee9931e9b --- /dev/null +++ b/apps/web/lib/features/team-member-header.tsx @@ -0,0 +1,34 @@ +import { IssuesView } from '@app/constants'; +import React from 'react'; +import { UserTeamCardHeader } from './team/user-team-card/task-skeleton'; +import { UserTeamBlockHeader } from './team/user-team-block/user-team-block-header'; +import { Container } from 'lib/components'; +import { useRecoilValue } from 'recoil'; +import { fullWidthState } from '@app/stores/fullWidth'; +import UserTeamTableHeader from './team/user-team-table/user-team-table-header'; + +function TeamMemberHeader({ view }: { view: IssuesView }) { + const fullWidth = useRecoilValue(fullWidthState); + let header; + switch (true) { + case view == IssuesView.CARDS: + header = ; + break; + case view == IssuesView.TABLE: + header = ; + break; + case view == IssuesView.BLOCKS: + header = ; + break; + default: + header = ; + break; + } + return ( + + {header} + + ); +} + +export default TeamMemberHeader; diff --git a/apps/web/lib/features/team-members-block-view.tsx b/apps/web/lib/features/team-members-block-view.tsx index bb2ba61dd..0ef7bad86 100644 --- a/apps/web/lib/features/team-members-block-view.tsx +++ b/apps/web/lib/features/team-members-block-view.tsx @@ -5,7 +5,6 @@ import { UserTeamBlock } from './team/user-team-block'; import { useRecoilValue } from 'recoil'; import { taskBlockFilterState } from '@app/stores/task-filter'; import { UserTeamCardSkeleton } from './team/user-team-card/task-skeleton'; -import { UserTeamBlockHeader } from './team/user-team-block/user-team-block-header'; interface Props { teamMembers: OT_Member[]; @@ -41,9 +40,6 @@ const TeamMembersBlockView: React.FC = ({ return ( <> - -
-
{/* Current authenticated user members */} = ({ return ( <> -
- -
-
    {/* Current authenticated user members */} []} data={sortedTeamMembers} noResultsMessage={{ diff --git a/apps/web/lib/features/team-members.tsx b/apps/web/lib/features/team-members.tsx index d480926fb..e23dea7c5 100644 --- a/apps/web/lib/features/team-members.tsx +++ b/apps/web/lib/features/team-members.tsx @@ -10,6 +10,8 @@ import TeamMembersBlockView from './team-members-block-view'; import { useRecoilValue } from 'recoil'; import { taskBlockFilterState } from '@app/stores/task-filter'; import { OT_Member } from '@app/interfaces'; +import { Container } from 'lib/components'; +import { fullWidthState } from '@app/stores/fullWidth'; type TeamMembersProps = { publicTeam?: boolean; @@ -19,6 +21,7 @@ type TeamMembersProps = { export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView.CARDS }: TeamMembersProps) { const { user } = useAuthenticateUser(); const activeFilter = useRecoilValue(taskBlockFilterState); + const fullWidth = useRecoilValue(fullWidthState); const { activeTeam } = useOrganizationTeams(); const { teamsFetching } = useOrganizationTeams(); const members = activeTeam?.members || []; @@ -45,7 +48,7 @@ export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView. switch (true) { case members.length === 0: teamMembersView = ( -
    +
    @@ -55,58 +58,66 @@ export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView.
    -
    + ); break; case view === IssuesView.CARDS: teamMembersView = ( - - ); - break; - case view === IssuesView.TABLE: - teamMembersView = ( - - + - + + ); + break; + case view === IssuesView.TABLE: + teamMembersView = ( + + + + + ); break; case view == IssuesView.BLOCKS: teamMembersView = ( - + + + ); break; default: teamMembersView = ( - + + + ); } return teamMembersView; diff --git a/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx b/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx index 3ad755f58..a94d3a2ea 100644 --- a/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx +++ b/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx @@ -46,7 +46,7 @@ export function UserTeamBlockHeader() { return ( <> -
    +
    +

    {t('common.NAME')}

    @@ -53,7 +57,12 @@ export function UserTeamCardHeader() { {/*
    */} -
    +
    @@ -64,7 +73,14 @@ export function UserTeamCardHeader() {
    -
    {t('common.ESTIMATE')}
    +
    + {t('common.ESTIMATE')} +
    {t('task.taskTableHead.TOTAL_WORK.TITLE')} diff --git a/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx b/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx index 6c706626e..981864526 100644 --- a/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx +++ b/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx @@ -1,13 +1,19 @@ +import { fullWidthState } from '@app/stores/fullWidth'; +import { clsxm } from '@app/utils'; import React from 'react'; +import { useRecoilValue } from 'recoil'; function UserTeamTableHeader() { + const fullWidth = useRecoilValue(fullWidthState); return ( -
    +

    Name

    Task

    -

    Worked on Task

    -

    Estimate

    -

    Action

    +

    + Worked on Task +

    +

    Estimate

    +

    Action

    ); } diff --git a/apps/web/lib/layout/main-header.tsx b/apps/web/lib/layout/main-header.tsx index 2b9b7d6dd..354d21bc8 100644 --- a/apps/web/lib/layout/main-header.tsx +++ b/apps/web/lib/layout/main-header.tsx @@ -6,7 +6,13 @@ import { PropsWithChildren } from 'react'; export function MainHeader({ children, className, fullWidth }: PropsWithChildren) { return ( <> -
    +
    {children}
    {/* */}