diff --git a/tasker-client/src/app/components/ModalNewTask/index.tsx b/tasker-client/src/app/components/ModalNewTask/index.tsx index 6ce89d5..9748383 100644 --- a/tasker-client/src/app/components/ModalNewTask/index.tsx +++ b/tasker-client/src/app/components/ModalNewTask/index.tsx @@ -23,7 +23,14 @@ const ModalNewTask = ({ isOpen, onClose, id = null }: Props) => { const [projectId, setProjectId] = useState(""); const handleSubmit = async () => { - if (!title || !authorUserId || !(id !== null || projectId)) return; + console.log(title, authorUserId, id, projectId); + + console.log("Creating task 1.."); + if ( + !(title && authorUserId && assignedUserId && (id !== null || projectId)) + ) + return; + console.log("Creating task 2..."); const formattedStartDate = formatISO(new Date(startDate), { representation: "complete", @@ -40,14 +47,17 @@ const ModalNewTask = ({ isOpen, onClose, id = null }: Props) => { tags, startDate: formattedStartDate, dueDate: formattedDueDate, - authorUserId: parseInt(authorUserId), - assignedUserId: parseInt(assignedUserId), - projectId: id !== null ? Number(id) : Number(projectId), + authorUserId: authorUserId, + assignedUserId: assignedUserId, + projectId: id !== null ? id : projectId, }); }; const isFormValid = () => { - return title && authorUserId && !(id !== null || projectId); + console.log(title, authorUserId, id, projectId); + return ( + title && authorUserId && assignedUserId && (id !== null || projectId) + ); }; const selectStyles = @@ -87,7 +97,7 @@ const ModalNewTask = ({ isOpen, onClose, id = null }: Props) => { } > Select Status - Backlog + To Do In Progress Test/Review Done diff --git a/tasker-client/src/app/components/Sidebar/index.tsx b/tasker-client/src/app/components/Sidebar/index.tsx index 419cf34..928b23b 100644 --- a/tasker-client/src/app/components/Sidebar/index.tsx +++ b/tasker-client/src/app/components/Sidebar/index.tsx @@ -93,7 +93,6 @@ const Sidebar = () => { setShowProjects((prev) => { - console.log(prev); return !prev; }) } @@ -109,10 +108,10 @@ const Sidebar = () => { {showProjects && projects?.map((project) => ( ))} diff --git a/tasker-client/src/app/components/TaskCard/index.tsx b/tasker-client/src/app/components/TaskCard/index.tsx index e18e6f0..cf29c71 100644 --- a/tasker-client/src/app/components/TaskCard/index.tsx +++ b/tasker-client/src/app/components/TaskCard/index.tsx @@ -27,7 +27,7 @@ const TaskCard = ({ task }: Props) => { )} - ID: {task.id} + ID: {task.taskId} Title: {task.title} diff --git a/tasker-client/src/app/home/page.tsx b/tasker-client/src/app/home/page.tsx index 4fc7bdc..c4185a9 100644 --- a/tasker-client/src/app/home/page.tsx +++ b/tasker-client/src/app/home/page.tsx @@ -5,6 +5,7 @@ import { Priority, Project, Task, + useGetAuthUserQuery, useGetProjectsQuery, useGetTasksByUserQuery, } from "@/state/api"; @@ -77,12 +78,13 @@ const taskColumns: GridColDef[] = [ const statusColors = ["#0088FE", "#00C49F", "#FFBB28", "#FF8042"]; const HomePage = () => { - const userId = 1; + const { data: currentUser } = useGetAuthUserQuery({}); + const userId = currentUser?.userDetails?.userId ?? null; const { data: tasks, isLoading: tasksLoading, isError: tasksError, - } = useGetTasksByUserQuery(userId || 0, { + } = useGetTasksByUserQuery(userId || "", { skip: userId === null, }); const { data: projects, isLoading: isProjectsLoading } = @@ -191,6 +193,7 @@ const HomePage = () => { columns={taskColumns} checkboxSelection loading={tasksLoading} + getRowId={(row) => row.taskId} getRowClassName={() => "data-grid-row"} getCellClassName={() => "data-grid-cell"} className="border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200" diff --git a/tasker-client/src/app/priority/reusablePriorityPage/index.tsx b/tasker-client/src/app/priority/reusablePriorityPage/index.tsx index dbdbc40..817e305 100644 --- a/tasker-client/src/app/priority/reusablePriorityPage/index.tsx +++ b/tasker-client/src/app/priority/reusablePriorityPage/index.tsx @@ -83,7 +83,7 @@ const ReusablePriorityPage = ({ priority }: Props) => { data: tasks, isLoading, isError: isTasksError, - } = useGetTasksByUserQuery(userId || 0, { + } = useGetTasksByUserQuery(userId || "", { skip: userId === null, }); @@ -135,7 +135,7 @@ const ReusablePriorityPage = ({ priority }: Props) => { ) : view === "list" ? ( {filteredTasks?.map((task: Task) => ( - + ))} ) : ( @@ -146,7 +146,7 @@ const ReusablePriorityPage = ({ priority }: Props) => { rows={filteredTasks} columns={columns} checkboxSelection - getRowId={(row) => row.id} + getRowId={(row) => row.taskId} className="border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200" sx={dataGridSxStyles(isDarkMode)} /> diff --git a/tasker-client/src/app/projects/BoardView/index.tsx b/tasker-client/src/app/projects/BoardView/index.tsx index f9880da..9a29b38 100644 --- a/tasker-client/src/app/projects/BoardView/index.tsx +++ b/tasker-client/src/app/projects/BoardView/index.tsx @@ -1,6 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { useGetTasksQuery, useUpdateTaskStatusMutation } from "@/state/api"; -import React from "react"; +import { + Status, + useGetTasksQuery, + useUpdateTaskStatusMutation, +} from "@/state/api"; +import React, { useEffect, useState } from "react"; import { DndProvider, useDrag, useDrop } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; import { Task as TaskType } from "@/state/api"; @@ -9,22 +13,40 @@ import { format } from "date-fns"; import Image from "next/image"; type BoardProps = { - id: string; + projectId: string; setIsModalNewTaskOpen: (isOpen: boolean) => void; }; const taskStatus = ["To Do", "In Progress", "Test/Review", "Done"]; -const BoardView = ({ id, setIsModalNewTaskOpen }: BoardProps) => { +const BoardView = ({ projectId, setIsModalNewTaskOpen }: BoardProps) => { const { - data: tasks, + data: fetchedTasks, isLoading, error, - } = useGetTasksQuery({ projectId: Number(id) }); + } = useGetTasksQuery({ projectId }); const [updateTaskStatus] = useUpdateTaskStatusMutation(); + const [tasks, setTasks] = useState([]); - const moveTask = (taskId: number, toStatus: string) => { - updateTaskStatus({ taskId, status: toStatus }); + useEffect(() => { + if (fetchedTasks) { + setTasks(fetchedTasks); + } + }, [fetchedTasks]); + + const moveTask = async (taskId: string, toStatus: string) => { + setTasks((prevTasks) => + prevTasks.map((task) => + task.taskId === taskId ? { ...task, status: toStatus as Status } : task, + ), + ); + + try { + await updateTaskStatus({ taskId, status: toStatus }); + } catch (error) { + console.error("Failed to update task status:", error); + setTasks(fetchedTasks || []); + } }; if (isLoading) return Loading...; @@ -50,7 +72,7 @@ const BoardView = ({ id, setIsModalNewTaskOpen }: BoardProps) => { type TaskColumnProps = { status: string; tasks: TaskType[]; - moveTask: (taskId: number, toStatus: string) => void; + moveTask: (taskId: string, toStatus: string) => void; setIsModalNewTaskOpen: (isOpen: boolean) => void; }; @@ -62,7 +84,7 @@ const TaskColumn = ({ }: TaskColumnProps) => { const [{ isOver }, drop] = useDrop(() => ({ accept: "task", - drop: (item: { id: number }) => moveTask(item.id, status), + drop: (item: { id: string }) => moveTask(item.id, status), collect: (monitor: any) => ({ isOver: !!monitor.isOver(), }), @@ -116,7 +138,7 @@ const TaskColumn = ({ {tasks .filter((task) => task.status === status) .map((task) => ( - + ))} ); @@ -129,7 +151,7 @@ type TaskProps = { const Task = ({ task }: TaskProps) => { const [{ isDragging }, drag] = useDrag(() => ({ type: "task", - item: { id: task.id }, + item: { id: task.taskId }, collect: (monitor: any) => ({ isDragging: !!monitor.isDragging(), }), diff --git a/tasker-client/src/app/projects/ListView/index.tsx b/tasker-client/src/app/projects/ListView/index.tsx index 10bd442..f1e0556 100644 --- a/tasker-client/src/app/projects/ListView/index.tsx +++ b/tasker-client/src/app/projects/ListView/index.tsx @@ -4,16 +4,12 @@ import { Task, useGetTasksQuery } from "@/state/api"; import React from "react"; type Props = { - id: string; + projectId: string; setIsModalNewTaskOpen: (isOpen: boolean) => void; }; -const ListView = ({ id, setIsModalNewTaskOpen }: Props) => { - const { - data: tasks, - error, - isLoading, - } = useGetTasksQuery({ projectId: Number(id) }); +const ListView = ({ projectId, setIsModalNewTaskOpen }: Props) => { + const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId }); if (isLoading) return Loading...; if (error) return An error occurred while fetching tasks; @@ -35,7 +31,7 @@ const ListView = ({ id, setIsModalNewTaskOpen }: Props) => { /> - {tasks?.map((task: Task) => )} + {tasks?.map((task: Task) => )} ); diff --git a/tasker-client/src/app/projects/TableView/index.tsx b/tasker-client/src/app/projects/TableView/index.tsx index d81c8fb..9f12fc5 100644 --- a/tasker-client/src/app/projects/TableView/index.tsx +++ b/tasker-client/src/app/projects/TableView/index.tsx @@ -7,7 +7,7 @@ import { DataGrid, GridColDef } from "@mui/x-data-grid"; import React from "react"; type Props = { - id: string; + projectId: string; setIsModalNewTaskOpen: (isOpen: boolean) => void; }; @@ -29,7 +29,7 @@ const columns: GridColDef[] = [ renderCell: (params) => ( { +const TableView = ({ projectId, setIsModalNewTaskOpen }: Props) => { const isDarkMode = useAppSelector((state) => state.global.isDarkMode); - const { - data: tasks, - error, - isLoading, - } = useGetTasksQuery({ projectId: Number(id) }); + const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId }); if (isLoading) return Loading...; if (error || !tasks) return An error occurred while fetching tasks; @@ -123,6 +119,7 @@ const TableView = ({ id, setIsModalNewTaskOpen }: Props) => { row.taskId} className="border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200" sx={dataGridSxStyles(isDarkMode)} /> diff --git a/tasker-client/src/app/projects/TimelineView/index.tsx b/tasker-client/src/app/projects/TimelineView/index.tsx index 814d7e9..d530e96 100644 --- a/tasker-client/src/app/projects/TimelineView/index.tsx +++ b/tasker-client/src/app/projects/TimelineView/index.tsx @@ -5,19 +5,15 @@ import "gantt-task-react/dist/index.css"; import React, { useMemo, useState } from "react"; type Props = { - id: string; + projectId: string; setIsModalNewTaskOpen: (isOpen: boolean) => void; }; type TaskTypeItems = "task" | "milestone" | "project"; -const Timeline = ({ id, setIsModalNewTaskOpen }: Props) => { +const Timeline = ({ projectId, setIsModalNewTaskOpen }: Props) => { const isDarkMode = useAppSelector((state) => state.global.isDarkMode); - const { - data: tasks, - error, - isLoading, - } = useGetTasksQuery({ projectId: Number(id) }); + const { data: tasks, error, isLoading } = useGetTasksQuery({ projectId }); const [displayOptions, setDisplayOptions] = useState({ viewMode: ViewMode.Month, @@ -30,7 +26,7 @@ const Timeline = ({ id, setIsModalNewTaskOpen }: Props) => { start: new Date(task.startDate as string), end: new Date(task.dueDate as string), name: task.title, - id: `Task-${task.id}`, + id: `Task-${task.taskId}`, type: "task" as TaskTypeItems, progress: task.points ? (task.points / 10) * 100 : 0, isDisabled: false, diff --git a/tasker-client/src/app/projects/[id]/page.tsx b/tasker-client/src/app/projects/[id]/page.tsx index 0deb283..bd6bc89 100644 --- a/tasker-client/src/app/projects/[id]/page.tsx +++ b/tasker-client/src/app/projects/[id]/page.tsx @@ -26,16 +26,19 @@ const Project = ({ params }: Props) => { /> {activeTab === "Board" && ( - + )} {activeTab === "List" && ( - + )} {activeTab === "Timeline" && ( - + )} {activeTab === "Table" && ( - + )} ); diff --git a/tasker-client/src/app/search/page.tsx b/tasker-client/src/app/search/page.tsx index 156dcf2..c06376b 100644 --- a/tasker-client/src/app/search/page.tsx +++ b/tasker-client/src/app/search/page.tsx @@ -49,14 +49,14 @@ const Search = () => { Tasks )} {searchResults.tasks?.map((task) => ( - + ))} {searchResults.projects && searchResults.projects?.length > 0 && ( Projects )} {searchResults.projects?.map((project) => ( - + ))} {searchResults.users && searchResults.users?.length > 0 && ( diff --git a/tasker-client/src/app/teams/page.tsx b/tasker-client/src/app/teams/page.tsx index ba98292..a2732e8 100644 --- a/tasker-client/src/app/teams/page.tsx +++ b/tasker-client/src/app/teams/page.tsx @@ -20,7 +20,7 @@ const CustomToolbar = () => ( ); const columns: GridColDef[] = [ - { field: "id", headerName: "Team ID", width: 100 }, + { field: "teamId", headerName: "Team ID", width: 100 }, { field: "teamName", headerName: "Team Name", width: 200 }, { field: "productOwnerUsername", headerName: "Product Owner", width: 200 }, { @@ -48,6 +48,7 @@ const Teams = () => { slots={{ toolbar: CustomToolbar, }} + getRowId={(row) => row.teamId} className="border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200" sx={dataGridSxStyles(isDarkMode)} /> diff --git a/tasker-client/src/app/timeline/page.tsx b/tasker-client/src/app/timeline/page.tsx index 79e72ca..8ee7626 100644 --- a/tasker-client/src/app/timeline/page.tsx +++ b/tasker-client/src/app/timeline/page.tsx @@ -24,7 +24,7 @@ const Timeline = () => { start: new Date(project.startDate as string), end: new Date(project.endDate as string), name: project.name, - id: `Project-${project.id}`, + id: `Project-${project.projectId}`, type: "project" as TaskTypeItems, progress: 50, isDisabled: false, diff --git a/tasker-server/seed/populateSeedData.ts b/tasker-server/seed/populateSeedData.ts new file mode 100644 index 0000000..890c53c --- /dev/null +++ b/tasker-server/seed/populateSeedData.ts @@ -0,0 +1,1181 @@ +import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; +import { DynamoDBDocument, PutCommandInput } from "@aws-sdk/lib-dynamodb"; + +const DRY_RUN = false; + +const seedData = { + projects: [ + { + projectId: "project_cd557609-92ca-41ae-b6ee-f98576d6182e", + category: "projects", + name: "Apollo", + description: "A space exploration project.", + startDate: "2023-01-01T00:00:00Z", + endDate: "2023-12-31T00:00:00Z", + }, + { + projectId: "project_fbb5e1ca-592c-4c5c-a40b-1a8e30c33649", + category: "projects", + name: "Beacon", + description: "Developing advanced navigation systems.", + startDate: "2023-02-01T00:00:00Z", + endDate: "2023-10-15T00:00:00Z", + }, + { + projectId: "project_b413975d-342d-4cbd-89b3-04db3fc9bdf4", + category: "projects", + name: "Catalyst", + description: "A project to boost renewable energy use.", + startDate: "2023-03-05T00:00:00Z", + endDate: "2024-03-05T00:00:00Z", + }, + { + projectId: "project_71e357a2-744f-48d5-af62-7458b02fae7c", + category: "projects", + name: "Delta", + description: "Delta project for new software development techniques.", + startDate: "2023-01-20T00:00:00Z", + endDate: "2023-09-20T00:00:00Z", + }, + { + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + category: "projects", + name: "Echo", + description: "Echo project focused on AI advancements.", + startDate: "2023-04-15T00:00:00Z", + endDate: "2023-11-30T00:00:00Z", + }, + { + projectId: "project_ab747e29-cc49-4cb7-bd4c-ad2f4e426bf8", + category: "projects", + name: "Foxtrot", + description: "Exploring cutting-edge biotechnology.", + startDate: "2023-02-25T00:00:00Z", + endDate: "2023-08-25T00:00:00Z", + }, + { + projectId: "project_59830e80-3549-4e74-b6b7-5be1d079cbff", + category: "projects", + name: "Golf", + description: "Development of new golf equipment using AI.", + startDate: "2023-05-10T00:00:00Z", + endDate: "2023-12-10T00:00:00Z", + }, + { + projectId: "project_1752467c-ead8-445b-bc13-ca6094a3cb77", + category: "projects", + name: "Hotel", + description: "Hotel management system overhaul.", + startDate: "2023-03-01T00:00:00Z", + endDate: "2024-01-01T00:00:00Z", + }, + { + projectId: "project_087de368-f99a-40d3-a50c-769977d832fe", + category: "projects", + name: "India", + description: "Telecommunication infrastructure upgrade.", + startDate: "2023-06-01T00:00:00Z", + endDate: "2023-12-01T00:00:00Z", + }, + { + projectId: "project_11587620-dccc-43b5-9b7f-22f394201eb1", + category: "projects", + name: "Juliet", + description: "Initiative to enhance cyber-security measures.", + startDate: "2023-07-01T00:00:00Z", + endDate: "2024-02-01T00:00:00Z", + }, + ], + users: [ + { + username: "AliceJones", + teamId: "team_5e636f8b-d031-4b30-a896-b0c8b0e447e4", + profilePictureUrl: "p1.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174001", + userId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + category: "users", + }, + { + username: "BobSmith", + teamId: "team_3018a9b2-40cd-4d68-9e24-8385663e644e", + profilePictureUrl: "p2.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174002", + userId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + category: "users", + }, + { + username: "CarolWhite", + teamId: "team_d3094821-3dcf-452a-9098-7d795be03dda", + profilePictureUrl: "p3.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174003", + userId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "users", + }, + { + username: "DaveBrown", + teamId: "team_89d7e134-edcf-4803-97f7-79ae5b600fd4", + profilePictureUrl: "p4.jpeg", + cognitoId: "213b7530-1031-70e0-67e9-fe0805e18fb3", + userId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "users", + }, + { + username: "EveClark", + teamId: "team_7c927ad0-f714-49f2-bd30-3cd901947fe7", + profilePictureUrl: "p5.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174005", + userId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + category: "users", + }, + { + username: "FrankWright", + teamId: "team_5e636f8b-d031-4b30-a896-b0c8b0e447e4", + profilePictureUrl: "p6.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174006", + userId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "users", + }, + { + username: "GraceHall", + teamId: "team_3018a9b2-40cd-4d68-9e24-8385663e644e", + profilePictureUrl: "p7.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174007", + userId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + category: "users", + }, + { + username: "HenryAllen", + teamId: "team_d3094821-3dcf-452a-9098-7d795be03dda", + profilePictureUrl: "p8.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174008", + userId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "users", + }, + { + username: "IdaMartin", + teamId: "team_89d7e134-edcf-4803-97f7-79ae5b600fd4", + profilePictureUrl: "p9.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174009", + userId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + category: "users", + }, + { + username: "JohnDoe", + teamId: "team_7c927ad0-f714-49f2-bd30-3cd901947fe7", + profilePictureUrl: "p10.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174010", + userId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "users", + }, + { + username: "LauraAdams", + teamId: "team_5e636f8b-d031-4b30-a896-b0c8b0e447e4", + profilePictureUrl: "p11.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174011", + userId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + category: "users", + }, + { + username: "NormanBates", + teamId: "team_3018a9b2-40cd-4d68-9e24-8385663e644e", + profilePictureUrl: "p12.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174012", + userId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + category: "users", + }, + { + username: "OliviaPace", + teamId: "team_d3094821-3dcf-452a-9098-7d795be03dda", + profilePictureUrl: "p13.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174013", + userId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + category: "users", + }, + { + username: "PeterQuill", + teamId: "team_89d7e134-edcf-4803-97f7-79ae5b600fd4", + profilePictureUrl: "p1.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174014", + userId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + category: "users", + }, + { + username: "QuincyAdams", + teamId: "team_7c927ad0-f714-49f2-bd30-3cd901947fe7", + profilePictureUrl: "p2.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174015", + userId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + category: "users", + }, + { + username: "RachelGreen", + teamId: "team_5e636f8b-d031-4b30-a896-b0c8b0e447e4", + profilePictureUrl: "p3.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174016", + userId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + category: "users", + }, + { + username: "SteveJobs", + teamId: "team_3018a9b2-40cd-4d68-9e24-8385663e644e", + profilePictureUrl: "p4.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174017", + userId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + category: "users", + }, + { + username: "TinaFey", + teamId: "team_d3094821-3dcf-452a-9098-7d795be03dda", + profilePictureUrl: "p5.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174018", + userId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + category: "users", + }, + { + username: "UrsulaMonroe", + teamId: "team_89d7e134-edcf-4803-97f7-79ae5b600fd4", + profilePictureUrl: "p6.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174019", + userId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + category: "users", + }, + { + username: "VictorHugo", + teamId: "team_7c927ad0-f714-49f2-bd30-3cd901947fe7", + profilePictureUrl: "p7.jpeg", + cognitoId: "123e4567-e89b-12d3-a456-426614174020", + userId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + category: "users", + }, + ], + teams: [ + { + teamName: "Quantum Innovations", + productOwnerUserId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + projectManagerUserId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + teamId: "team_5e636f8b-d031-4b30-a896-b0c8b0e447e4", + category: "teams", + }, + { + teamName: "Nebula Research", + productOwnerUserId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + projectManagerUserId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + teamId: "team_3018a9b2-40cd-4d68-9e24-8385663e644e", + category: "teams", + }, + { + teamName: "Orion Solutions", + productOwnerUserId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + projectManagerUserId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + teamId: "team_d3094821-3dcf-452a-9098-7d795be03dda", + category: "teams", + }, + { + teamName: "Krypton Developments", + productOwnerUserId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + projectManagerUserId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + teamId: "team_89d7e134-edcf-4803-97f7-79ae5b600fd4", + category: "teams", + }, + { + teamName: "Zenith Technologies", + productOwnerUserId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + projectManagerUserId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + teamId: "team_7c927ad0-f714-49f2-bd30-3cd901947fe7", + category: "teams", + }, + ], + tasks: [ + { + taskId: "task_994027bc-432f-42d1-be17-64bf4a92d3fe", + title: "Task 1", + description: "Design the main module.", + status: "Work In Progress", + priority: "Urgent", + tags: "Design", + startDate: "2023-01-10T00:00:00Z", + dueDate: "2023-04-10T00:00:00Z", + projectId: "project_cd557609-92ca-41ae-b6ee-f98576d6182e", + authorUserId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + assignedUserId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + category: "tasks", + }, + { + taskId: "task_a96e1514-52fe-4ab4-ab8d-3c821dd3da45", + title: "Task 2", + description: "Implement the navigation algorithm.", + status: "To Do", + priority: "High", + tags: "Coding", + startDate: "2023-01-15T00:00:00Z", + dueDate: "2023-05-15T00:00:00Z", + projectId: "project_fbb5e1ca-592c-4c5c-a40b-1a8e30c33649", + authorUserId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + assignedUserId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "tasks", + }, + { + taskId: "task_d3687c2f-37bd-42fe-be80-1be371103f77", + title: "Task 3", + description: "Develop renewable energy solutions.", + status: "Work In Progress", + priority: "Urgent", + tags: "Development", + startDate: "2023-03-20T00:00:00Z", + dueDate: "2023-09-20T00:00:00Z", + projectId: "project_b413975d-342d-4cbd-89b3-04db3fc9bdf4", + authorUserId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + assignedUserId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "tasks", + }, + { + taskId: "task_9b39b0f7-8f31-4751-b0b0-68bc6e063cec", + title: "Task 4", + description: "Outline new software development workflows.", + status: "To Do", + priority: "High", + tags: "Planning", + startDate: "2023-01-25T00:00:00Z", + dueDate: "2023-06-25T00:00:00Z", + projectId: "project_71e357a2-744f-48d5-af62-7458b02fae7c", + authorUserId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + assignedUserId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "tasks", + }, + { + taskId: "task_56e85bac-e8f5-409f-b259-4a35008a8fe8", + title: "Task 5", + description: "Research AI models for prediction.", + status: "Work In Progress", + priority: "Urgent", + tags: "Research", + startDate: "2023-04-20T00:00:00Z", + dueDate: "2023-10-20T00:00:00Z", + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + authorUserId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + assignedUserId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "tasks", + }, + { + taskId: "task_ecb7d6b0-2dd9-43c1-aea3-76dba7813b5a", + title: "Task 6", + description: "Biotech product testing.", + status: "To Do", + priority: "Backlog", + tags: "Testing", + startDate: "2023-03-01T00:00:00Z", + dueDate: "2023-08-01T00:00:00Z", + projectId: "project_ab747e29-cc49-4cb7-bd4c-ad2f4e426bf8", + authorUserId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + assignedUserId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + category: "tasks", + }, + { + taskId: "task_4dce6744-3fd6-4474-8f2a-f97f7ad11dd3", + title: "Task 7", + description: "AI optimization for golf equipment.", + status: "Work In Progress", + priority: "Urgent", + tags: "Optimization", + startDate: "2023-05-15T00:00:00Z", + dueDate: "2023-11-15T00:00:00Z", + projectId: "project_59830e80-3549-4e74-b6b7-5be1d079cbff", + authorUserId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + assignedUserId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + category: "tasks", + }, + { + taskId: "task_1101d686-832f-4761-9672-997ec186327d", + title: "Task 8", + description: "Overhaul of the database for hotel management.", + status: "To Do", + priority: "High", + tags: "Database", + startDate: "2023-04-01T00:00:00Z", + dueDate: "2023-10-01T00:00:00Z", + projectId: "project_1752467c-ead8-445b-bc13-ca6094a3cb77", + authorUserId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + assignedUserId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + category: "tasks", + }, + { + taskId: "task_9a46a58b-eda8-42cc-928a-cd33010592af", + title: "Task 9", + description: "Upgrade telecom infrastructure.", + status: "Work In Progress", + priority: "Urgent", + tags: "Infrastructure", + startDate: "2023-06-10T00:00:00Z", + dueDate: "2023-12-10T00:00:00Z", + projectId: "project_087de368-f99a-40d3-a50c-769977d832fe", + authorUserId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + assignedUserId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + category: "tasks", + }, + { + taskId: "task_80ce9458-278f-420f-b7fa-bc4a2a2a42c5", + title: "Task 10", + description: "Enhance security protocols.", + status: "To Do", + priority: "Urgent", + tags: "Security", + startDate: "2023-07-05T00:00:00Z", + dueDate: "2024-01-05T00:00:00Z", + projectId: "project_11587620-dccc-43b5-9b7f-22f394201eb1", + authorUserId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + assignedUserId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + category: "tasks", + }, + { + taskId: "task_76362e63-a9fa-464e-b9ba-12a5304492b3", + title: "Task 11", + description: "Finalize AI training parameters.", + status: "Work In Progress", + priority: "Urgent", + tags: "AI, Training", + startDate: "2023-01-20T00:00:00Z", + dueDate: "2023-05-20T00:00:00Z", + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + authorUserId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + assignedUserId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "tasks", + }, + { + taskId: "task_386ca851-53be-409a-a4b6-14eb323fb37f", + title: "Task 12", + description: "Update server security protocols.", + status: "To Do", + priority: "High", + tags: "Security", + startDate: "2023-02-10T00:00:00Z", + dueDate: "2023-06-10T00:00:00Z", + projectId: "project_cd557609-92ca-41ae-b6ee-f98576d6182e", + authorUserId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + assignedUserId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "tasks", + }, + { + taskId: "task_8500ec06-7bb3-4e7e-a78c-8e10e1f929f3", + title: "Task 13", + description: "Redesign user interface for better UX.", + status: "Work In Progress", + priority: "Urgent", + tags: "Design, UX", + startDate: "2023-03-15T00:00:00Z", + dueDate: "2023-07-15T00:00:00Z", + projectId: "project_fbb5e1ca-592c-4c5c-a40b-1a8e30c33649", + authorUserId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + assignedUserId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "tasks", + }, + { + taskId: "task_94857e73-9d25-4216-9118-01b062f8ac9f", + title: "Task 14", + description: "Implement real-time data analytics.", + status: "To Do", + priority: "High", + tags: "Analytics", + startDate: "2023-04-05T00:00:00Z", + dueDate: "2023-08-05T00:00:00Z", + projectId: "project_b413975d-342d-4cbd-89b3-04db3fc9bdf4", + authorUserId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + assignedUserId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "tasks", + }, + { + taskId: "task_8f9f9180-7fc7-4054-b915-31b872ad2744", + title: "Task 15", + description: "Develop end-to-end encryption solution.", + status: "Work In Progress", + priority: "Urgent", + tags: "Encryption", + startDate: "2023-05-01T00:00:00Z", + dueDate: "2023-09-01T00:00:00Z", + projectId: "project_71e357a2-744f-48d5-af62-7458b02fae7c", + authorUserId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + assignedUserId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "tasks", + }, + { + taskId: "task_290b6013-39a6-4ce0-ad1e-0c1eb4722acb", + title: "Task 16", + description: "Optimize cloud storage usage.", + status: "To Do", + priority: "Backlog", + tags: "Cloud, Storage", + startDate: "2023-06-15T00:00:00Z", + dueDate: "2023-10-15T00:00:00Z", + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + authorUserId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + assignedUserId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + category: "tasks", + }, + { + taskId: "task_fc6a33f0-afa1-4d74-baf0-c3253a10baef", + title: "Task 17", + description: "Test software for hardware compatibility.", + status: "Work In Progress", + priority: "Urgent", + tags: "Testing, Hardware", + startDate: "2023-07-10T00:00:00Z", + dueDate: "2023-11-10T00:00:00Z", + projectId: "project_ab747e29-cc49-4cb7-bd4c-ad2f4e426bf8", + authorUserId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + assignedUserId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + category: "tasks", + }, + { + taskId: "task_c585e0a8-4c4a-4997-a041-94fad0c88ddb", + title: "Task 18", + description: "Create new data visualization tools.", + status: "To Do", + priority: "High", + tags: "Visualization", + startDate: "2023-08-05T00:00:00Z", + dueDate: "2023-12-05T00:00:00Z", + projectId: "project_59830e80-3549-4e74-b6b7-5be1d079cbff", + authorUserId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + assignedUserId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + category: "tasks", + }, + { + taskId: "task_25d77f3a-e23f-461c-b1c5-3f319b1d08e0", + title: "Task 19", + description: "Build prototype for new IoT devices.", + status: "Work In Progress", + priority: "Urgent", + tags: "IoT", + startDate: "2023-09-01T00:00:00Z", + dueDate: "2024-01-01T00:00:00Z", + projectId: "project_1752467c-ead8-445b-bc13-ca6094a3cb77", + authorUserId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + assignedUserId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + category: "tasks", + }, + { + taskId: "task_1bb5baf3-81aa-470e-8f8c-78b6a65c07d5", + title: "Task 20", + description: "Update legacy systems to new tech standards.", + status: "To Do", + priority: "Urgent", + tags: "Legacy, Upgrade", + startDate: "2023-10-10T00:00:00Z", + dueDate: "2024-02-10T00:00:00Z", + projectId: "project_087de368-f99a-40d3-a50c-769977d832fe", + authorUserId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + assignedUserId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + category: "tasks", + }, + { + taskId: "task_fca7a654-09ff-499a-ba83-ec85b58914e7", + title: "Task 21", + description: "Establish new network security framework.", + status: "Work In Progress", + priority: "Urgent", + tags: "Security", + startDate: "2023-01-30T00:00:00Z", + dueDate: "2023-05-30T00:00:00Z", + projectId: "project_11587620-dccc-43b5-9b7f-22f394201eb1", + authorUserId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + assignedUserId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "tasks", + }, + { + taskId: "task_228bcd95-f750-44cb-a19f-bde27d9f72ae", + title: "Task 22", + description: "Revise application deployment strategies.", + status: "To Do", + priority: "High", + tags: "Deployment", + startDate: "2023-02-20T00:00:00Z", + dueDate: "2023-06-20T00:00:00Z", + projectId: "project_cd557609-92ca-41ae-b6ee-f98576d6182e", + authorUserId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + assignedUserId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "tasks", + }, + { + taskId: "task_1126ab19-592b-4e1f-823c-98c3dadabc8e", + title: "Task 23", + description: "Conduct market analysis for product fit.", + status: "Work In Progress", + priority: "Urgent", + tags: "Market Analysis", + startDate: "2023-03-25T00:00:00Z", + dueDate: "2023-07-25T00:00:00Z", + projectId: "project_fbb5e1ca-592c-4c5c-a40b-1a8e30c33649", + authorUserId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + assignedUserId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "tasks", + }, + { + taskId: "task_2641ceba-3617-4245-a455-cd25ea8c5da1", + title: "Task 24", + description: "Optimize user feedback collection mechanism.", + status: "To Do", + priority: "High", + tags: "Feedback", + startDate: "2023-04-15T00:00:00Z", + dueDate: "2023-08-15T00:00:00Z", + projectId: "project_b413975d-342d-4cbd-89b3-04db3fc9bdf4", + authorUserId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + assignedUserId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "tasks", + }, + { + taskId: "task_b6c518b5-b10d-4d32-b909-125e24799ece", + title: "Task 25", + description: "Integrate new API for third-party services.", + status: "Work In Progress", + priority: "Urgent", + tags: "API Integration", + startDate: "2023-05-05T00:00:00Z", + dueDate: "2023-09-05T00:00:00Z", + projectId: "project_71e357a2-744f-48d5-af62-7458b02fae7c", + authorUserId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + assignedUserId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "tasks", + }, + { + taskId: "task_4e1a5767-4f8e-44e0-866c-307d5165c029", + title: "Task 26", + description: "Update internal tooling for development teams.", + status: "To Do", + priority: "Backlog", + tags: "Tooling", + startDate: "2023-06-25T00:00:00Z", + dueDate: "2023-10-25T00:00:00Z", + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + authorUserId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + assignedUserId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + category: "tasks", + }, + { + taskId: "task_f3d591d6-05ce-4ade-9688-5d51805449e9", + title: "Task 27", + description: "Prepare cloud migration strategy document.", + status: "Work In Progress", + priority: "Urgent", + tags: "Cloud Migration", + startDate: "2023-07-20T00:00:00Z", + dueDate: "2023-11-20T00:00:00Z", + projectId: "project_ab747e29-cc49-4cb7-bd4c-ad2f4e426bf8", + authorUserId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + assignedUserId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + category: "tasks", + }, + { + taskId: "task_a6ab1e1e-22bd-4b7a-a88c-4c87ab930370", + title: "Task 28", + description: "Design scalable database architecture.", + status: "To Do", + priority: "Medium", + tags: "Database Design", + startDate: "2023-08-15T00:00:00Z", + dueDate: "2023-12-15T00:00:00Z", + projectId: "project_59830e80-3549-4e74-b6b7-5be1d079cbff", + authorUserId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + assignedUserId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + category: "tasks", + }, + { + taskId: "task_086af389-9063-4fcc-b8fa-f5aa359f8c59", + title: "Task 29", + description: "Prototype new mobile technology.", + status: "Work In Progress", + priority: "Urgent", + tags: "Mobile Tech", + startDate: "2023-09-10T00:00:00Z", + dueDate: "2024-01-10T00:00:00Z", + projectId: "project_1752467c-ead8-445b-bc13-ca6094a3cb77", + authorUserId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + assignedUserId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + category: "tasks", + }, + { + taskId: "task_31d53887-c283-43a1-a7a3-92251f7db239", + title: "Task 30", + description: "Enhance data encryption levels.", + status: "To Do", + priority: "High", + tags: "Encryption", + startDate: "2023-10-15T00:00:00Z", + dueDate: "2024-02-15T00:00:00Z", + projectId: "project_087de368-f99a-40d3-a50c-769977d832fe", + authorUserId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + assignedUserId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + category: "tasks", + }, + { + taskId: "task_d2a8b706-5ebc-4f95-966f-69d5982178f8", + title: "Task 31", + description: "Refactor backend code for better maintainability.", + status: "Work In Progress", + priority: "Urgent", + tags: "Refactoring, Backend", + startDate: "2023-11-01T00:00:00Z", + dueDate: "2024-03-01T00:00:00Z", + projectId: "project_11587620-dccc-43b5-9b7f-22f394201eb1", + authorUserId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + assignedUserId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + category: "tasks", + }, + { + taskId: "task_19e9a168-444a-484c-8992-4c32c5cb79b1", + title: "Task 32", + description: + "Expand the network infrastructure to support increased traffic.", + status: "To Do", + priority: "Medium", + tags: "Networking, Infrastructure", + startDate: "2023-11-05T00:00:00Z", + dueDate: "2024-01-05T00:00:00Z", + projectId: "project_cd557609-92ca-41ae-b6ee-f98576d6182e", + authorUserId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + assignedUserId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "tasks", + }, + { + taskId: "task_2575adcf-fa95-4bc6-baef-c4987e578064", + title: "Task 33", + description: "Create a new client dashboard interface.", + status: "Work In Progress", + priority: "Urgent", + tags: "UI, Dashboard", + startDate: "2023-11-10T00:00:00Z", + dueDate: "2024-02-10T00:00:00Z", + projectId: "project_fbb5e1ca-592c-4c5c-a40b-1a8e30c33649", + authorUserId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + assignedUserId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + category: "tasks", + }, + { + taskId: "task_2286c8ac-37f5-414b-b9e6-16fa6184a582", + title: "Task 34", + description: + "Develop an automated testing framework for new software releases.", + status: "To Do", + priority: "Medium", + tags: "Testing, Automation", + startDate: "2023-11-15T00:00:00Z", + dueDate: "2024-03-15T00:00:00Z", + projectId: "project_b413975d-342d-4cbd-89b3-04db3fc9bdf4", + authorUserId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + assignedUserId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + category: "tasks", + }, + { + taskId: "task_401dc52d-f23d-48e8-86b4-08c74dd9cf14", + title: "Task 35", + description: + "Optimize database queries to improve application performance.", + status: "Work In Progress", + priority: "Urgent", + tags: "Database, Optimization", + startDate: "2023-11-20T00:00:00Z", + dueDate: "2024-01-20T00:00:00Z", + projectId: "project_71e357a2-744f-48d5-af62-7458b02fae7c", + authorUserId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + assignedUserId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + category: "tasks", + }, + { + taskId: "task_d7d312c8-e9d3-4e0f-a0fc-dc3423a28a19", + title: "Task 36", + description: "Implement end-user training for new system features.", + status: "To Do", + priority: "Backlog", + tags: "Training, User Experience", + startDate: "2023-11-25T00:00:00Z", + dueDate: "2024-01-25T00:00:00Z", + projectId: "project_21028ad5-39b2-4a0c-9dcd-4c2dec158e67", + authorUserId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + assignedUserId: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + category: "tasks", + }, + { + taskId: "task_92864315-1d36-49a5-96cb-5d4dd39c4f69", + title: "Task 37", + description: + "Conduct a comprehensive security audit of the existing infrastructure.", + status: "Work In Progress", + priority: "Urgent", + tags: "Security, Audit", + startDate: "2023-12-01T00:00:00Z", + dueDate: "2024-02-01T00:00:00Z", + projectId: "project_ab747e29-cc49-4cb7-bd4c-ad2f4e426bf8", + authorUserId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + assignedUserId: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + category: "tasks", + }, + { + taskId: "task_2a4d4f7e-bf85-475d-a459-07665323bc86", + title: "Task 38", + description: "Revise mobile app to incorporate new payment integrations.", + status: "To Do", + priority: "Medium", + tags: "Mobile, Payments", + startDate: "2023-12-05T00:00:00Z", + dueDate: "2024-02-05T00:00:00Z", + projectId: "project_59830e80-3549-4e74-b6b7-5be1d079cbff", + authorUserId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + assignedUserId: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + category: "tasks", + }, + { + taskId: "task_e7a90a9f-6587-45f2-9700-f5756d3672fb", + title: "Task 39", + description: "Update cloud configuration to optimize costs.", + status: "Work In Progress", + priority: "Urgent", + tags: "Cloud, Cost Saving", + startDate: "2023-12-10T00:00:00Z", + dueDate: "2024-02-10T00:00:00Z", + projectId: "project_1752467c-ead8-445b-bc13-ca6094a3cb77", + authorUserId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + assignedUserId: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + category: "tasks", + }, + { + taskId: "task_d345b8e5-ccd8-4323-b87e-24b41fb1e94b", + title: "Task 40", + description: "Implement automated backup procedures for critical data.", + status: "To Do", + priority: "High", + tags: "Backup, Automation", + startDate: "2023-12-15T00:00:00Z", + dueDate: "2024-02-15T00:00:00Z", + projectId: "project_087de368-f99a-40d3-a50c-769977d832fe", + authorUserId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + assignedUserId: "user_9eafa797-b57a-4897-9bd2-c69657133045", + category: "tasks", + }, + ], + comments: [ + { + id: "comment_41613938-0120-4ca1-8f87-f92b40ccde31", + text: "We need to update this design to include new specifications.", + taskId: "task_994027bc-432f-42d1-be17-64bf4a92d3fe", + userId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + category: "comments", + }, + { + id: "comment_381edcde-4d0f-4cbe-a43e-db0c802d1f49", + text: "Can we meet to discuss the navigation algorithm updates?", + taskId: "task_a96e1514-52fe-4ab4-ab8d-3c821dd3da45", + userId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "comments", + }, + { + id: "comment_0949565e-f36c-44d6-a2f2-196acb3e0a78", + text: "This energy solution looks promising, but needs more research.", + taskId: "task_d3687c2f-37bd-42fe-be80-1be371103f77", + userId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "comments", + }, + { + id: "comment_067edd74-fbd3-4546-946b-260603e19511", + text: "Let's revise the software development workflow to include agile methodologies.", + taskId: "task_9b39b0f7-8f31-4751-b0b0-68bc6e063cec", + userId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "comments", + }, + { + id: "comment_0d63dc27-5deb-4d2a-aa17-4d047011cf9e", + text: "We should consider newer AI models for better accuracy.", + taskId: "task_56e85bac-e8f5-409f-b259-4a35008a8fe8", + userId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "comments", + }, + { + id: "comment_fd649a66-f3ba-4efb-98c6-69ffa75b5658", + text: "Product testing needs to be more rigorous.", + taskId: "task_ecb7d6b0-2dd9-43c1-aea3-76dba7813b5a", + userId: "user_5864820a-b381-4315-93b7-4a12b6733b79", + category: "comments", + }, + { + id: "comment_4a2b91fa-6537-4399-b293-f210e4115f24", + text: "Optimization algorithms are not yet efficient.", + taskId: "task_4dce6744-3fd6-4474-8f2a-f97f7ad11dd3", + userId: "user_286d39ce-7ac9-4f08-9fca-60a280c73d08", + category: "comments", + }, + { + id: "comment_126291d7-0531-4610-aca3-d19701195051", + text: "Database overhaul could impact current operations negatively.", + taskId: "task_1101d686-832f-4761-9672-997ec186327d", + userId: "user_8f6d84a9-b03e-4c74-a6ec-e0c38d7a191f", + category: "comments", + }, + { + id: "comment_8c008f94-777b-4377-b7e6-d266818000ee", + text: "Infrastructure upgrades must be done during low traffic hours.", + taskId: "task_9a46a58b-eda8-42cc-928a-cd33010592af", + userId: "user_52125532-3eec-4417-b46d-4b4c1a868fe2", + category: "comments", + }, + { + id: "comment_f001f846-452a-443b-be3a-d6da007434c0", + text: "Security measures need to be enhanced to prevent data breaches.", + taskId: "task_80ce9458-278f-420f-b7fa-bc4a2a2a42c5", + userId: "user_4aa28dc2-c27c-4cb0-9d41-45d28a363fd6", + category: "comments", + }, + { + id: "comment_b3de1c5b-fec9-4754-a75f-6c2ccf0390d2", + text: "Consider using more robust training datasets for AI.", + taskId: "task_76362e63-a9fa-464e-b9ba-12a5304492b3", + userId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + category: "comments", + }, + { + id: "comment_afb28e4b-6a8a-446f-9112-13ea88c97091", + text: "Server security update meeting scheduled for next week.", + taskId: "task_386ca851-53be-409a-a4b6-14eb323fb37f", + userId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + category: "comments", + }, + { + id: "comment_ced783c5-bd3f-488a-b354-b7b9248ee542", + text: "UX redesign has been well received in initial user tests.", + taskId: "task_8500ec06-7bb3-4e7e-a78c-8e10e1f929f3", + userId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "comments", + }, + { + id: "comment_bb40588f-2560-44e2-9e88-08d664e22d36", + text: "Data analytics implementation needs to account for real-time processing delays.", + taskId: "task_94857e73-9d25-4216-9118-01b062f8ac9f", + userId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "comments", + }, + { + id: "comment_98de1eca-5657-41f7-a5ef-c19af98c7c44", + text: "Encryption project needs to align with international security standards.", + taskId: "task_8f9f9180-7fc7-4054-b915-31b872ad2744", + userId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + category: "comments", + }, + { + id: "comment_7c3abf4e-dcdd-4259-ad7f-97f69e6fc650", + text: "Review cloud storage optimization strategies in Q3 meeting.", + taskId: "task_290b6013-39a6-4ce0-ad1e-0c1eb4722acb", + userId: "user_13e6110a-94fe-47a5-a871-0f6cb11cff6b", + category: "comments", + }, + { + id: "comment_ac527493-b2e5-40ea-aaa8-600e9634f420", + text: "Hardware compatibility tests to include newer device models.", + taskId: "task_fc6a33f0-afa1-4d74-baf0-c3253a10baef", + userId: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + category: "comments", + }, + { + id: "comment_4b564ae7-adbd-48e7-8748-161b8ec44cac", + text: "Visualization tools to support both 2D and 3D data representations.", + taskId: "task_c585e0a8-4c4a-4997-a041-94fad0c88ddb", + userId: "user_0e6a9986-9d18-4f09-a929-f12e100b8a8c", + category: "comments", + }, + { + id: "comment_f8c1e0dd-f867-40e6-b8e9-b21b0637cce5", + text: "IoT device prototypes to undergo extensive field testing.", + taskId: "task_25d77f3a-e23f-461c-b1c5-3f319b1d08e0", + userId: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + category: "comments", + }, + { + id: "comment_2a365a9e-99c1-40dd-9cf9-a7ed7a496282", + text: "Legacy system upgrade to start with backend databases.", + taskId: "task_1bb5baf3-81aa-470e-8f8c-78b6a65c07d5", + userId: "user_fcfbd4aa-8d90-47e1-9924-b6572a651f6c", + category: "comments", + }, + { + id: "comment_41af5b08-54fc-4d76-9762-48629103a00a", + text: "Network security framework should prioritize threat detection improvements.", + taskId: "task_fca7a654-09ff-499a-ba83-ec85b58914e7", + userId: "user_48e27675-4b2e-4545-9993-b1da61d17567", + category: "comments", + }, + { + id: "comment_32f18bc6-9ed5-465d-8358-b3a927eefff1", + text: "Application deployment strategies to include Docker integration.", + taskId: "task_228bcd95-f750-44cb-a19f-bde27d9f72ae", + userId: "user_88f7f4de-222a-447b-864a-ab2b0bc1e498", + category: "comments", + }, + { + id: "comment_11383080-09ec-4140-a32e-092d6e7726ee", + text: "Market analysis should cover competitive product landscapes.", + taskId: "task_1126ab19-592b-4e1f-823c-98c3dadabc8e", + userId: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "comments", + }, + { + id: "comment_a1462f84-156f-4291-8088-c5c4a878bc67", + text: "Feedback mechanisms to utilize adaptive questioning techniques.", + taskId: "task_2641ceba-3617-4245-a455-cd25ea8c5da1", + userId: "user_5bd8df22-19a2-4b7c-aafb-3551a9fb2558", + category: "comments", + }, + { + id: "comment_6ef3c180-524b-495d-ba04-cb6f8c295ab3", + text: "API integration must ensure data privacy compliance.", + taskId: "task_b6c518b5-b10d-4d32-b909-125e24799ece", + userId: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + category: "comments", + }, + ], + attachments: [ + { + id: "attachment_0eb8632f-6019-4019-9863-5ab8bd7dfb19", + fileURL: "i1.jpg", + fileName: "DesignDoc.pdf", + taskId: "task_994027bc-432f-42d1-be17-64bf4a92d3fe", + uploadedById: "user_48e27675-4b2e-4545-9993-b1da61d17567", + category: "attachments", + }, + { + id: "attachment_dca3ae8c-5c38-4fd8-af15-3a1250a8c9e7", + fileURL: "i2.jpg", + fileName: "NavAlgorithm.pdf", + taskId: "task_a96e1514-52fe-4ab4-ab8d-3c821dd3da45", + uploadedById: "user_58bde92e-adf9-4559-9d0a-73735c346ec9", + category: "attachments", + }, + { + id: "attachment_254a04fe-4a64-46e0-99d7-f1ab55ad3213", + fileURL: "i3.jpg", + fileName: "EnergySolutions.pdf", + taskId: "task_d3687c2f-37bd-42fe-be80-1be371103f77", + uploadedById: "user_76a2a1a6-dc98-4831-8cd8-eaa42e9436ec", + category: "attachments", + }, + { + id: "attachment_3874f819-f4f0-4d73-9d64-3094b85fe961", + fileURL: "i4.jpg", + fileName: "SoftwareWorkflow.pdf", + taskId: "task_9b39b0f7-8f31-4751-b0b0-68bc6e063cec", + uploadedById: "user_14d53c47-4463-4530-917b-dfe3b3b13017", + category: "attachments", + }, + { + id: "attachment_c0896eff-97fc-4d20-81ab-e2420b377bc2", + fileURL: "i5.jpg", + fileName: "AIPredictions.pdf", + taskId: "task_56e85bac-e8f5-409f-b259-4a35008a8fe8", + uploadedById: "user_1eacee2f-2fdb-4860-a02d-56bb30098867", + category: "attachments", + }, + { + id: "attachment_3c9e2dba-6240-4544-8d3b-70e28c5369ee", + fileURL: "i6.jpg", + fileName: "BiotechTest.pdf", + taskId: "task_ecb7d6b0-2dd9-43c1-aea3-76dba7813b5a", + uploadedById: "user_992e3915-72a6-4e52-ab8a-e75010b3c716", + category: "attachments", + }, + { + id: "attachment_f6e2e3ce-84b3-43d8-b129-13919935d773", + fileURL: "i7.jpg", + fileName: "GolfAI.pdf", + taskId: "task_4dce6744-3fd6-4474-8f2a-f97f7ad11dd3", + uploadedById: "user_871804df-722c-4f10-91b2-852ed69a1ad9", + category: "attachments", + }, + { + id: "attachment_a9861682-060c-4a3f-af16-78e832c2a0aa", + fileURL: "i8.jpg", + fileName: "HotelDB.pdf", + taskId: "task_1101d686-832f-4761-9672-997ec186327d", + uploadedById: "user_87ce0766-86d8-43d5-af17-bcc8cdbbf50f", + category: "attachments", + }, + { + id: "attachment_67a5fa00-4f47-4425-8381-3caab288ef3e", + fileURL: "i9.jpg", + fileName: "TelecomUpgrade.pdf", + taskId: "task_9a46a58b-eda8-42cc-928a-cd33010592af", + uploadedById: "user_6bd3900c-0387-46ad-a7fa-d921a3390fb7", + category: "attachments", + }, + { + id: "attachment_f8413921-b3fb-4624-b048-8dadaac6a39c", + fileURL: "i10.jpg", + fileName: "SecurityProtocol.pdf", + taskId: "task_80ce9458-278f-420f-b7fa-bc4a2a2a42c5", + uploadedById: "user_9eafa797-b57a-4897-9bd2-c69657133045", + category: "attachments", + }, + ], +}; + +const SLS_REGION = process.env.SLS_REGION; +const TASKER_PROJECT_TABLE_NAME = process.env.TASKER_PROJECT_TABLE_NAME || ""; +const TASKER_TASK_TABLE_NAME = process.env.TASKER_TASK_TABLE_NAME || ""; +const TASKER_USER_TABLE_NAME = process.env.TASKER_USER_TABLE_NAME || ""; +const TASKER_TASK_EXTRA_TABLE_NAME = + process.env.TASKER_TASK_EXTRA_TABLE_NAME || ""; +const TASKER_TEAM_TABLE_NAME = process.env.TASKER_TEAM_TABLE_NAME || ""; + +const client = new DynamoDBClient({ region: SLS_REGION }); +const docClient = DynamoDBDocument.from(client); + +export const handler = async () => { + try { + // Insert data into DynamoDB tables + for (const [tableName, items] of Object.entries(seedData)) { + console.info( + `Populating data for table ${tableName} with ${items.length} items...` + ); + let dynamoTableName = ""; + + // Map seed data keys to corresponding DynamoDB table names + switch (tableName) { + case "projects": + dynamoTableName = TASKER_PROJECT_TABLE_NAME; + break; + case "tasks": + dynamoTableName = TASKER_TASK_TABLE_NAME; + break; + case "users": + dynamoTableName = TASKER_USER_TABLE_NAME; + break; + case "attachments": + dynamoTableName = TASKER_TASK_EXTRA_TABLE_NAME; + break; + case "comments": + dynamoTableName = TASKER_TASK_EXTRA_TABLE_NAME; + break; + case "teams": + dynamoTableName = TASKER_TEAM_TABLE_NAME; + break; + default: + console.warn(`Unknown table name: ${tableName}`); + continue; + } + + for (const item of items as Array) { + const params: PutCommandInput = { + TableName: dynamoTableName, + Item: item, + }; + + try { + if (!DRY_RUN) { + await docClient.put(params); + } + } catch (err) { + console.error(`Failed to insert item into ${dynamoTableName}:`, err); + } + } + console.info(`Data population for table ${tableName} complete.`); + } + + console.log("Data population complete."); + } catch (error) { + console.error("Failed to populate data:", error); + } +}; diff --git a/tasker-server/serverless.yml b/tasker-server/serverless.yml index bc2349f..2e2b9eb 100644 --- a/tasker-server/serverless.yml +++ b/tasker-server/serverless.yml @@ -40,6 +40,11 @@ provider: - "arn:aws:execute-api:${self:provider.region}:*:*/*/POST/users" functions: + populateSeedData: + handler: seed/populateSeedData.handler + memorySize: 1024 + timeout: 60 + # POST /users or triggered by Cognito createUser: handler: src/handlers/createUser.handler diff --git a/tasker-server/src/handlers/createProject.ts b/tasker-server/src/handlers/createProject.ts index 75e6354..1c31e94 100644 --- a/tasker-server/src/handlers/createProject.ts +++ b/tasker-server/src/handlers/createProject.ts @@ -14,7 +14,7 @@ export const handler = async (event: any): Promise => { try { const newProject = { category: "projects", - projectId: `project#${uuidv4()}`, + projectId: `project_${uuidv4()}`, name, description, startDate, diff --git a/tasker-server/src/handlers/createTask.ts b/tasker-server/src/handlers/createTask.ts index caef865..53f1dc0 100644 --- a/tasker-server/src/handlers/createTask.ts +++ b/tasker-server/src/handlers/createTask.ts @@ -25,7 +25,7 @@ export const handler = async (event: any): Promise => { try { const newTask = { category: "tasks", - taskId: `task#${uuidv4()}`, + taskId: `task_${uuidv4()}`, title, description, status, diff --git a/tasker-server/src/handlers/createUser.ts b/tasker-server/src/handlers/createUser.ts index 0cd9032..37fed23 100644 --- a/tasker-server/src/handlers/createUser.ts +++ b/tasker-server/src/handlers/createUser.ts @@ -10,6 +10,7 @@ const client = new DynamoDBClient({ region: SLS_REGION }); const docClient = DynamoDBDocument.from(client); export const handler = async (event: any): Promise => { + console.info(`Event: ${JSON.stringify(event)}`); const username = event.request.userAttributes["preferred_username"] || event.userName; const cognitoId = event.userName; @@ -19,9 +20,9 @@ export const handler = async (event: any): Promise => { const newUser = { category: "users", cognitoId, - userId: `user#${uuidv4()}`, + userId: `user_${uuidv4()}`, username, - profilePictureUrl: "i0.jpg", + profilePictureUrl: "p0.jpeg", teamId, }; diff --git a/tasker-server/src/handlers/postSignUp.ts b/tasker-server/src/handlers/postSignUp.ts deleted file mode 100644 index cf63274..0000000 --- a/tasker-server/src/handlers/postSignUp.ts +++ /dev/null @@ -1,44 +0,0 @@ -import https from "https"; -import path from "path"; - -const API_BASE_URL = process.env.API_BASE_URL || ""; - -export const handler = async (event: any): Promise => { - const postData = JSON.stringify({ - username: - event.request.userAttributes["preferred_username"] || event.userName, - cognitoId: event.userName, - }); - - console.log(postData); - - const options = { - hostname: API_BASE_URL ? new URL(API_BASE_URL).hostname : "", - port: 443, - path: API_BASE_URL - ? path.join(new URL(API_BASE_URL).pathname, "/users") - : "", - method: "POST", - headers: { - "Content-category": "application/json", - "Content-Length": Buffer.byteLength(postData), - "Allow-Control-Allow-Origin": "*", - }, - }; - - const responseBody = await new Promise((resolve, reject) => { - const req = https.request(options, (res) => { - res.setEncoding("utf8"); - let responseBody = ""; - res.on("data", (chunk) => (responseBody += chunk)); - res.on("end", () => resolve(responseBody)); - }); - req.on("error", (error) => reject(error)); - req.write(postData); - req.end(); - }); - - console.log(responseBody); - - return event; -}; diff --git a/tasker-server/src/lib/util.ts b/tasker-server/src/lib/util.ts index bdaa6d2..b443839 100644 --- a/tasker-server/src/lib/util.ts +++ b/tasker-server/src/lib/util.ts @@ -2,7 +2,7 @@ import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocument, QueryCommandInput } from "@aws-sdk/lib-dynamodb"; const SLS_REGION = process.env.SLS_REGION; -const TASKER_PROJECT_TABLE_NAME = process.env.TASKER_PROJECT_TABLE_NAME || ""; +const TASKER_TEAM_TABLE_NAME = process.env.TASKER_TEAM_TABLE_NAME || ""; const TASKER_USER_TABLE_NAME = process.env.TASKER_USER_TABLE_NAME || ""; const TASKER_TASK_TABLE_NAME = process.env.TASKER_TASK_TABLE_NAME || ""; const TASKER_TASK_EXTRA_TABLE_NAME = @@ -13,20 +13,20 @@ const docClient = DynamoDBDocument.from(client); export const fetchRandomTeamId = async () => { const params = { - TableName: TASKER_PROJECT_TABLE_NAME, + TableName: TASKER_TEAM_TABLE_NAME, KeyConditionExpression: "category = :category", ExpressionAttributeValues: { ":category": "teams", }, }; - const projects = await docClient.query(params); - if (!projects.Items) { + const teams = await docClient.query(params); + if (!teams.Items) { return null; } - const randomProject = - projects.Items[Math.floor(Math.random() * projects.Items.length)]; - return randomProject.id; + const randomTeam = + teams.Items[Math.floor(Math.random() * teams.Items.length)]; + return randomTeam.teamId; }; export const fetchUserWithUserId = async (userId: string): Promise => { diff --git a/tasker-server/terraform/s3.tf b/tasker-server/terraform/s3.tf index d14da77..0796eda 100644 --- a/tasker-server/terraform/s3.tf +++ b/tasker-server/terraform/s3.tf @@ -1,11 +1,22 @@ resource "aws_s3_bucket" "tasker_public_images" { bucket = "tasker-public-images" - - tags = { - Environment = "Dev" - } } +resource "aws_s3_bucket_policy" "public_read_policy" { + bucket = aws_s3_bucket.tasker_public_images.id + policy = data.aws_iam_policy_document.public_read_policy.json +} + +data "aws_iam_policy_document" "public_read_policy" { + statement { + actions = ["s3:GetObject"] + resources = ["${aws_s3_bucket.tasker_public_images.arn}/*"] + principals { + type = "AWS" + identifiers = ["*"] + } + } +} resource "aws_s3_bucket_ownership_controls" "tasker_public_images_ownership_controls" { bucket = aws_s3_bucket.tasker_public_images.id
- ID: {task.id} + ID: {task.taskId}
Title: {task.title} diff --git a/tasker-client/src/app/home/page.tsx b/tasker-client/src/app/home/page.tsx index 4fc7bdc..c4185a9 100644 --- a/tasker-client/src/app/home/page.tsx +++ b/tasker-client/src/app/home/page.tsx @@ -5,6 +5,7 @@ import { Priority, Project, Task, + useGetAuthUserQuery, useGetProjectsQuery, useGetTasksByUserQuery, } from "@/state/api"; @@ -77,12 +78,13 @@ const taskColumns: GridColDef[] = [ const statusColors = ["#0088FE", "#00C49F", "#FFBB28", "#FF8042"]; const HomePage = () => { - const userId = 1; + const { data: currentUser } = useGetAuthUserQuery({}); + const userId = currentUser?.userDetails?.userId ?? null; const { data: tasks, isLoading: tasksLoading, isError: tasksError, - } = useGetTasksByUserQuery(userId || 0, { + } = useGetTasksByUserQuery(userId || "", { skip: userId === null, }); const { data: projects, isLoading: isProjectsLoading } = @@ -191,6 +193,7 @@ const HomePage = () => { columns={taskColumns} checkboxSelection loading={tasksLoading} + getRowId={(row) => row.taskId} getRowClassName={() => "data-grid-row"} getCellClassName={() => "data-grid-cell"} className="border border-gray-200 bg-white shadow dark:border-stroke-dark dark:bg-dark-secondary dark:text-gray-200" diff --git a/tasker-client/src/app/priority/reusablePriorityPage/index.tsx b/tasker-client/src/app/priority/reusablePriorityPage/index.tsx index dbdbc40..817e305 100644 --- a/tasker-client/src/app/priority/reusablePriorityPage/index.tsx +++ b/tasker-client/src/app/priority/reusablePriorityPage/index.tsx @@ -83,7 +83,7 @@ const ReusablePriorityPage = ({ priority }: Props) => { data: tasks, isLoading, isError: isTasksError, - } = useGetTasksByUserQuery(userId || 0, { + } = useGetTasksByUserQuery(userId || "", { skip: userId === null, }); @@ -135,7 +135,7 @@ const ReusablePriorityPage = ({ priority }: Props) => { ) : view === "list" ? (