Skip to content

Commit

Permalink
[Bugfix] Adjusted Team Member Card layout to use available space effe…
Browse files Browse the repository at this point in the history
…ctively (#3467)
  • Loading branch information
Innocent-Akim committed Jan 10, 2025
1 parent eb05f70 commit afb6967
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
22 changes: 12 additions & 10 deletions apps/web/app/[locale]/all-teams/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ function AllTeamsPage() {
showTimer={isTrackingEnabled}
className="items-start"
mainHeaderSlot={
<div className="flex w-full flex-col items-start justify-between">
<div className="w-full flex items-center justify-between py-2 px-4">
<Breadcrumb paths={breadcrumb} className="text-sm" />
<div className="flex self-end items-center gap-2">
<div className="flex items-center justify-center h-10 gap-1 w-max">
<HeaderTabs />
<Container fullWidth={fullWidth} className="mx-auto">
<div className="flex w-full flex-col items-start justify-between">
<div className="w-full flex items-center justify-between py-2 px-4">
<Breadcrumb paths={breadcrumb} className="text-sm" />
<div className="flex self-end items-center gap-2">
<div className="flex items-center justify-center h-10 gap-1 w-max">
<HeaderTabs />
</div>
<MemberFilter />
</div>
<MemberFilter />
</div>
</div>

{view == IssuesView.CARDS && <TeamMemberHeader view={IssuesView.CARDS} />}
</div>
{view == IssuesView.CARDS && <TeamMemberHeader view={IssuesView.CARDS} />}
</div>
</Container>
}
>
<Container fullWidth={fullWidth} className="mx-auto mt-5">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/features/all-teams-members-block-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function AllTeamsMembersBlockView({ teams }: { teams: IOrganizati
return (
<>
{employeesArray.length > 0 ? (
<div className="flex w-full flex-wrap items-start">{
<div className="flex w-full flex-wrap items-start justify-center">{
employeesArray.map((employee) =>
<div className="px-2" key={employee.id}>
<UserTeamBlockCard key={employee.id} member={employee} />
Expand Down
6 changes: 3 additions & 3 deletions apps/web/lib/settings/working-hours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const WorkingHours: React.FC<WorkScheduleProps> = ({ initialSchedule }) =
if (!user?.timeZone) {
handleChangeTimezone(undefined);
}
}, [currentTimezone, setValue, handleChangeTimezone]);
}, [currentTimezone, setValue, handleChangeTimezone, user?.timeZone]);

React.useEffect(() => {
setValue(
Expand Down Expand Up @@ -99,7 +99,7 @@ export const WorkingHours: React.FC<WorkScheduleProps> = ({ initialSchedule }) =
/>
</div>
{schedule.map((workDay, index) => (
<div key={workDay.day} className="flex items-center space-x-4 gap-4">
<div key={workDay.day} className="flex gap-4 items-center space-x-4">
<div className="w-32">
<label className="inline-flex items-center">
<ToggleSwitch
Expand Down Expand Up @@ -150,7 +150,7 @@ interface ToggleSwitchProps {
export const ToggleSwitch: React.FC<ToggleSwitchProps> = ({ enabled, onToggle, renderTrackingIcon }) => {
return (
<div
className={`w-14 h-6 flex items-center rounded-full p-1 cursor-pointer transition-colors`}
className={`flex items-center p-1 w-14 h-6 rounded-full transition-colors cursor-pointer`}
onClick={onToggle}
style={
enabled
Expand Down

0 comments on commit afb6967

Please sign in to comment.