This commit is contained in:
@@ -9,7 +9,9 @@ import AddNewColumn from "./components/AddNewColumn";
|
||||
import Column from "./components/Column";
|
||||
import HeaderWorkspace from "./components/HeaderWorkspace";
|
||||
import TaskDetailModal from "./components/task-detail/TaskDetailModal";
|
||||
import { useGetProject } from "./project/hooks/useProjectData";
|
||||
import { useGetProject, useGetProjectDetail } from "./project/hooks/useProjectData";
|
||||
import type { ProjectDetailType } from "./project/types/ProjectTypes";
|
||||
import { getProjectBackgroundStyle } from "./project/utils/getProjectBackgroundStyle";
|
||||
import { useUpdateTaskPhase } from "./task-phase/hooks/useTaskPhaseData";
|
||||
import type { TaskPhaseItemType } from "./task-phase/types/TaskPhaseTypes";
|
||||
import { useChangeTaskPhase, useChangeTaskPriority } from "./task/hooks/useTaskData";
|
||||
@@ -25,6 +27,9 @@ const Workspace: FC = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const { slug: projectId = "" } = useParams<{ slug: string }>();
|
||||
const { data: project, isPending } = useGetProject(projectId);
|
||||
const { data: projectDetailData } = useGetProjectDetail(projectId);
|
||||
const projectDetail: ProjectDetailType | undefined =
|
||||
projectDetailData?.data?.project ?? projectDetailData?.data;
|
||||
const { mutate: changeTaskPhase } = useChangeTaskPhase();
|
||||
const { mutate: changeTaskPriority } = useChangeTaskPriority();
|
||||
const { mutate: updateTaskPhase } = useUpdateTaskPhase();
|
||||
@@ -236,7 +241,13 @@ const Workspace: FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="bg-[#01347A] h-full min-h-0 rounded-none xl:rounded-[32px] overflow-hidden flex flex-col">
|
||||
<div
|
||||
className="h-full min-h-0 rounded-none xl:rounded-[32px] overflow-hidden flex flex-col"
|
||||
style={getProjectBackgroundStyle({
|
||||
backgroundColor: projectDetail?.backgroundColor,
|
||||
backgroundPicture: projectDetail?.backgroundPicture,
|
||||
})}
|
||||
>
|
||||
<HeaderWorkspace projectName={project?.data?.name ?? ""} />
|
||||
<div className="flex-1 min-h-0 flex flex-col px-3 sm:px-4 xl:px-8 py-4 xl:py-6">
|
||||
<DragDropContext onDragStart={handleTaskDragStart} onDragEnd={handleTaskDragEnd}>
|
||||
|
||||
Reference in New Issue
Block a user