tango-app-api-trax 3.9.36 → 3.9.38
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 +2 -2
- package/src/controllers/internalTrax.controller.js +8 -8
- package/src/controllers/teaxFlag.controller.js +15 -953
- package/src/controllers/trax.controller.js +1 -1
- package/src/hbs/login-otp.hbs +943 -943
- package/src/routes/trax.routes.js +0 -3
- package/src/routes/traxFlag.router.js +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.38",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"path": "^0.12.7",
|
|
31
31
|
"puppeteer": "^24.39.1",
|
|
32
32
|
"swagger-ui-express": "^5.0.1",
|
|
33
|
-
"tango-api-schema": "^2.6.
|
|
33
|
+
"tango-api-schema": "^2.6.20",
|
|
34
34
|
"tango-app-api-middleware": "^3.5.2",
|
|
35
35
|
"url": "^0.11.4",
|
|
36
36
|
"winston": "^3.13.1",
|
|
@@ -931,7 +931,7 @@ async function insertData( requestData ) {
|
|
|
931
931
|
},
|
|
932
932
|
} );
|
|
933
933
|
let getSections = await CLquestions.aggregate( sectionQuery );
|
|
934
|
-
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
934
|
+
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring', 'activitymonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
935
935
|
if ( getSections.length ) {
|
|
936
936
|
for ( let element3 of getSections ) {
|
|
937
937
|
let collectQuestions = {};
|
|
@@ -1226,11 +1226,11 @@ async function insertData( requestData ) {
|
|
|
1226
1226
|
// }
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1229
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring', 'activitymonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1230
1230
|
let storeNameList = allQuestion.map( ( item ) => item.store_id );
|
|
1231
|
-
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1231
|
+
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring', 'activitymonitoring' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1232
1232
|
let storeList = storeDetails.map( ( store ) => store.storeId );
|
|
1233
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1233
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring', 'activitymonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1234
1234
|
allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
|
|
1235
1235
|
} else {
|
|
1236
1236
|
allQuestion = storeDetails.map( ( item ) => {
|
|
@@ -2768,16 +2768,16 @@ export async function countUpdateRunAI( req, res ) {
|
|
|
2768
2768
|
if ( !req.body.id ) {
|
|
2769
2769
|
return res.sendError( 'Checklist id is required', 400 );
|
|
2770
2770
|
}
|
|
2771
|
-
if ( !req.body.runAICount ) {
|
|
2772
|
-
|
|
2773
|
-
}
|
|
2771
|
+
// if ( !req.body.runAICount ) {
|
|
2772
|
+
// return res.sendError( 'runAICount is required', 400 );
|
|
2773
|
+
// }
|
|
2774
2774
|
let getDetails = await processedchecklist.findOne( { _id: req.body.id } );
|
|
2775
2775
|
if ( !getDetails ) {
|
|
2776
2776
|
return res.sendError( 'No data found', 204 );
|
|
2777
2777
|
}
|
|
2778
2778
|
|
|
2779
2779
|
let updateData = {
|
|
2780
|
-
runAIFlag: req.body
|
|
2780
|
+
runAIFlag: req.body?.runAICount ?? 0,
|
|
2781
2781
|
};
|
|
2782
2782
|
|
|
2783
2783
|
// complianceCount is already populated for the other answer types; add the image/video scores on top.
|