- Progress Commit

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-01 14:45:55 -04:00
parent 54dc9c8587
commit ae07f71e76
17 changed files with 223 additions and 78 deletions

View File

@@ -12,10 +12,10 @@ 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}) {
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} = searchParams;
const {page, sortcolumn, sortorder, deleted, completed, mine} = searchParams;
const {loading, error, data, refetch} = useQuery(
query,
{
@@ -26,6 +26,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
offset: page ? (page - 1) * pageLimit : 0,
limit: pageLimit,
order: [
@@ -147,6 +148,8 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
toggleDeletedStatus={toggleDeletedStatus}
relationshipType={relationshipType}
relationshipId={relationshipId}
onlyMine={onlyMine}
parentJobId={parentJobId}
/>
);
}