diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index c9aed19..ad9dc97 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -7,7 +7,7 @@ import SignUpPage from "./components/authentication/SignUpPage"; import NavBar from "./components/navigations/Navbar"; import Home from "./components/Home"; import Calendar from "./components/calendar/calendar"; -import KanbanBoard from "./components/kanbanBoard/kanbanBoard"; +import KanbanPage from "./components/kanbanBoard/kanbanPage"; import IconSideNav from "./components/navigations/IconSideNav"; import Eisenhower from "./components/eisenhowerMatrix/Eisenhower"; import PrivateRoute from "./PrivateRoute"; @@ -22,13 +22,13 @@ const App = () => { return (
{!isLoginPageOrSignUpPage && } -
+
-
+
} /> }> - } /> + } /> } /> }> diff --git a/frontend/src/components/EisenhowerMatrix/Eisenhower.jsx b/frontend/src/components/EisenhowerMatrix/Eisenhower.jsx index 8dc159a..7c31328 100644 --- a/frontend/src/components/EisenhowerMatrix/Eisenhower.jsx +++ b/frontend/src/components/EisenhowerMatrix/Eisenhower.jsx @@ -1,22 +1,34 @@ -import React from "react"; +import React, { useState } from "react"; import { FiAlertCircle, FiClock, FiXCircle, FiCheckCircle } from "react-icons/fi"; function EachBlog({ name, colorCode, contentList, icon }) { + const [tasks, setTasks] = useState(contentList); + + const handleCheckboxChange = index => { + const updatedTasks = [...tasks]; + updatedTasks[index].checked = !updatedTasks[index].checked; + setTasks(updatedTasks); + }; + return ( -
-
- {icon} - {name} +
+
+ {icon} + {name}

- {contentList.length === 0 ? ( + {tasks.length === 0 ? (

No tasks

) : ( - contentList.map((item, index) => ( + tasks.map((item, index) => (
- + handleCheckboxChange(index)} + />
)) diff --git a/frontend/src/components/kanbanBoard/kanbanPage.jsx b/frontend/src/components/kanbanBoard/kanbanPage.jsx new file mode 100644 index 0000000..b362330 --- /dev/null +++ b/frontend/src/components/kanbanBoard/kanbanPage.jsx @@ -0,0 +1,36 @@ +import KanbanBoard from "./kanbanBoard"; +import React, { useState } from 'react'; + +const KanbanPage = () => { + const [activeTab, setActiveTab] = useState('kanban'); + + const handleTabClick = (tabId) => { + setActiveTab(tabId); + }; + + return ( + + ); +}; + +export default KanbanPage; diff --git a/frontend/src/components/kanbanBoard/taskCard.jsx b/frontend/src/components/kanbanBoard/taskCard.jsx index c8d524b..379abf5 100644 --- a/frontend/src/components/kanbanBoard/taskCard.jsx +++ b/frontend/src/components/kanbanBoard/taskCard.jsx @@ -43,7 +43,6 @@ function TaskCard({ task, deleteTask, updateTask }) { ref={setNodeRef} {...attributes} {...listeners} - onClick={() => document.getElementById("task_detail_modal").showModal()} style={style} className="justify-center items-center flex text-left rounded-xl cursor-grab relative hover:border-2 hover:border-blue-400 shadow bg-white" onMouseEnter={() => { diff --git a/frontend/src/components/navigations/IconSideNav.jsx b/frontend/src/components/navigations/IconSideNav.jsx index 3a1ba3e..cc16123 100644 --- a/frontend/src/components/navigations/IconSideNav.jsx +++ b/frontend/src/components/navigations/IconSideNav.jsx @@ -24,7 +24,7 @@ const SideNav = () => { const [selected, setSelected] = useState(0); return ( -