- PR Change Requests (Progress)

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-10 16:48:06 -04:00
parent 693d02de87
commit 3d753a2d19
15 changed files with 186 additions and 94 deletions

View File

@@ -2,8 +2,15 @@ import React from "react";
import TaskListContainer from "../../components/task-list/task-list.container.jsx";
import { QUERY_ALL_TASKS_PAGINATED, QUERY_MY_TASKS_PAGINATED } from "../../graphql/tasks.queries.js";
import taskPageTypes from "./taskPageTypes.jsx";
import { createStructuredSelector } from "reselect";
import { selectCurrentUser } from "../../redux/user/user.selectors.js";
export default function TasksPageComponent({ bodyshop, currentUser, type }) {
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser
});
const mapDispatchToProps = (dispatch) => ({});
export default function TasksPageComponent({ currentUser, type }) {
switch (type) {
case taskPageTypes.MY_TASKS:
return (
@@ -12,20 +19,11 @@ export default function TasksPageComponent({ bodyshop, currentUser, type }) {
relationshipId={currentUser.email}
relationshipType={"user"}
query={{ QUERY_MY_TASKS_PAGINATED }}
bodyshop={bodyshop}
titleTranslation={"tasks.titles.my_tasks"}
currentUser={currentUser}
/>
);
case taskPageTypes.ALL_TASKS:
return (
<TaskListContainer
query={{ QUERY_ALL_TASKS_PAGINATED }}
bodyshop={bodyshop}
titleTranslation={"tasks.titles.all_tasks"}
currentUser={currentUser}
/>
);
return <TaskListContainer query={{ QUERY_ALL_TASKS_PAGINATED }} titleTranslation={"tasks.titles.all_tasks"} />;
default:
return <></>;
}