tango-app-api-analysis-traffic 3.8.1-alpha.7 → 3.8.1-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
|
@@ -272,18 +272,22 @@ export async function footFallImages( req, res ) {
|
|
|
272
272
|
],
|
|
273
273
|
},
|
|
274
274
|
},
|
|
275
|
-
'_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', '
|
|
275
|
+
'_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', 'houseKeepingCount', 'status', 'ticketId', 'comments', 'userName', 'role' ],
|
|
276
276
|
|
|
277
277
|
};
|
|
278
278
|
|
|
279
279
|
const getData = await getOpenSearchData( opensearch.footfallDirectory, query );
|
|
280
|
-
const ticketDetails = getData?.body?.hits?.hits;
|
|
281
|
-
|
|
280
|
+
const ticketDetails = getData?.body?.hits?.hits[0];
|
|
281
|
+
let temp = [];
|
|
282
|
+
temp.push( ticketDetails?._source );
|
|
283
|
+
if ( ticketDetails?._source?.status == 'close' ) {
|
|
284
|
+
temp.push( ticketDetails?._source );
|
|
285
|
+
}
|
|
282
286
|
const LamdaURL = 'https://cncmzszloku7y3bewxbpiy6nkm0yunqe.lambda-url.ap-south-1.on.aws/';
|
|
283
287
|
let resultData = await LamdaServiceCall( LamdaURL, inputData );
|
|
284
288
|
if ( resultData ) {
|
|
285
289
|
if ( resultData.status_code == '200' ) {
|
|
286
|
-
return res.sendSuccess( { ...resultData, ticketStatus:
|
|
290
|
+
return res.sendSuccess( { ...resultData, ticketStatus: temp, config: req?.store?.revopTagging } );
|
|
287
291
|
} else {
|
|
288
292
|
return res.sendError( 'No Content', 204 );
|
|
289
293
|
}
|