Skip to content

Commit

Permalink
Fix not show my teams (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
haiphucnguyen authored Jan 31, 2025
1 parent 1a6a030 commit 8e7d7cc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/teams/team-dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const TeamDashboard = () => {
</TooltipContent>
</Tooltip>
<Heading
title="Team Dashboard"
title="Dashboard"
description="Overview of your team's performance and activities. Monitor team requests, progress, and key metrics at a glance"
/>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/components/teams/team-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ export const TeamList = () => {
fetchData();
};

const toggleUserTeamsFilter = (checked: boolean) => {
setFilterUserTeamsOnly(!!checked);
setCurrentPage(1); // Reset to first page
};

return (
<div className="grid grid-cols-1 gap-4">
<div className="flex flex-row justify-between items-center">
Expand All @@ -167,7 +172,7 @@ export const TeamList = () => {
<Checkbox
id="user-teams-only"
checked={filterUserTeamsOnly}
onCheckedChange={(checked) => setFilterUserTeamsOnly(!!checked)}
onCheckedChange={toggleUserTeamsFilter}
/>
<label htmlFor="user-teams-only" className="text-sm">
My Teams Only
Expand Down
2 changes: 1 addition & 1 deletion src/components/teams/team-requests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const TeamRequestsView = () => {
</TooltipContent>
</Tooltip>
<Heading
title={`Team Tickets (${totalElements})`}
title={`Tickets (${totalElements})`}
description="Monitor and handle your team's tickets. Stay on top of assignments and progress."
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/teams/team-users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const TeamUsersView = () => {
</TooltipContent>
</Tooltip>
<Heading
title={`Team Members (${totalMembers})`}
title={`Members (${totalMembers})`}
description="Browse and manage the members of your team. View roles, contact information, and more"
/>
</div>
Expand Down
18 changes: 15 additions & 3 deletions src/components/teams/team-workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,22 @@ const TeamWorkflowsView = () => {
<div className="grid grid-cols-1 gap-4">
<div className="flex items-center justify-between">
<div className="flex items-center gap-4">
<TeamAvatar imageUrl={team.logoUrl} size="w-20 h-20" />
<Tooltip>
<TooltipTrigger>
<TeamAvatar imageUrl={team.logoUrl} size="w-20 h-20" />
</TooltipTrigger>
<TooltipContent>
<div className="text-left">
<p className="font-bold">{team.name}</p>
<p className="text-sm text-gray-500">
{team.slogan ?? "Stronger Together"}
</p>
</div>
</TooltipContent>
</Tooltip>
<Heading
title={team.name}
description={team.slogan ?? "Stronger Together"}
title={`Workflows`}
description="All workflows are available in the team, allowing you to manage request processes, track progress, and automate transitions efficiently."
/>
</div>
{(PermissionUtils.canWrite(permissionLevel) ||
Expand Down

0 comments on commit 8e7d7cc

Please sign in to comment.