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

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.17",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -533,17 +533,12 @@ export async function footFallImages( req, res ) {
533
533
  actionTypes.forEach( ( type ) => {
534
534
  const mapping = getMappingForType( type );
535
535
  if ( type === 'tagging' ) {
536
- const revisedFootfall = mapping.revicedFootfall ?? 0;
537
- const revisedPerc =
538
- footfallValue > 0 ?
539
- `${Math.round( ( revisedFootfall / footfallValue ) * 100 )}` :
540
- '0';
541
536
  const countObj = mapping.count ? [ ...mapping.count ] : [];
542
537
  temp.push( {
543
538
  actionType: type,
544
539
  footfall: footfallValue,
545
- revicedFootfall: revisedFootfall,
546
- revicedPerc: revisedPerc,
540
+ revicedFootfall: mapping.revicedFootfall ?? 0,
541
+ revicedPerc: mapping.revisedPerc ?? '--',
547
542
  count: countObj,
548
543
  createdAt: mapping.createdAt ?? '',
549
544
  createdByEmail: mapping.createdByEmail ?? '',
@@ -551,18 +546,14 @@ export async function footFallImages( req, res ) {
551
546
  createdByRole: mapping.createdByRole ?? '',
552
547
  isUp: false,
553
548
  } );
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';
549
+ }
550
+ if ( type !== 'tagging' && mapping.status === 'Closed' ) {
560
551
  const countObj = mapping.count ? [ ...mapping.count ] : [];
561
552
  temp.push( {
562
553
  actionType: type,
563
554
  footfall: footfallValue,
564
- revicedFootfall: revisedFootfall,
565
- revicedPerc: revisedPerc,
555
+ revicedFootfall: mapping.revicedFootfall ?? 0,
556
+ revicedPerc: mapping.revisedPerc ?? '--',
566
557
  count: countObj,
567
558
  createdAt: mapping.createdAt ?? '',
568
559
  createdByEmail: mapping.createdByEmail ?? '',