tango-app-api-trax 3.3.1-beta-80 → 3.3.1-hotfix-2
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-
|
|
3
|
+
"version": "3.3.1-hotfix-2",
|
|
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.
|
|
29
|
+
"tango-api-schema": "^2.2.67",
|
|
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'
|
|
307
|
+
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
308
308
|
if ( getSections.length ) {
|
|
309
309
|
for ( let element3 of getSections ) {
|
|
310
310
|
let collectQuestions = {};
|
|
@@ -338,6 +338,7 @@ async function insertData( requestData ) {
|
|
|
338
338
|
getquestionQuery.push( {
|
|
339
339
|
$match: {
|
|
340
340
|
checkListId: element2,
|
|
341
|
+
checkFlag: true,
|
|
341
342
|
isdeleted: false,
|
|
342
343
|
},
|
|
343
344
|
} );
|
|
@@ -597,7 +598,7 @@ async function insertData( requestData ) {
|
|
|
597
598
|
// }
|
|
598
599
|
}
|
|
599
600
|
} else {
|
|
600
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring'
|
|
601
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
601
602
|
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active' }, { storeId: 1 } );
|
|
602
603
|
let data = {
|
|
603
604
|
checkListId: updatedchecklist._id,
|
|
@@ -3421,7 +3421,7 @@ async function updateOpenSearch( user, data ) {
|
|
|
3421
3421
|
export const aiChecklist = async ( req, res ) => {
|
|
3422
3422
|
try {
|
|
3423
3423
|
let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
|
|
3424
|
-
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring'
|
|
3424
|
+
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring' ];
|
|
3425
3425
|
let checklistDetails = [];
|
|
3426
3426
|
let publishList = [];
|
|
3427
3427
|
let unpublishList = [];
|
|
@@ -736,7 +736,7 @@ export const userPerformance = async ( req, res ) => {
|
|
|
736
736
|
_id: '$userName',
|
|
737
737
|
totalChecklist: { $sum: 1 },
|
|
738
738
|
userEmail: { $last: '$userEmail' },
|
|
739
|
-
checkListCount: { $sum:
|
|
739
|
+
checkListCount: { $sum: 1 },
|
|
740
740
|
timeFlag: { $sum: '$timeFlag' },
|
|
741
741
|
submittedChecklist: { $sum: { $cond: [ { $eq: [ '$checklistStatus', 'submit' ] }, 1, 0 ] } },
|
|
742
742
|
checkListType: { $last: '$checkListType' },
|
|
@@ -1246,7 +1246,7 @@ export const checklistInfo = async ( req, res ) => {
|
|
|
1246
1246
|
|
|
1247
1247
|
findQuery.push( {
|
|
1248
1248
|
$group: {
|
|
1249
|
-
_id: { store: '$store_id', email: '$userEmail' },
|
|
1249
|
+
_id: { store: '$store_id', email: '$userEmail', checklistId: '$sourceCheckList_id' },
|
|
1250
1250
|
checkListName: { $first: '$checkListName' },
|
|
1251
1251
|
coverage: { $first: '$coverage' },
|
|
1252
1252
|
createdByName: { $first: '$createdByName' },
|