tango-app-api-client 3.6.13 → 3.6.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-client",
3
- "version": "3.6.13",
3
+ "version": "3.6.15",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1124,7 +1124,7 @@ export async function updateFeatureConfiguration( req, res ) {
1124
1124
  // await postApi( `${url.oldapidomain}/oldBrandUpdate/${data?._id}`, { brandConfigs: data.brandConfigs } );
1125
1125
 
1126
1126
  const keysArray = [
1127
- 'isExcludedArea', 'isPasserByData', 'isNormalized', 'isbillingDisabled', 'isCameraDisabled', 'isFootfallDirectory','isFootfallDirectoryonlyTango', 'isNOB', 'isZonewiseNOB', 'isNewTraffic', 'isTrax', 'isNewZone', 'isNewReports', 'isNewDashboard', 'streamBy', 'isFootfallView', 'isAIManager', 'isAIManagerAccessControl', 'isCameraEdit' ];
1127
+ 'isExcludedArea', 'isPasserByData', 'isNormalized', 'isbillingDisabled', 'isCameraDisabled', 'isFootfallDirectory', 'isFootfallDirectoryonlyTango', 'isNOB', 'isZonewiseNOB', 'isNewTraffic', 'isTrax', 'isNewZone', 'isNewReports', 'isNewDashboard', 'streamBy', 'isFootfallView', 'isAIManager', 'isAIManagerAccessControl', 'isCameraEdit' ];
1128
1128
  // Map and rename keys from previous client info for UI display and logging
1129
1129
  const oldData = {
1130
1130
  StoreOpenTime: previousData?.featureConfigs?.open,
@@ -3222,13 +3222,15 @@ export async function listStoreRequest( req, res ) {
3222
3222
  try {
3223
3223
  const inputData = req.query;
3224
3224
 
3225
+ const getConfig = await findOneClient( { clientId: inputData?.clientId }, { 'footfallDirectoryConfigs.allowTicketCreation': 1, '_id': 0 } );
3226
+
3225
3227
  const today = new Date();
3226
3228
  const threeDaysAgo = new Date();
3227
- threeDaysAgo.setDate( today.getDate() - 3 );
3229
+ threeDaysAgo.setDate( today.getDate() - ( getConfig?.footfallDirectoryConfigs?.allowTicketCreation || 3 ) );
3228
3230
 
3229
3231
  const todayStr = today.toISOString().slice( 0, 10 );
3230
3232
  const threeDaysAgoStr = threeDaysAgo.toISOString().slice( 0, 10 );
3231
-
3233
+ logger.info( { today, threeDaysAgo, todayStr, threeDaysAgoStr, getConfig: getConfig?.footfallDirectoryConfigs?.allowTicketCreation } );
3232
3234
 
3233
3235
  const query = [
3234
3236
  {