Wip backend (#4)

* feat: Add new API handlers for user, project, and task management; update package dependencies

* feat: Update .gitignore, add Lambda layer configuration, and refactor DynamoDB handlers to use AWS SDK v3

* feat: Update serverless configuration and refactor API handlers to improve error handling and response structure

* feat: Add Cognito user pool name parameter and update API handlers to include CORS headers

* feat: Update task and project ID formats, add populateSeedData function, and enhance user ID handling

* feat: Update image source paths to use S3 public URL for profile and task attachments
This commit was merged in pull request #4.
This commit is contained in:
2024-11-23 18:17:00 +02:00
committed by GitHub
parent ac8455ab3a
commit 11e61829f1
39 changed files with 5438 additions and 100 deletions

View File

@@ -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"