tango-app-api-analysis-zone 3.0.0-alpha.25 → 3.0.0-alpha.26
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
|
@@ -162,6 +162,22 @@ export const zoneConcentrationSummaryTableV1 = async ( req, res ) => {
|
|
|
162
162
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
163
163
|
if ( resultData ) {
|
|
164
164
|
if ( resultData.status_code == '200' ) {
|
|
165
|
+
if ( reqestData.export ) {
|
|
166
|
+
if ( resultData.zoneConcentrationData.length>0 ) {
|
|
167
|
+
const exportdata = [];
|
|
168
|
+
resultData.zoneConcentrationData.forEach( ( element ) => {
|
|
169
|
+
exportdata.push( {
|
|
170
|
+
'Zone Name': element.zoneName,
|
|
171
|
+
'Footfall(Actuals)': element.footfallCount,
|
|
172
|
+
'DwellTime(Average)': element.avgDwellTime,
|
|
173
|
+
'Concentration': element.concentrationRate,
|
|
174
|
+
} );
|
|
175
|
+
} );
|
|
176
|
+
return await download( exportdata, res );
|
|
177
|
+
} else {
|
|
178
|
+
return res.sendError( 'No Content', 204 );
|
|
179
|
+
}
|
|
180
|
+
}
|
|
165
181
|
return res.sendSuccess( resultData );
|
|
166
182
|
} else {
|
|
167
183
|
return res.sendError( 'No Content', 204 );
|
|
@@ -57,6 +57,7 @@ export const validateZoneConcentrationSummaryTableSchema = joi.object( {
|
|
|
57
57
|
search: joi.string().optional().allow( '' ),
|
|
58
58
|
sortBy: joi.number().optional().allow( '' ),
|
|
59
59
|
sort: joi.string().optional().allow( '' ),
|
|
60
|
+
export: joi.boolean().required(),
|
|
60
61
|
} );
|
|
61
62
|
|
|
62
63
|
export const validateZoneConcentrationSummaryTableParams = {
|