profile picture in any task item
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_TOKEN_NAME = 'admin_token'
|
VITE_TOKEN_NAME = 'admin_token'
|
||||||
VITE_REFRESH_TOKEN_NAME = 'admin_refresh_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'
|
||||||
@@ -4,6 +4,7 @@ import { Link } from "react-router-dom";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Pages } from "../../../config/Pages";
|
import { Pages } from "../../../config/Pages";
|
||||||
import type { Task as TaskType } from "../types";
|
import type { Task as TaskType } from "../types";
|
||||||
|
import UserAvatar from "./UserAvatar";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
task: TaskType;
|
task: TaskType;
|
||||||
@@ -70,9 +71,20 @@ const Task: FC<Props> = ({ task, isDragging, onClick }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-2 flex justify-end">
|
{task.users?.length ? (
|
||||||
<div className="size-6 bg-gray-200 rounded-full"></div>
|
<div className="mt-2 flex justify-end">
|
||||||
</div>
|
<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>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export type TaskItemType = {
|
|||||||
checklistDone?: number;
|
checklistDone?: number;
|
||||||
checklistTotal?: number;
|
checklistTotal?: number;
|
||||||
ticketId?: string | null;
|
ticketId?: string | null;
|
||||||
|
users?: TaskUserType[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TaskPhaseTasksPagerType = {
|
export type TaskPhaseTasksPagerType = {
|
||||||
|
|||||||
@@ -13,4 +13,5 @@ export const mapTaskItemToTask = (task: TaskItemType, taskPhaseId: string, fallb
|
|||||||
checklistDone: task.checklistDone ?? 0,
|
checklistDone: task.checklistDone ?? 0,
|
||||||
checklistTotal: task.checklistTotal ?? 0,
|
checklistTotal: task.checklistTotal ?? 0,
|
||||||
ticketId: task.ticketId ?? null,
|
ticketId: task.ticketId ?? null,
|
||||||
|
users: task.users ?? [],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { TaskUserType } from "./task/types/TaskTypes";
|
||||||
|
|
||||||
export type Column = {
|
export type Column = {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -17,6 +19,7 @@ export type Task = {
|
|||||||
checklistDone: number;
|
checklistDone: number;
|
||||||
checklistTotal: number;
|
checklistTotal: number;
|
||||||
ticketId?: string | null;
|
ticketId?: string | null;
|
||||||
|
users?: TaskUserType[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WorkspaceData = {
|
export type WorkspaceData = {
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ const Workspace: FC = () => {
|
|||||||
checklistDone: activeTask.checklistDone,
|
checklistDone: activeTask.checklistDone,
|
||||||
checklistTotal: activeTask.checklistTotal,
|
checklistTotal: activeTask.checklistTotal,
|
||||||
ticketId: activeTask.ticketId,
|
ticketId: activeTask.ticketId,
|
||||||
|
users: activeTask.users,
|
||||||
},
|
},
|
||||||
index,
|
index,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user