tango-app-api-analysis-traffic 3.8.7-vms.13 → 3.8.7-vms.15

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.13",
3
+ "version": "3.8.7-vms.15",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -434,7 +434,7 @@ export async function footFallImages( req, res ) {
434
434
  if ( req.user.userType !== 'tango' && req.user.role !== 'superadmin' ) {
435
435
  switch ( req.user.role ) {
436
436
  case 'user':
437
- const actionTypesUser = [ 'tagging', 'finalreview' ];
437
+ const actionTypesUser = [ 'tagging', 'finalRevision' ];
438
438
 
439
439
  temp = [];
440
440
  actionTypesUser.forEach( ( type ) => {
@@ -458,7 +458,7 @@ export async function footFallImages( req, res ) {
458
458
  createdByRole: mapping.createdByRole ?? '',
459
459
  isUp: false,
460
460
  } );
461
- } else if ( type !== 'tagging' && mapping.status === 'closed' ) {
461
+ } else if ( type !== 'tagging' && mapping.status === 'Closed' ) {
462
462
  const revisedFootfall = mapping.revicedFootfall ?? 0;
463
463
  const revisedPerc =
464
464
  footfallValue > 0 ?
@@ -480,7 +480,7 @@ export async function footFallImages( req, res ) {
480
480
  } );
481
481
  break;
482
482
  case 'admin':
483
- const actionTypesAdmin = [ 'tagging', 'review', 'finalreview' ];
483
+ const actionTypesAdmin = [ 'tagging', 'review', 'finalRevision' ];
484
484
  temp = [];
485
485
  actionTypesAdmin.forEach( ( type ) => {
486
486
  const mapping = getMappingForType( type );
@@ -503,7 +503,7 @@ export async function footFallImages( req, res ) {
503
503
  createdByRole: mapping.createdByRole ?? '',
504
504
  isUp: false,
505
505
  } );
506
- } else if ( type !== 'tagging' && mapping.status === 'closed' ) {
506
+ } else if ( type !== 'tagging' && mapping.status === 'Closed' ) {
507
507
  const revisedFootfall = mapping.revicedFootfall ?? 0;
508
508
  const revisedPerc =
509
509
  footfallValue > 0 ?
@@ -525,7 +525,7 @@ export async function footFallImages( req, res ) {
525
525
  } );
526
526
  }
527
527
  } else {
528
- const actionTypes = [ 'tagging', 'review', 'approve', 'finalreview' ];
528
+ const actionTypes = [ 'tagging', 'review', 'approve', 'tangoreview', 'finalRevision' ];
529
529
 
530
530
  // Dynamically add to temp only if actionType matches and status is 'closed',
531
531
  // except for 'tagging' where status must be 'raised'
@@ -551,7 +551,7 @@ export async function footFallImages( req, res ) {
551
551
  createdByRole: mapping.createdByRole ?? '',
552
552
  isUp: false,
553
553
  } );
554
- } else if ( type !== 'tagging' && mapping.status === 'closed' ) {
554
+ } else if ( type !== 'tagging' && mapping.status === 'Closed' ) {
555
555
  const revisedFootfall = mapping.revicedFootfall ?? 0;
556
556
  const revisedPerc =
557
557
  footfallValue > 0 ?
@@ -56,8 +56,8 @@ export const tagTempIdSchema = joi.object( {
56
56
 
57
57
  const diff = today.diff( inputDate, 'day' );
58
58
 
59
- if ( diff > 7 ) {
60
- return helpers.message( 'Tagging is not allowed for a period exceeding 7 days' );
59
+ if ( diff > 3 ) {
60
+ return helpers.message( 'Tagging is not allowed for a period exceeding 3 days' );
61
61
  }
62
62
 
63
63
  return value;