profile picture in any task item

This commit is contained in:
hamid zarghami
2026-07-21 14:35:36 +03:30
parent 9004413a33
commit 402354e122
6 changed files with 23 additions and 5 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
VITE_TOKEN_NAME = 'admin_token'
VITE_REFRESH_TOKEN_NAME = 'admin_refresh_token'
VITE_BASE_URL = 'https://api.danakcorp.com'
# VITE_BASE_URL = 'https://api.danakcorp.com'
# VITE_BASE_URL = 'http://192.168.99.131:3500'
VITE_BASE_URL = 'http://192.168.99.131:3500'
+15 -3
View File
@@ -4,6 +4,7 @@ import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Pages } from "../../../config/Pages";
import type { Task as TaskType } from "../types";
import UserAvatar from "./UserAvatar";
type Props = {
task: TaskType;
@@ -70,9 +71,20 @@ const Task: FC<Props> = ({ task, isDragging, onClick }) => {
</div>
</div>
<div className="mt-2 flex justify-end">
<div className="size-6 bg-gray-200 rounded-full"></div>
</div>
{task.users?.length ? (
<div className="mt-2 flex justify-end">
<div className="flex items-center -space-x-1.5 rtl:space-x-reverse">
{task.users.map((user) => (
<UserAvatar
key={user.id}
src={user.profilePic}
alt={`${user.firstName} ${user.lastName}`}
className="size-6 ring-2 ring-white"
/>
))}
</div>
</div>
) : null}
</div>
);
};
@@ -27,6 +27,7 @@ export type TaskItemType = {
checklistDone?: number;
checklistTotal?: number;
ticketId?: string | null;
users?: TaskUserType[];
};
export type TaskPhaseTasksPagerType = {
@@ -13,4 +13,5 @@ export const mapTaskItemToTask = (task: TaskItemType, taskPhaseId: string, fallb
checklistDone: task.checklistDone ?? 0,
checklistTotal: task.checklistTotal ?? 0,
ticketId: task.ticketId ?? null,
users: task.users ?? [],
});
+3
View File
@@ -1,3 +1,5 @@
import type { TaskUserType } from "./task/types/TaskTypes";
export type Column = {
id: string;
title: string;
@@ -17,6 +19,7 @@ export type Task = {
checklistDone: number;
checklistTotal: number;
ticketId?: string | null;
users?: TaskUserType[];
};
export type WorkspaceData = {
+1
View File
@@ -119,6 +119,7 @@ const Workspace: FC = () => {
checklistDone: activeTask.checklistDone,
checklistTotal: activeTask.checklistTotal,
ticketId: activeTask.ticketId,
users: activeTask.users,
},
index,
),