tango-app-api-analysis-traffic 3.8.7-vms.16 → 3.8.7-vms.18

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-analysis-traffic",
3
- "version": "3.8.7-vms.16",
3
+ "version": "3.8.7-vms.18",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -311,6 +311,11 @@ export async function storeProcessedData( req, res ) {
311
311
  { term: { 'storeId.keyword': storeId } },
312
312
  { term: { 'dateString': currentDate } },
313
313
  { term: { 'ticketName.keyword': 'footfall-directory' } },
314
+ {
315
+ 'term': {
316
+ 'type.keyword': 'store',
317
+ },
318
+ },
314
319
  ],
315
320
  },
316
321
  },
@@ -412,6 +417,11 @@ export async function footFallImages( req, res ) {
412
417
  'ticketName.keyword': 'footfall-directory',
413
418
  },
414
419
  },
420
+ {
421
+ 'term': {
422
+ 'type.keyword': 'store',
423
+ },
424
+ },
415
425
  ],
416
426
  },
417
427
  },
@@ -533,17 +543,12 @@ export async function footFallImages( req, res ) {
533
543
  actionTypes.forEach( ( type ) => {
534
544
  const mapping = getMappingForType( type );
535
545
  if ( type === 'tagging' ) {
536
- const revisedFootfall = mapping.revicedFootfall ?? 0;
537
- const revisedPerc =
538
- footfallValue > 0 ?
539
- `${Math.round( ( revisedFootfall / footfallValue ) * 100 )}` :
540
- '0';
541
546
  const countObj = mapping.count ? [ ...mapping.count ] : [];
542
547
  temp.push( {
543
548
  actionType: type,
544
549
  footfall: footfallValue,
545
- revicedFootfall: revisedFootfall,
546
- revicedPerc: revisedPerc,
550
+ revicedFootfall: mapping.revicedFootfall ?? 0,
551
+ revicedPerc: mapping.revisedPerc ?? '--',
547
552
  count: countObj,
548
553
  createdAt: mapping.createdAt ?? '',
549
554
  createdByEmail: mapping.createdByEmail ?? '',
@@ -551,18 +556,14 @@ export async function footFallImages( req, res ) {
551
556
  createdByRole: mapping.createdByRole ?? '',
552
557
  isUp: false,
553
558
  } );
554
- } else if ( type !== 'tagging' && mapping.status === 'Closed' ) {
555
- const revisedFootfall = mapping.revicedFootfall ?? 0;
556
- const revisedPerc =
557
- footfallValue > 0 ?
558
- `${Math.round( ( revisedFootfall / footfallValue ) * 100 )}` :
559
- '0';
559
+ }
560
+ if ( type !== 'tagging' && mapping.status === 'Closed' ) {
560
561
  const countObj = mapping.count ? [ ...mapping.count ] : [];
561
562
  temp.push( {
562
563
  actionType: type,
563
564
  footfall: footfallValue,
564
- revicedFootfall: revisedFootfall,
565
- revicedPerc: revisedPerc,
565
+ revicedFootfall: mapping.revicedFootfall ?? 0,
566
+ revicedPerc: mapping.revisedPerc ?? '--',
566
567
  count: countObj,
567
568
  createdAt: mapping.createdAt ?? '',
568
569
  createdByEmail: mapping.createdByEmail ?? '',
@@ -18,7 +18,6 @@ revopRouter
18
18
  .get( '/footfall-images', isAllowedSessionHandler, validate( footfallImagesValid ), getTaggingConfig, footFallImages )
19
19
  .post( '/tag-tempId', isAllowedSessionHandler, validate( tagTempIdValid ), deleteTaggedDuplicate, mappingConfig, tagTempId )
20
20
 
21
-
22
21
  .post( '/get-categorized-images', isAllowedSessionHandler, validate( getCategorizedImagesValid ), getCategorizedImages );
23
22
 
24
23