tango-app-api-infra 3.0.77-dev → 3.0.78-dev

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-infra",
3
- "version": "3.0.77-dev",
3
+ "version": "3.0.78-dev",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "nodemon": "^3.1.0",
28
28
  "swagger-ui-express": "^5.0.0",
29
29
  "tango-api-schema": "^2.0.101",
30
- "tango-app-api-middleware": "^1.0.68-dev",
30
+ "tango-app-api-middleware": "^1.0.70-test",
31
31
  "winston": "^3.12.0",
32
32
  "winston-daily-rotate-file": "^5.0.0"
33
33
  },
@@ -377,6 +377,18 @@ export async function workHistory( req, res ) {
377
377
  { 'issueClosedDate': { $lte: date.end } },
378
378
  ],
379
379
 
380
+ },
381
+ },
382
+ );
383
+ } else if ( req.body.dateFilter === 'issueDate' ) {
384
+ query.push(
385
+ {
386
+ $match: {
387
+ $and: [
388
+ { 'issueDate': { $gte: date.start } },
389
+ { 'issueDate': { $lte: date.end } },
390
+ ],
391
+
380
392
  },
381
393
  },
382
394
  );
@@ -411,6 +423,7 @@ export async function workHistory( req, res ) {
411
423
  storeName: '$basicDetails.storeName',
412
424
  clientId: '$basicDetails.clientId',
413
425
  clientName: '$basicDetails.clientName',
426
+ issueType: 1,
414
427
  issueDate: { $dateToString: { format: '%Y-%m-%d', date: '$createdAt' } },
415
428
  issueClosedDate: { $dateToString: { format: '%Y-%m-%d', date: '$issueClosedDate' } },
416
429
  issueIdentifiedDate: { $dateToString: { format: '%Y-%m-%d', date: '$ticketDetails.issueIdentifiedDate' } },
@@ -440,6 +453,7 @@ export async function workHistory( req, res ) {
440
453
  $project: {
441
454
  storeId: 1,
442
455
  storeName: 1,
456
+ issueType: 1,
443
457
  clientId: 1,
444
458
  clientName: 1,
445
459
  issueDate: 1,
@@ -452,13 +466,20 @@ export async function workHistory( req, res ) {
452
466
  infraIssue: { $ifNull: [ '$primaryIssue.reasons.primaryIssue', '' ] },
453
467
  },
454
468
  } );
455
- if ( req.body.issueFilter && req.body.issueFilter.length>0 ) {
469
+ if ( req.body.issueFilter && req.body.issueFilter.length>0&&req.body.issueType!='dataMismatch' ) {
456
470
  query.push( {
457
471
  $match: {
458
472
  infraIssue: { $in: req.body.issueFilter },
459
473
  },
460
474
  } );
461
475
  }
476
+ if ( req.body.issueFilter && req.body.issueFilter.length>0&&req.body.issueType==='dataMismatch' ) {
477
+ query.push( {
478
+ $match: {
479
+ issueType: { $in: req.body.issueFilter },
480
+ },
481
+ } );
482
+ }
462
483
  if ( req.body.searchValue && req.body.searchValue !== '' ) {
463
484
  query.push( {
464
485
  $match: {