tango-app-api-task 3.6.0-task-5 → 3.6.0-task-6
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
|
@@ -40,7 +40,7 @@ export const overallCardsV1 = async ( req, res ) => {
|
|
|
40
40
|
toDate = new Date( toDate.getTime() - userTimezoneOffset );
|
|
41
41
|
toDate.setUTCHours( 23, 59, 59, 59 );
|
|
42
42
|
|
|
43
|
-
let taskToDate = new Date(
|
|
43
|
+
let taskToDate = new Date( req.body.toDate );
|
|
44
44
|
taskToDate.setDate( taskToDate.getDate() + 1 );
|
|
45
45
|
|
|
46
46
|
let groupQuery = {
|
|
@@ -61,7 +61,7 @@ export const overallCardsV1 = async ( req, res ) => {
|
|
|
61
61
|
$match: {
|
|
62
62
|
// date_iso: { $gte: new Date( req.body.fromDate ), $lte: toDate },
|
|
63
63
|
scheduleStartTime_iso: { $lt: taskToDate },
|
|
64
|
-
scheduleEndTime_iso: { $gte: fromDate },
|
|
64
|
+
scheduleEndTime_iso: { $gte: new Date( req.body.fromDate ) },
|
|
65
65
|
sourceCheckList_id: { $in: taskIdList },
|
|
66
66
|
checklistStatus: 'submit',
|
|
67
67
|
approvalStatus: false,
|
|
@@ -136,7 +136,7 @@ export const approvalTableV1 = async ( req, res ) => {
|
|
|
136
136
|
toDate = new Date( toDate.getTime() - userTimezoneOffset );
|
|
137
137
|
toDate.setUTCHours( 23, 59, 59, 59 );
|
|
138
138
|
|
|
139
|
-
let taskToDate = new Date(
|
|
139
|
+
let taskToDate = new Date( req.body.toDate );
|
|
140
140
|
taskToDate.setDate( taskToDate.getDate() + 1 );
|
|
141
141
|
|
|
142
142
|
let groupQuery = [ {
|
|
@@ -213,7 +213,7 @@ export const approvalTableV1 = async ( req, res ) => {
|
|
|
213
213
|
$match: {
|
|
214
214
|
// date_iso: { $gte: new Date( req.body.fromDate ), $lte: toDate },
|
|
215
215
|
scheduleStartTime_iso: { $lt: taskToDate },
|
|
216
|
-
scheduleEndTime_iso: { $gte: fromDate },
|
|
216
|
+
scheduleEndTime_iso: { $gte: new Date( req.body.fromDate ) },
|
|
217
217
|
sourceCheckList_id: { $in: taskIdList },
|
|
218
218
|
// ...( req.body?.storeId?.length ) ? { store_id: { $in: req.body.storeId } } :{},
|
|
219
219
|
$or: [ { store_id: { $in: requestData.storeId } }, { store_id: { $eq: '' }, userEmail: { $in: requestData.userEmailes || [] } } ],
|
|
@@ -429,7 +429,7 @@ export const taskInfoTableV1 = async ( req, res ) => {
|
|
|
429
429
|
for ( let task of result.taskInfo ) {
|
|
430
430
|
exportResult.push( {
|
|
431
431
|
'Store': task?.storeName ||'--',
|
|
432
|
-
'
|
|
432
|
+
'User Name': task?.userName ||'--',
|
|
433
433
|
'User Email': task?.userEmail ||'--',
|
|
434
434
|
...( task?.checkListFrom === 'api' && { 'Type': task?.zoneName || '--' } ),
|
|
435
435
|
'Due On': dayjs.utc( task?.scheduleEndTime_iso ).format( 'DD MMM, YYYY' ) || '--',
|