tango-app-api-trax 3.8.7 → 3.8.9

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.8.7",
3
+ "version": "3.8.9",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -125,15 +125,17 @@ export async function getcustomerunattendedlist( req, res ) {
125
125
  let config = [];
126
126
  if ( req.body.ChecklistType == 'storeopenandclose' ) {
127
127
  config = await processedchecklistconfigService.find( { date_string: { $gte: req.body.fromDate, $lte: req.body.toDate }, checkListType: req.body.ChecklistType }, { date_string: 1, aiConfig: 1 } );
128
- req.body.liveDate = [];
129
- req.body.eodDate = [];
128
+ req.body.liveDate = new Set();
129
+ req.body.eodDate = new Set();
130
130
  config.forEach( ( data ) => {
131
131
  if ( data?.aiConfig?.advancedConfig?.dataProcessing == 'live' ) {
132
- req.body.liveDate.push( data.date_string );
132
+ req.body.liveDate.add( data.date_string );
133
133
  } else {
134
- req.body.eodDate.push( data.date_string );
134
+ req.body.eodDate.add( data.date_string );
135
135
  }
136
136
  } );
137
+ req.body.liveDate = [ ...req.body.liveDate ];
138
+ req.body.eodDate = [ ...req.body.eodDate ];
137
139
  }
138
140
  let url = JSON.parse( process.env.LAMBDAURL );
139
141
  let resultData = await LamdaServiceCall( url.customerUnattended, req.body );
@@ -574,7 +574,7 @@ export const userlist = async ( req, res ) => {
574
574
  let query = {
575
575
  clientId: req.query.clientId,
576
576
  isActive: true,
577
- // role: { $ne: 'user' },
577
+ role: { $ne: 'user' },
578
578
  };
579
579
 
580
580
  let userDetails = await userService.find( query );