tango-app-api-trax 3.7.13-qid-halfshutter-3 → 3.7.13-qid-halfshutter-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-trax",
3
- "version": "3.7.13-qid-halfshutter-3",
3
+ "version": "3.7.13-qid-halfshutter-4",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1255,10 +1255,13 @@ export async function insertTimeDelayFlags( req, res ) {
1255
1255
  if ( !req.body.date ) {
1256
1256
  return res.sendError( 'date is required', 400 );
1257
1257
  }
1258
-
1258
+ // Fix for timezone based issue for diff stores
1259
+ const currentDate = new Date( req.body.date );
1260
+ const prevDate = new Date( req.body.date );
1261
+ prevDate.setDate( prevDate.getDate() - 1 );
1259
1262
  let query = [ {
1260
1263
  $match: {
1261
- date_iso: new Date( req.body.date ),
1264
+ date_iso: { $in: [ currentDate, prevDate ] },
1262
1265
  checklistStatus: { $ne: 'submit' },
1263
1266
  checkListType: { $in: [ 'custom' ] },
1264
1267
  timeFlag: 0,