tango-app-api-audit 3.4.60 → 3.4.61

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-audit",
3
- "version": "3.4.60",
3
+ "version": "3.4.61",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4845,6 +4845,9 @@ export async function auditViewLogs( req, res ) {
4845
4845
  break;
4846
4846
  case 'uniform-detection':
4847
4847
  case 'mobile-detection':
4848
+ case 'cleaning':
4849
+ case 'open-time':
4850
+ case 'close-time':
4848
4851
  logsQuery = {
4849
4852
  'size': 100,
4850
4853
  'query': {
@@ -4956,41 +4959,41 @@ export async function auditViewLogs( req, res ) {
4956
4959
  ],
4957
4960
  };
4958
4961
  break;
4959
- case 'scrum':
4962
+
4960
4963
  case 'cleaning':
4961
- logsQuery = {
4962
- 'size': 100,
4963
- 'query': {
4964
- 'bool': {
4965
- 'must': [
4966
- {
4967
- 'term': {
4968
- 'logData.fileDate.keyword': inputData.fileDate,
4969
- },
4970
- },
4971
- {
4972
- 'term': {
4973
- 'logData.storeId.keyword': inputData.storeId,
4974
- },
4975
- },
4976
- {
4977
- 'term': {
4978
- 'logData.moduleType.keyword': inputData.moduleType,
4979
- },
4980
- },
4981
- {
4982
- 'terms': {
4983
- 'logSubType.keyword': [ 'auditDone', 'reTrigger' ],
4984
- },
4985
- },
4986
- ],
4987
- },
4988
- },
4989
- 'sort': [
4990
- { createdAt: { order: 'desc' } },
4991
- ],
4992
- };
4993
- break;
4964
+ // logsQuery = {
4965
+ // 'size': 100,
4966
+ // 'query': {
4967
+ // 'bool': {
4968
+ // 'must': [
4969
+ // {
4970
+ // 'term': {
4971
+ // 'logData.fileDate.keyword': inputData.fileDate,
4972
+ // },
4973
+ // },
4974
+ // {
4975
+ // 'term': {
4976
+ // 'logData.storeId.keyword': inputData.storeId,
4977
+ // },
4978
+ // },
4979
+ // {
4980
+ // 'term': {
4981
+ // 'logData.moduleType.keyword': inputData.moduleType,
4982
+ // },
4983
+ // },
4984
+ // {
4985
+ // 'terms': {
4986
+ // 'logSubType.keyword': [ 'auditDone', 'reTrigger' ],
4987
+ // },
4988
+ // },
4989
+ // ],
4990
+ // },
4991
+ // },
4992
+ // 'sort': [
4993
+ // { createdAt: { order: 'desc' } },
4994
+ // ],
4995
+ // };
4996
+ // break;
4994
4997
  default:
4995
4998
  return res.sendError( 'Please give valid modueType', 400 );
4996
4999
  }
@@ -1265,7 +1265,7 @@ export async function saveBinary( req, res ) {
1265
1265
  _id: inputData.auditId,
1266
1266
  storeId: inputData.storeId,
1267
1267
  fileDate: inputData.fileDate,
1268
- tempId: inputData.tempId,
1268
+ streamName: req.userAudit?.streamName,
1269
1269
  moduleType: inputData.moduleType,
1270
1270
  };
1271
1271
 
@@ -1647,7 +1647,7 @@ export async function saveBinary( req, res ) {
1647
1647
  _id: inputData.auditId,
1648
1648
  storeId: inputData.storeId,
1649
1649
  fileDate: inputData.fileDate,
1650
- tempId: inputData.tempId,
1650
+ streamName: req.userAudit?.streamName,
1651
1651
  moduleType: inputData.moduleType,
1652
1652
  };
1653
1653
 
@@ -1680,7 +1680,7 @@ export async function saveBinary( req, res ) {
1680
1680
  },
1681
1681
  {
1682
1682
  'term': {
1683
- 'moduleType.keyword': inputData.streamName,
1683
+ 'streamName.keyword': inputData.streamName,
1684
1684
  },
1685
1685
  },
1686
1686
  ];
@@ -2626,6 +2626,8 @@ export async function storeMetrics( req, res ) {
2626
2626
  case 'mobile-detection':
2627
2627
  case 'scrum':
2628
2628
  case 'cleaning':
2629
+ case 'open-time':
2630
+ case 'close-time':
2629
2631
  traxAuditDataQuery= {
2630
2632
  fileDate: '$fileDate', storeId: '$storeId', moduleType: '$moduleType',
2631
2633
  };
@@ -3638,6 +3640,8 @@ export async function pendingSummaryTable( req, res ) {
3638
3640
  case 'mobile-detection':
3639
3641
  case 'scrum':
3640
3642
  case 'cleaning':
3643
+ case 'open-time':
3644
+ case 'close-time':
3641
3645
  traxAuditDataQuery= {
3642
3646
  fileDate: '$fileDate', storeId: '$storeId', moduleType: '$moduleType',
3643
3647
  };