diff --git a/client/src/components/task-list/task-list.container.jsx b/client/src/components/task-list/task-list.container.jsx index 796249ec4..ddc9520b2 100644 --- a/client/src/components/task-list/task-list.container.jsx +++ b/client/src/components/task-list/task-list.container.jsx @@ -13,6 +13,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions.js import AuditTrailMapping from "../../utils/AuditTrailMappings.js"; import { createStructuredSelector } from "reselect"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors.js"; +const dayjs = require('../../utils/day'); const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -69,7 +70,8 @@ export function TaskListContainer({ * @returns {Promise} */ const toggleCompletedStatus = async (id, currentStatus) => { - const completed_at = !currentStatus ? new Date().toISOString() : null; + const completed_at = !currentStatus ? dayjs().toISOString() : null; + try { const toggledTask = await toggleTaskCompleted({ variables: { @@ -115,7 +117,7 @@ export function TaskListContainer({ */ const toggleDeletedStatus = async (id, currentStatus) => { - const deleted_at = !currentStatus ? new Date().toISOString() : null; + const deleted_at = !currentStatus ? dayjs().toISOString() : null; try { const toggledTask = await toggleTaskDeleted({ variables: {