tango-app-api-trax 3.3.1-hotfix-3 → 3.3.1-hotfix-5

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.3.1-hotfix-3",
3
+ "version": "3.3.1-hotfix-5",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "mongodb": "^6.8.0",
27
27
  "nodemon": "^3.1.4",
28
28
  "path": "^0.12.7",
29
- "tango-api-schema": "^2.2.67",
29
+ "tango-api-schema": "^2.2.70",
30
30
  "tango-app-api-middleware": "^3.1.55",
31
31
  "url": "^0.11.4",
32
32
  "winston": "^3.13.1",
@@ -304,7 +304,7 @@ async function insertData( requestData ) {
304
304
  },
305
305
  } );
306
306
  let getSections = await CLquestions.aggregate( sectionQuery );
307
- if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ].includes( getCLconfig.checkListType ) ) {
307
+ if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
308
308
  if ( getSections.length ) {
309
309
  for ( let element3 of getSections ) {
310
310
  let collectQuestions = {};
@@ -338,7 +338,6 @@ async function insertData( requestData ) {
338
338
  getquestionQuery.push( {
339
339
  $match: {
340
340
  checkListId: element2,
341
- checkFlag: true,
342
341
  isdeleted: false,
343
342
  },
344
343
  } );
@@ -598,7 +597,7 @@ async function insertData( requestData ) {
598
597
  // }
599
598
  }
600
599
  } else {
601
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ].includes( getCLconfig.checkListType ) ) {
600
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
602
601
  let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active' }, { storeId: 1 } );
603
602
  let data = {
604
603
  checkListId: updatedchecklist._id,
@@ -594,7 +594,7 @@ export const flagCardsV1 = async ( req, res ) => {
594
594
  {
595
595
  client_id: clientId,
596
596
  publish: true,
597
- checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] },
597
+ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] },
598
598
  },
599
599
  { checkListType: 1 },
600
600
  );
@@ -732,7 +732,7 @@ export const flagComparisonCardsV1 = async ( req, res ) => {
732
732
  {
733
733
  client_id: requestData.clientId,
734
734
  publish: true,
735
- checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] },
735
+ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] },
736
736
  },
737
737
  { checkListType: 1 },
738
738
  );
@@ -809,7 +809,7 @@ export const flagTablesV1 = async ( req, res ) => {
809
809
 
810
810
  if ( requestData?.filter === 'all' ) {
811
811
  // findAndQuery.push( { $or: [ { questionFlag: { $gte: 1 } }, { timeFlag: { $gte: 1 } }, { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] } } ] } );
812
- findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] } } ] } );
812
+ findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } } ] } );
813
813
  } else if ( requestData?.filter === 'question' ) {
814
814
  findAndQuery.push( { checkListType: 'custom' } );
815
815
  findAndQuery.push( { questionFlag: { $gte: 1 } } );
@@ -817,7 +817,7 @@ export const flagTablesV1 = async ( req, res ) => {
817
817
  findAndQuery.push( { checkListType: 'custom' } );
818
818
  findAndQuery.push( { timeFlag: { $gte: 1 } } );
819
819
  } else if ( requestData?.filter === 'detection' ) {
820
- findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] } } );
820
+ findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } } );
821
821
  }
822
822
 
823
823
  findQuery.push( { $match: { $and: findAndQuery } } );
@@ -888,6 +888,8 @@ export const flagTablesV1 = async ( req, res ) => {
888
888
  { '$gt': [ '$uniformDetectionFlag', 0 ] },
889
889
  { '$gt': [ '$customerUnattended', 0 ] },
890
890
  { '$gt': [ '$staffLeftInTheMiddle', 0 ] },
891
+ { '$gt': [ '$cleaning', 0 ] },
892
+ { '$gt': [ '$scrum', 0 ] },
891
893
  ],
892
894
  },
893
895
  1,
@@ -2507,6 +2509,7 @@ export const flagChecklistTableV1 = async ( req, res ) => {
2507
2509
  return res.sendError( 'No Content', 204 );
2508
2510
  }
2509
2511
  }
2512
+ console.log( reqestData );
2510
2513
 
2511
2514
  let LamdaURL = 'https://vpcejaftccr3jzqf5wrdkks7yy0krqix.lambda-url.ap-south-1.on.aws/';
2512
2515
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
@@ -2658,7 +2661,7 @@ export const checklistDropdownV1 = async ( req, res ) => {
2658
2661
  $or: [
2659
2662
  { questionFlag: { $gte: 1 } },
2660
2663
  { timeFlag: { $gte: 1 } },
2661
- { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection' ] } },
2664
+ { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum' ] } },
2662
2665
  ],
2663
2666
  },
2664
2667
  ] } },
@@ -3422,7 +3422,7 @@ async function updateOpenSearch( user, data ) {
3422
3422
  export const aiChecklist = async ( req, res ) => {
3423
3423
  try {
3424
3424
  let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
3425
- let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ];
3425
+ let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum' ];
3426
3426
  let checklistDetails = [];
3427
3427
  let publishList = [];
3428
3428
  let unpublishList = [];
@@ -3808,7 +3808,7 @@ export async function updateAssign( req, res ) {
3808
3808
  let userData = {
3809
3809
  userName: assign.userName,
3810
3810
  email: assign.userEmail,
3811
- mobileNumber: assign?.phone || '',
3811
+ mobileNumber: assign?.userPhone || '',
3812
3812
  clientId: req.body.clientId,
3813
3813
  };
3814
3814
  userDetails = await createUser( userData );