- reapply proper prettier formatting.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -12,7 +12,16 @@ import TaskListComponent from "./task-list.component.jsx";
|
||||
import {notification} from "antd";
|
||||
import {useTranslation} from "react-i18next";
|
||||
|
||||
export default function TaskListContainer({bodyshop, titleTranslation ,query, relationshipType, relationshipId, currentUser, onlyMine, parentJobId}) {
|
||||
export default function TaskListContainer({
|
||||
bodyshop,
|
||||
titleTranslation,
|
||||
query,
|
||||
relationshipType,
|
||||
relationshipId,
|
||||
currentUser,
|
||||
onlyMine,
|
||||
parentJobId
|
||||
}) {
|
||||
const {t} = useTranslation();
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const {page, sortcolumn, sortorder, deleted, completed, mine} = searchParams;
|
||||
@@ -26,7 +35,7 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
|
||||
[relationshipType]: relationshipId,
|
||||
deleted: deleted === 'true',
|
||||
completed: completed === "true",
|
||||
assigned_to: mine === "true" ? currentUser.email: undefined, // replace currentUserID with the actual ID of the current user
|
||||
assigned_to: mine === "true" ? currentUser.email : undefined, // replace currentUserID with the actual ID of the current user
|
||||
offset: page ? (page - 1) * pageLimit : 0,
|
||||
limit: pageLimit,
|
||||
order: [
|
||||
@@ -56,7 +65,7 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
|
||||
window.removeEventListener('taskUpdated', handleTaskUpdated);
|
||||
};
|
||||
}, [refetch]);
|
||||
|
||||
|
||||
/**
|
||||
* Toggle task completed mutation
|
||||
*/
|
||||
@@ -81,8 +90,8 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
|
||||
// refetch().catch((e) => {
|
||||
// console.error(`Something went wrong fetching tasks: ${e.message || ''}`);
|
||||
// });
|
||||
window.dispatchEvent( new CustomEvent('taskUpdated', {
|
||||
detail: { message: 'A task has been completed.' },
|
||||
window.dispatchEvent(new CustomEvent('taskUpdated', {
|
||||
detail: {message: 'A task has been completed.'},
|
||||
}));
|
||||
notification["success"]({
|
||||
message: t("tasks.successes.completed"),
|
||||
@@ -115,8 +124,8 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
|
||||
deleted_at: deleted_at
|
||||
}
|
||||
});
|
||||
window.dispatchEvent( new CustomEvent('taskUpdated', {
|
||||
detail: { message: 'A task has been deleted.' },
|
||||
window.dispatchEvent(new CustomEvent('taskUpdated', {
|
||||
detail: {message: 'A task has been deleted.'},
|
||||
}));
|
||||
// refetch().catch((e) => {
|
||||
// console.error(`Something went wrong fetching tasks: ${e.message || ''}`);
|
||||
|
||||
Reference in New Issue
Block a user