tango-app-api-trax 3.5.0-alpha-3 → 3.5.0-alpha-5
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-
|
|
3
|
+
"version": "3.5.0-alpha-5",
|
|
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.115",
|
|
30
30
|
"tango-app-api-middleware": "^3.1.72",
|
|
31
31
|
"url": "^0.11.4",
|
|
32
32
|
"winston": "^3.13.1",
|
|
@@ -2309,3 +2309,35 @@ export async function internalAISendPushNotification( req, res ) {
|
|
|
2309
2309
|
else res.sendError( e, 500 );
|
|
2310
2310
|
}
|
|
2311
2311
|
};
|
|
2312
|
+
|
|
2313
|
+
export async function getLiveChecklistClients( req, res ) {
|
|
2314
|
+
try {
|
|
2315
|
+
let inputData = req.body;
|
|
2316
|
+
let query = [
|
|
2317
|
+
{
|
|
2318
|
+
$match: {
|
|
2319
|
+
isdeleted: false,
|
|
2320
|
+
publish: true,
|
|
2321
|
+
client_id: {
|
|
2322
|
+
$nin: inputData.ignoreClientId,
|
|
2323
|
+
$exists: true,
|
|
2324
|
+
$ne: null,
|
|
2325
|
+
},
|
|
2326
|
+
},
|
|
2327
|
+
},
|
|
2328
|
+
{ $group: { _id: '$client_id' } },
|
|
2329
|
+
{ $sort: { _id: 1 } },
|
|
2330
|
+
{ $group: { _id: null, client_ids: { $push: '$_id' } } },
|
|
2331
|
+
];
|
|
2332
|
+
|
|
2333
|
+
let getchecklistsData = await CLconfig.aggregate( query );
|
|
2334
|
+
if ( getchecklistsData && getchecklistsData.length >0 ) {
|
|
2335
|
+
return res.sendSuccess( { liveChecklistClients: getchecklistsData[0].client_ids } );
|
|
2336
|
+
} else {
|
|
2337
|
+
return res.sendError( 'Checklist Not Available', 204 );
|
|
2338
|
+
}
|
|
2339
|
+
} catch ( error ) {
|
|
2340
|
+
if ( error.name === 'ValidationError' ) res.sendBadRequest( error );
|
|
2341
|
+
else res.sendError( error, 500 );
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
@@ -3682,8 +3682,7 @@ export async function clientConfig( req, res ) {
|
|
|
3682
3682
|
try {
|
|
3683
3683
|
let requestData = req.body;
|
|
3684
3684
|
if ( requestData.clientId && requestData.clientId !='' ) {
|
|
3685
|
-
let getClientData = await clientService.findOne( { clientId: requestData.clientId }, { traxRAWImageUpload: 1, clientId: 1, clientName: 1, traxBlockMobileTimeUpdate: 1, traxSectionSave: 1 } );
|
|
3686
|
-
// console.log( ' getClientData=>', getClientData );
|
|
3685
|
+
let getClientData = await clientService.findOne( { clientId: requestData.clientId }, { traxRAWImageUpload: 1, clientId: 1, clientName: 1, traxBlockMobileTimeUpdate: 1, traxSectionSave: 1, isCrestPlanogram: 1, isTangoPlanogram: 1 } );
|
|
3687
3686
|
if ( getClientData ) {
|
|
3688
3687
|
return res.sendSuccess( getClientData );
|
|
3689
3688
|
} else {
|
|
@@ -22,6 +22,7 @@ internalTraxRouter
|
|
|
22
22
|
.get( '/getOTP', isAllowedInternalAPIHandler, internalController.getOTP )
|
|
23
23
|
.get( '/getDownloads', isAllowedInternalAPIHandler, internalController.getDownloads )
|
|
24
24
|
.post( '/sendPushNotification', isAllowedInternalAPIHandler, internalController.internalSendPushNotification )
|
|
25
|
-
.post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification )
|
|
25
|
+
.post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification )
|
|
26
|
+
.post( '/getLiveChecklistClients', isAllowedInternalAPIHandler, internalController.getLiveChecklistClients );
|
|
26
27
|
|
|
27
28
|
|