@@ -13,6 +13,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions.js
|
|||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings.js";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings.js";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors.js";
|
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors.js";
|
||||||
|
const dayjs = require('../../utils/day');
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -69,7 +70,8 @@ export function TaskListContainer({
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
const toggleCompletedStatus = async (id, currentStatus) => {
|
const toggleCompletedStatus = async (id, currentStatus) => {
|
||||||
const completed_at = !currentStatus ? new Date().toISOString() : null;
|
const completed_at = !currentStatus ? dayjs().toISOString() : null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const toggledTask = await toggleTaskCompleted({
|
const toggledTask = await toggleTaskCompleted({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -115,7 +117,7 @@ export function TaskListContainer({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const toggleDeletedStatus = async (id, currentStatus) => {
|
const toggleDeletedStatus = async (id, currentStatus) => {
|
||||||
const deleted_at = !currentStatus ? new Date().toISOString() : null;
|
const deleted_at = !currentStatus ? dayjs().toISOString() : null;
|
||||||
try {
|
try {
|
||||||
const toggledTask = await toggleTaskDeleted({
|
const toggledTask = await toggleTaskDeleted({
|
||||||
variables: {
|
variables: {
|
||||||
|
|||||||
Reference in New Issue
Block a user