show attachment in task card and show check list item in task card
deploy to danak / build_and_deploy (push) Has been cancelled
deploy to danak / build_and_deploy (push) Has been cancelled
This commit is contained in:
@@ -72,7 +72,7 @@ const Task: FC<Props> = ({ task, isDragging, onClick }) => {
|
||||
</div>
|
||||
|
||||
{task.users?.length ? (
|
||||
<div className="mt-2 flex justify-end">
|
||||
<div className="mt-2 flex justify-end pl-1.5">
|
||||
<div className="flex items-center -space-x-1.5 rtl:space-x-reverse">
|
||||
{task.users.map((user) => (
|
||||
<UserAvatar
|
||||
|
||||
@@ -124,6 +124,7 @@ export const useCreateCheckListItem = () => {
|
||||
mutationFn: (variables: CreateCheckListItemType) => api.createCheckListItem(variables),
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ["task-detail", variables.taskId] });
|
||||
queryClient.invalidateQueries({ queryKey: ["tasks-by-task-phase"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["project"] });
|
||||
},
|
||||
});
|
||||
@@ -137,6 +138,7 @@ export const useUpdateCheckListItem = () => {
|
||||
api.updateCheckListItem(id, params),
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ["task-detail", variables.taskId] });
|
||||
queryClient.invalidateQueries({ queryKey: ["tasks-by-task-phase"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["project"] });
|
||||
},
|
||||
});
|
||||
@@ -149,6 +151,7 @@ export const useDeleteCheckListItem = () => {
|
||||
mutationFn: ({ id }: { id: string; taskId: string }) => api.deleteCheckListItem(id),
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ["task-detail", variables.taskId] });
|
||||
queryClient.invalidateQueries({ queryKey: ["tasks-by-task-phase"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["project"] });
|
||||
},
|
||||
});
|
||||
@@ -161,6 +164,7 @@ export const useCreateTaskAttachment = () => {
|
||||
mutationFn: (variables: CreateTaskAttachmentType) => api.createTaskAttachment(variables),
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ["task-detail", variables.taskId] });
|
||||
queryClient.invalidateQueries({ queryKey: ["tasks-by-task-phase"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["project"] });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -23,9 +23,9 @@ export type TaskItemType = {
|
||||
endDate?: string | null;
|
||||
tag?: string;
|
||||
dateRange?: string;
|
||||
attachments?: number;
|
||||
checklistDone?: number;
|
||||
checklistTotal?: number;
|
||||
attachmentCount?: number;
|
||||
checkListItemCount?: number;
|
||||
completedCheckListItemCount?: number;
|
||||
ticketId?: string | null;
|
||||
users?: TaskUserType[];
|
||||
};
|
||||
|
||||
@@ -9,9 +9,9 @@ export const mapTaskItemToTask = (task: TaskItemType, taskPhaseId: string, fallb
|
||||
tag: task.tag ?? "",
|
||||
dateRange: task.dateRange ?? "",
|
||||
color: task.color || null,
|
||||
attachments: task.attachments ?? 0,
|
||||
checklistDone: task.checklistDone ?? 0,
|
||||
checklistTotal: task.checklistTotal ?? 0,
|
||||
attachments: task.attachmentCount ?? 0,
|
||||
checklistDone: task.completedCheckListItemCount ?? 0,
|
||||
checklistTotal: task.checkListItemCount ?? 0,
|
||||
ticketId: task.ticketId ?? null,
|
||||
users: task.users ?? [],
|
||||
});
|
||||
|
||||
@@ -115,9 +115,9 @@ const Workspace: FC = () => {
|
||||
tag: activeTask.tag,
|
||||
dateRange: activeTask.dateRange,
|
||||
color: activeTask.color,
|
||||
attachments: activeTask.attachments,
|
||||
checklistDone: activeTask.checklistDone,
|
||||
checklistTotal: activeTask.checklistTotal,
|
||||
attachmentCount: activeTask.attachments,
|
||||
completedCheckListItemCount: activeTask.checklistDone,
|
||||
checkListItemCount: activeTask.checklistTotal,
|
||||
ticketId: activeTask.ticketId,
|
||||
users: activeTask.users,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user