tango-app-api-analysis-traffic 3.0.0-alpha.22 → 3.0.0-alpha.24
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
|
@@ -391,6 +391,26 @@ export const performanceMatrixV1 = async ( req, res ) => {
|
|
|
391
391
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
392
392
|
if ( resultData ) {
|
|
393
393
|
if ( resultData.status_code == '200' ) {
|
|
394
|
+
let data = JSON.parse( JSON.stringify( resultData.performanceData ) );
|
|
395
|
+
data.forEach( ( item, index ) => {
|
|
396
|
+
if ( item.position == 'High_Low' ) {
|
|
397
|
+
data[index].left = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
|
|
398
|
+
data[index].top = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
|
|
399
|
+
} else if ( item.position == 'High_High' ) {
|
|
400
|
+
data[index].left = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
|
|
401
|
+
data[index].top = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
|
|
402
|
+
} else if ( item.position == 'Low_Low' ) {
|
|
403
|
+
data[index].left = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
|
|
404
|
+
data[index].top = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
|
|
405
|
+
console.log( data[index].left );
|
|
406
|
+
} else {
|
|
407
|
+
data[index].left = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
|
|
408
|
+
data[index].top = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
|
|
409
|
+
}
|
|
410
|
+
} );
|
|
411
|
+
resultData.performanceData = data;
|
|
412
|
+
|
|
413
|
+
|
|
394
414
|
return res.sendSuccess( resultData );
|
|
395
415
|
} else {
|
|
396
416
|
return res.sendError( 'No Content', 204 );
|
|
@@ -32,6 +32,7 @@ export const validateRecapVideoSchema = joi.object( {
|
|
|
32
32
|
clientId: joi.string().required(),
|
|
33
33
|
storeId: joi.array().required().empty(),
|
|
34
34
|
recapVideoDate: joi.string().required(),
|
|
35
|
+
valueType: joi.string().optional().allow( '' ),
|
|
35
36
|
} );
|
|
36
37
|
|
|
37
38
|
export const validateRecapVideoParams = {
|
|
@@ -111,6 +112,7 @@ export const validateFootfallDirectoryFoldersSchema = joi.object( {
|
|
|
111
112
|
storeId: joi.array().required().empty(),
|
|
112
113
|
footfallDate: joi.string().required(),
|
|
113
114
|
processType: joi.string().required(),
|
|
115
|
+
valueType: joi.string().optional().allow( '' ),
|
|
114
116
|
} );
|
|
115
117
|
|
|
116
118
|
export const validateFootfallDirectoryFoldersParams = {
|
|
@@ -123,6 +125,7 @@ export const validateFootfallDirectorySchema = joi.object( {
|
|
|
123
125
|
footfallDate: joi.string().required(),
|
|
124
126
|
processType: joi.string().required(),
|
|
125
127
|
folderName: joi.string().required(),
|
|
128
|
+
valueType: joi.string().optional().allow( '' ),
|
|
126
129
|
} );
|
|
127
130
|
|
|
128
131
|
export const validateFootfallDirectoryParams = {
|