From a06a19057462c671cb1a16cb9dac96e914ca22c2 Mon Sep 17 00:00:00 2001 From: Andrew Trieu Date: Wed, 6 Nov 2024 17:32:12 +0200 Subject: [PATCH] feat: Update task status from 'Backlog' to 'To Do', adjust image source paths, and enhance task rendering in various components --- .../src/app/components/ModalNewTask/index.tsx | 4 +- .../src/app/components/Sidebar/index.tsx | 18 ++++++- .../src/app/components/TaskCard/index.tsx | 2 +- .../src/app/components/UserCard/index.tsx | 2 +- tasker-client/src/app/home/page.tsx | 52 +++++++++++++++++-- .../priority/reusablePriorityPage/index.tsx | 2 + .../src/app/projects/BoardView/index.tsx | 31 +++++------ .../src/app/projects/TableView/index.tsx | 35 +++++++++---- tasker-client/src/app/projects/[id]/page.tsx | 15 +++--- .../src/app/{projects => }/settings/page.tsx | 1 - .../src/app/teams/{index.tsx => page.tsx} | 0 tasker-client/src/app/users/page.tsx | 2 +- tasker-client/src/state/api.ts | 2 +- 13 files changed, 120 insertions(+), 46 deletions(-) rename tasker-client/src/app/{projects => }/settings/page.tsx (99%) rename tasker-client/src/app/teams/{index.tsx => page.tsx} (100%) diff --git a/tasker-client/src/app/components/ModalNewTask/index.tsx b/tasker-client/src/app/components/ModalNewTask/index.tsx index 507f7f6..6ce89d5 100644 --- a/tasker-client/src/app/components/ModalNewTask/index.tsx +++ b/tasker-client/src/app/components/ModalNewTask/index.tsx @@ -13,7 +13,7 @@ const ModalNewTask = ({ isOpen, onClose, id = null }: Props) => { const [createTask, { isLoading }] = useCreateTaskMutation(); const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); - const [status, setStatus] = useState(Status.Backlog); + const [status, setStatus] = useState(Status.ToDo); const [priority, setPriority] = useState(Priority.Backlog); const [tags, setTags] = useState(""); const [startDate, setStartDate] = useState(""); @@ -87,7 +87,7 @@ const ModalNewTask = ({ isOpen, onClose, id = null }: Props) => { } > - + diff --git a/tasker-client/src/app/components/Sidebar/index.tsx b/tasker-client/src/app/components/Sidebar/index.tsx index 8efc90e..f6ab205 100644 --- a/tasker-client/src/app/components/Sidebar/index.tsx +++ b/tasker-client/src/app/components/Sidebar/index.tsx @@ -25,11 +25,13 @@ import { usePathname } from "next/navigation"; import { setIsSidebarCollapsed } from "@/state"; import { useAppDispatch, useAppSelector } from "@/app/redux"; import Link from "next/link"; +import { useGetProjectsQuery } from "@/state/api"; const Sidebar = () => { const [showProjects, setShowProjects] = React.useState(true); const [showPriority, setShowPriority] = React.useState(true); + const { data: projects } = useGetProjectsQuery(); const dispatch = useAppDispatch(); const isSidebarCollapsed = useAppSelector( (state) => state.global.isSidebarCollapsed, @@ -77,7 +79,12 @@ const Sidebar = () => { + {showProjects && + projects?.map((project) => ( + + ))}