- Progress

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-09 16:32:26 -04:00
parent 15c9529885
commit 6b9269eb2d
8 changed files with 29 additions and 145 deletions

View File

@@ -104,18 +104,6 @@ export function JobsDetailPage({
form.resetFields();
}, [form, job]);
useEffect(() => {
const handleTaskUpdated = async (event) => {
await refetch().catch((e) => `Something went wrong fetching tasks: ${e.message || ""}`);
};
window.addEventListener("taskUpdated", handleTaskUpdated);
// Clean up the event listener when the component is unmounted.
return () => {
window.removeEventListener("taskUpdated", handleTaskUpdated);
};
}, [refetch]);
//useKeyboardSaveShortcut(form.submit);
const handleFinish = async (values) => {
@@ -410,7 +398,7 @@ export function JobsDetailPage({
bodyshop={bodyshop}
relationshipType={"jobid"}
relationshipId={job.id}
query={QUERY_JOB_TASKS_PAGINATED}
query={{ QUERY_JOB_TASKS_PAGINATED }}
titleTranslation="tasks.titles.job_tasks"
showRo={false}
/>

View File

@@ -23,7 +23,7 @@ const mapDispatchToProps = (dispatch) => ({
setTaskUpsertContext: (context) => dispatch(setModalContext({ context, modal: "taskUpsert" }))
});
export function MyTasksPageContainer({
export function AllTasksPageContainer({
bodyshop,
currentUser,
setBreadcrumbs,
@@ -67,4 +67,4 @@ export function MyTasksPageContainer({
return <TasksPageComponent type={TaskPageTypes.ALL_TASKS} currentUser={currentUser} bodyshop={bodyshop} />;
}
export default connect(mapStateToProps, mapDispatchToProps)(MyTasksPageContainer);
export default connect(mapStateToProps, mapDispatchToProps)(AllTasksPageContainer);

View File

@@ -11,7 +11,7 @@ export default function TasksPageComponent({ bodyshop, currentUser, type }) {
onlyMine={true}
relationshipId={currentUser.email}
relationshipType={"user"}
query={QUERY_MY_TASKS_PAGINATED}
query={{ QUERY_MY_TASKS_PAGINATED }}
bodyshop={bodyshop}
titleTranslation={"tasks.titles.my_tasks"}
currentUser={currentUser}
@@ -20,7 +20,7 @@ export default function TasksPageComponent({ bodyshop, currentUser, type }) {
case taskPageTypes.ALL_TASKS:
return (
<TaskListContainer
query={QUERY_ALL_TASKS_PAGINATED}
query={{ QUERY_ALL_TASKS_PAGINATED }}
bodyshop={bodyshop}
titleTranslation={"tasks.titles.all_tasks"}
currentUser={currentUser}