tango-app-api-trax 3.9.45 → 3.9.46
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
|
@@ -574,7 +574,7 @@ export const downloadInsertAI = async ( req, res ) => {
|
|
|
574
574
|
} else {
|
|
575
575
|
name = requestData?.checklistName;
|
|
576
576
|
}
|
|
577
|
-
let findchecklist = await processedcheklistconfigService.findOne( { 'checkListType': requestData.checkListType, 'client_id': requestData.clientId }
|
|
577
|
+
let findchecklist = await processedcheklistconfigService.findOne( { 'checkListType': requestData.checkListType, 'client_id': requestData.clientId }, {}, { _id: -1 } );
|
|
578
578
|
// console.log( findchecklist );
|
|
579
579
|
name = name + '-' + requestData.fileType;
|
|
580
580
|
let insertData = {
|
|
@@ -1264,7 +1264,7 @@ async function insertData( requestData ) {
|
|
|
1264
1264
|
client_id: getCLconfig.client_id,
|
|
1265
1265
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
|
|
1266
1266
|
};
|
|
1267
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring'
|
|
1267
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1268
1268
|
let processData = {
|
|
1269
1269
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
|
|
1270
1270
|
return { storeName: store.storeName, storeId: store.store_id, events: store.events };
|
|
@@ -473,7 +473,7 @@ export const getConfigDetails = async ( req, res ) => {
|
|
|
473
473
|
isdeleted: false,
|
|
474
474
|
};
|
|
475
475
|
|
|
476
|
-
if ( [ 'storeopenandclose', 'uniformdetection', 'mobileusagedetection', 'lossprevention', 'opertaionchecklist', 'dailystorechecklist', 'storehygiene'
|
|
476
|
+
if ( [ 'storeopenandclose', 'uniformdetection', 'mobileusagedetection', 'lossprevention', 'opertaionchecklist', 'dailystorechecklist', 'storehygiene' ].includes( type ) ) {
|
|
477
477
|
query.checkListType = type;
|
|
478
478
|
query.client_id = { $exists: false };
|
|
479
479
|
}
|
|
@@ -619,8 +619,6 @@ export const zoneList = async ( req, res ) => {
|
|
|
619
619
|
'Unattended Detection',
|
|
620
620
|
'Employee Monitoring',
|
|
621
621
|
'Customer Unattended',
|
|
622
|
-
'Store Huddle Adherence Checklist',
|
|
623
|
-
'Activity Monitoring',
|
|
624
622
|
|
|
625
623
|
|
|
626
624
|
];
|
|
@@ -4144,7 +4142,7 @@ async function updateOpenSearch( user, data ) {
|
|
|
4144
4142
|
export const aiChecklist = async ( req, res ) => {
|
|
4145
4143
|
try {
|
|
4146
4144
|
let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
|
|
4147
|
-
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'occupancydetection', 'employeemonitoring'
|
|
4145
|
+
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'occupancydetection', 'employeemonitoring' ];
|
|
4148
4146
|
let checklistDetails = [];
|
|
4149
4147
|
let publishList = [];
|
|
4150
4148
|
let unpublishList = [];
|
|
@@ -4157,7 +4155,7 @@ export const aiChecklist = async ( req, res ) => {
|
|
|
4157
4155
|
checklistDetails = [ ...publishList, ...unpublishList ];
|
|
4158
4156
|
|
|
4159
4157
|
checklistDetails.forEach( ( item ) => {
|
|
4160
|
-
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'storehygienemonitoring', 'employeemonitoring'
|
|
4158
|
+
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'storehygienemonitoring', 'employeemonitoring' ].includes( item.checkListType ) ) {
|
|
4161
4159
|
item.storeCount = storeDetails;
|
|
4162
4160
|
}
|
|
4163
4161
|
} );
|