Skip to content

Commit

Permalink
Merge pull request #2521 from ever-co/2519-bug-assigned-tasks
Browse files Browse the repository at this point in the history
Fix: Unassigned Team Members
  • Loading branch information
evereq authored May 14, 2024
2 parents 2f7cd34 + 9dcf33e commit 7874aeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
5 changes: 3 additions & 2 deletions apps/web/lib/features/task/task-assign-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { MouseEventHandler } from 'react';
type Props = {
onClick?: MouseEventHandler<HTMLButtonElement>;
disabled: boolean;
iconClassName?: string
} & IClassName;

export function TaskAssignButton({ onClick, disabled, className }: Props) {
export function TaskAssignButton({ onClick, disabled, className, iconClassName }: Props) {
return (
<Button
onClick={onClick}
Expand All @@ -22,7 +23,7 @@ export function TaskAssignButton({ onClick, disabled, className }: Props) {
className
)}
>
<ArrowRightIcon className="w-[60%] h-[60%]"/>
<ArrowRightIcon className={clsxm("w-[60%] h-[60%]", iconClassName)} />
</Button>
);
}
16 changes: 5 additions & 11 deletions apps/web/lib/features/task/task-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
Text,
VerticalSeparator
} from 'lib/components';
import ImageComponent, { ImageOverlapperProps } from 'lib/components/image-overlapper';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useCallback, useState } from 'react';
Expand Down Expand Up @@ -123,14 +122,6 @@ export function TaskCard(props: Props) {

const memberInfo = useTeamMemberCard(currentMember || undefined);
const taskEdition = useTMCardTaskEdit(task);
const taskAssignee: ImageOverlapperProps[] =
task?.members?.map((member: any) => {
return {
id: member.user.id,
url: member.user.imageUrl,
alt: member.user.firstName
};
}) || [];

return (
<>
Expand Down Expand Up @@ -169,7 +160,6 @@ export function TaskCard(props: Props) {
{viewType === 'unassign' && (
<div className="w-[20%] flex justify-around">
<UsersTaskAssigned task={task} />
<ImageComponent radius={30} images={taskAssignee} item={task} />
</div>
)}
<VerticalSeparator />
Expand Down Expand Up @@ -197,6 +187,7 @@ export function TaskCard(props: Props) {
task={task}
assignTask={memberInfo.assignTask}
className="w-11 h-11 border border-[#0000001A] dark:border-[0.125rem] dark:border-[#28292F]"
iconClassName='text-primary dark:text-white'
/>
)}
</div>
Expand Down Expand Up @@ -385,11 +376,13 @@ function TimerButtonCall({
function AssignTaskButtonCall({
task,
assignTask,
className
className,
iconClassName
}: {
task: ITeamTask;
assignTask: (task: ITeamTask) => Promise<void>;
className?: string;
iconClassName?: string;
}) {
const {
disabled,
Expand All @@ -407,6 +400,7 @@ function AssignTaskButtonCall({
}}
disabled={activeTaskStatus ? disabled : task.status === 'closed'}
className={clsxm('h-9 w-9', className)}
iconClassName={iconClassName}
/>
);
}
Expand Down

0 comments on commit 7874aeb

Please sign in to comment.