tango-app-api-trax 3.5.0-alpha-6 → 3.5.0-alpha-8

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-6",
3
+ "version": "3.5.0-alpha-8",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -286,6 +286,7 @@ export async function PCLconfigCreation( req, res ) {
286
286
  insertdata.scheduleRepeatedType = getCLconfig.scheduleRepeatedType;
287
287
  insertdata.allowedMultiSubmit = getCLconfig.allowedMultiSubmit;
288
288
  insertdata.rawImageUpload = getCLconfig.rawImageUpload || false;
289
+ insertdata.rawVideoUpload = getCLconfig.rawVideoUpload || false;
289
290
  let collectSections = [];
290
291
  let sectionQuery = [];
291
292
  sectionQuery.push( {
@@ -295,7 +296,7 @@ export async function PCLconfigCreation( req, res ) {
295
296
  },
296
297
  } );
297
298
  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','inventorycount','carsattended','numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
299
+ 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
300
  if ( getSections.length ) {
300
301
  for ( let element3 of getSections ) {
301
302
  let collectQuestions = {};
@@ -562,6 +563,7 @@ export async function PCLconfigCreation( req, res ) {
562
563
  // element4.isPlano = getCLconfig?.isPlano;
563
564
  // }
564
565
  element4.rawImageUpload = getCLconfig?.rawImageUpload || false;
566
+ element4.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
565
567
  }
566
568
  if ( userIdList.length ) {
567
569
  allQuestion = allQuestion.filter( ( item ) => typeof item._id == 'undefined' );
@@ -589,11 +591,11 @@ export async function PCLconfigCreation( req, res ) {
589
591
  // }
590
592
  }
591
593
  } else {
592
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection','inventorycount','carsattended','numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
594
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
593
595
  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 } );
596
+ 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
597
  let storeList = storeDetails.map( ( store ) => store.storeId );
596
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
598
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
597
599
  allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
598
600
  } else {
599
601
  allQuestion = storeDetails.map( ( item ) => {
@@ -627,7 +629,7 @@ export async function PCLconfigCreation( req, res ) {
627
629
  client_id: getCLconfig.client_id,
628
630
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
629
631
  };
630
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
632
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
631
633
  let processData = {
632
634
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
633
635
  return { storeName: store.storeName, storeId: store.store_id, events: store.events };
@@ -852,6 +854,7 @@ async function insertData( requestData ) {
852
854
  insertdata.scheduleRepeatedType = getCLconfig.scheduleRepeatedType;
853
855
  insertdata.allowedMultiSubmit = getCLconfig.allowedMultiSubmit;
854
856
  insertdata.rawImageUpload = getCLconfig.rawImageUpload || false;
857
+ insertdata.rawVideoUpload = getCLconfig.rawVideoUpload || false;
855
858
  let collectSections = [];
856
859
  let sectionQuery = [];
857
860
  sectionQuery.push( {
@@ -861,7 +864,7 @@ async function insertData( requestData ) {
861
864
  },
862
865
  } );
863
866
  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','inventorycount','carsattended','numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
867
+ 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
868
  if ( getSections.length ) {
866
869
  for ( let element3 of getSections ) {
867
870
  let collectQuestions = {};
@@ -1128,6 +1131,7 @@ async function insertData( requestData ) {
1128
1131
  // element4.isPlano = getCLconfig?.isPlano;
1129
1132
  // }
1130
1133
  element4.rawImageUpload = getCLconfig?.rawImageUpload || false;
1134
+ element4.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
1131
1135
  }
1132
1136
  if ( userIdList.length ) {
1133
1137
  allQuestion = allQuestion.filter( ( item ) => typeof item._id == 'undefined' );
@@ -1154,11 +1158,11 @@ async function insertData( requestData ) {
1154
1158
  // }
1155
1159
  }
1156
1160
  } else {
1157
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection','inventorycount','carsattended','numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
1161
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo' ].includes( getCLconfig.checkListType ) ) {
1158
1162
  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 } );
1163
+ 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
1164
  let storeList = storeDetails.map( ( store ) => store.storeId );
1161
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
1165
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
1162
1166
  allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
1163
1167
  } else {
1164
1168
  allQuestion = storeDetails.map( ( item ) => {
@@ -1192,7 +1196,7 @@ async function insertData( requestData ) {
1192
1196
  client_id: getCLconfig.client_id,
1193
1197
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
1194
1198
  };
1195
- if ( [ 'storeopenandclose', 'mobileusagedetection', 'cleaning', 'scrum' ].includes( getCLconfig.checkListType ) ) {
1199
+ if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning' ].includes( getCLconfig.checkListType ) ) {
1196
1200
  let processData = {
1197
1201
  aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
1198
1202
  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','inventorycount','carsattended','numberplateinfo' ];
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 = [];