tango-app-api-analysis-traffic 3.8.7-vms.1 → 3.8.7-vms.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
|
@@ -379,7 +379,7 @@ export async function footFallImages( req, res ) {
|
|
|
379
379
|
],
|
|
380
380
|
},
|
|
381
381
|
},
|
|
382
|
-
'_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', 'houseKeepingCount', 'junkCount', 'status', 'ticketId', 'comments', 'userName', 'role', 'createdAt', 'email', 'houseKeepingACCount', 'duplicateACCount', 'employeeACCount', 'junkACCount', 'approverEmail', 'approverRole', 'approverUserName' ],
|
|
382
|
+
// '_source': [ 'dateString', 'storeId', 'duplicateCount', 'footfallCount', 'employeeCount', 'houseKeepingCount', 'junkCount', 'status', 'ticketId', 'comments', 'userName', 'role', 'createdAt', 'email', 'houseKeepingACCount', 'duplicateACCount', 'employeeACCount', 'junkACCount', 'approverEmail', 'approverRole', 'approverUserName' ],
|
|
383
383
|
|
|
384
384
|
};
|
|
385
385
|
|
|
@@ -406,7 +406,7 @@ export async function footFallImages( req, res ) {
|
|
|
406
406
|
if ( resultData ) {
|
|
407
407
|
temp.length? temp[0].status = 'open': null;
|
|
408
408
|
if ( resultData.status_code == '200' ) {
|
|
409
|
-
return res.sendSuccess( { ...resultData, ticketStatus: temp?.length > 0? temp : null, config: req?.store?.
|
|
409
|
+
return res.sendSuccess( { ...resultData, ticketStatus: temp?.length > 0? temp : null, config: req?.store?.footfallDirectoryConfigs } );
|
|
410
410
|
} else {
|
|
411
411
|
return res.sendError( 'No Content', 204 );
|
|
412
412
|
}
|
package/src/dtos/revop.dtos.js
CHANGED
|
@@ -66,6 +66,9 @@ export const tagTempIdSchema = joi.object( {
|
|
|
66
66
|
revopsType: joi.string().required(),
|
|
67
67
|
timeRange: joi.string().required(),
|
|
68
68
|
isChecked: joi.boolean().required().allow( null ),
|
|
69
|
+
mode: joi.string().valid( 'web', 'mobile' ).required().messages( {
|
|
70
|
+
'any.only': 'type must be one of [mobile,web]',
|
|
71
|
+
} ),
|
|
69
72
|
duplicateImage: joi.array().items( joi.object(
|
|
70
73
|
{
|
|
71
74
|
tempId: joi.number().required(),
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { getOpenSearchCount, logger } from 'tango-app-api-middleware';
|
|
2
2
|
import { findOneStore } from '../services/stores.service.js';
|
|
3
3
|
import { deleteByQuery } from 'tango-app-api-middleware/src/utils/openSearch.js';
|
|
4
|
+
import { findOne } from '../services/clients.services.js';
|
|
4
5
|
|
|
5
6
|
export async function getTaggingConfig( req, res, next ) {
|
|
6
7
|
try {
|
|
7
8
|
const inputData= req.query;
|
|
8
|
-
const
|
|
9
|
+
const clientId = inputData.storeId.split( '-' )[0];
|
|
10
|
+
const getData = await findOne( { clientId: clientId }, { footfallDirectoryConfigs: 1 } );
|
|
11
|
+
|
|
12
|
+
// Convert "taggingLimitation" array (if present) to "config" object with expected key-value pairs
|
|
13
|
+
let config = {};
|
|
14
|
+
if ( getData && Array.isArray( getData.taggingLimitation ) ) {
|
|
15
|
+
for ( const item of getData.taggingLimitation ) {
|
|
16
|
+
if ( item && item.type && typeof item.value !== 'undefined' && item.unit ) {
|
|
17
|
+
config[item.type] = `${item.value}${item.unit}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
getData.config = config;
|
|
22
|
+
|
|
9
23
|
req.store = getData;
|
|
10
24
|
next();
|
|
11
25
|
} catch ( error ) {
|