tango-app-api-trax 3.5.0-alpha-5 → 3.5.0-alpha-7

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.5.0-alpha-5",
3
+ "version": "3.5.0-alpha-7",
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.115",
29
+ "tango-api-schema": "^2.2.116",
30
30
  "tango-app-api-middleware": "^3.1.72",
31
31
  "url": "^0.11.4",
32
32
  "winston": "^3.13.1",
@@ -295,7 +295,7 @@ export async function PCLconfigCreation( req, res ) {
295
295
  },
296
296
  } );
297
297
  let getSections = await CLquestions.aggregate( sectionQuery );
298
- if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection' ].includes( getCLconfig.checkListType ) ) {
298
+ if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
299
299
  if ( getSections.length ) {
300
300
  for ( let element3 of getSections ) {
301
301
  let collectQuestions = {};
@@ -589,11 +589,11 @@ export async function PCLconfigCreation( req, res ) {
589
589
  // }
590
590
  }
591
591
  } else {
592
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection' ].includes( getCLconfig.checkListType ) ) {
592
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
593
593
  let storeNameList = allQuestion.map( ( item ) => item.store_id );
594
- let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
594
+ let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
595
595
  let storeList = storeDetails.map( ( store ) => store.storeId );
596
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
596
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
597
597
  allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
598
598
  } else {
599
599
  allQuestion = storeDetails.map( ( item ) => {
@@ -627,7 +627,7 @@ export async function PCLconfigCreation( req, res ) {
627
627
  client_id: getCLconfig.client_id,
628
628
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
629
629
  };
630
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
630
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
631
631
  let processData = {
632
632
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
633
633
  return { storeName: store.storeName, storeId: store.store_id, events: store.events };
@@ -861,7 +861,7 @@ async function insertData( requestData ) {
861
861
  },
862
862
  } );
863
863
  let getSections = await CLquestions.aggregate( sectionQuery );
864
- if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection' ].includes( getCLconfig.checkListType ) ) {
864
+ if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
865
865
  if ( getSections.length ) {
866
866
  for ( let element3 of getSections ) {
867
867
  let collectQuestions = {};
@@ -1154,11 +1154,11 @@ async function insertData( requestData ) {
1154
1154
  // }
1155
1155
  }
1156
1156
  } else {
1157
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection' ].includes( getCLconfig.checkListType ) ) {
1157
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
1158
1158
  let storeNameList = allQuestion.map( ( item ) => item.store_id );
1159
- let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
1159
+ let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
1160
1160
  let storeList = storeDetails.map( ( store ) => store.storeId );
1161
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
1161
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
1162
1162
  allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
1163
1163
  } else {
1164
1164
  allQuestion = storeDetails.map( ( item ) => {
@@ -1192,7 +1192,7 @@ async function insertData( requestData ) {
1192
1192
  client_id: getCLconfig.client_id,
1193
1193
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
1194
1194
  };
1195
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
1195
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
1196
1196
  let processData = {
1197
1197
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
1198
1198
  return { storeName: store.storeName, storeId: store.store_id, events: store.events };
@@ -3821,7 +3821,7 @@ async function updateOpenSearch( user, data ) {
3821
3821
  export const aiChecklist = async ( req, res ) => {
3822
3822
  try {
3823
3823
  let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
3824
- let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection' ];
3824
+ let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ];
3825
3825
  let checklistDetails = [];
3826
3826
  let publishList = [];
3827
3827
  let unpublishList = [];