tango-app-api-client 3.6.12 → 3.6.14
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
|
@@ -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,9 +3222,11 @@ 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 );
|
package/src/dtos/client.dtos.js
CHANGED
|
@@ -423,18 +423,11 @@ export const createStoreRequestSchema = joi.object( {
|
|
|
423
423
|
storeId: joi.string().required(),
|
|
424
424
|
dateString: joi.string().required().custom( ( value, helpers ) => {
|
|
425
425
|
const inputDate = dayjs( value, 'YYYY-MM-DD', true );
|
|
426
|
-
const today = dayjs();
|
|
427
426
|
|
|
428
427
|
if ( !inputDate.isValid() ) {
|
|
429
428
|
return helpers.error( 'any.invalid' );
|
|
430
429
|
}
|
|
431
430
|
|
|
432
|
-
const diff = today.diff( inputDate, 'day' );
|
|
433
|
-
|
|
434
|
-
if ( diff > 3 ) {
|
|
435
|
-
return helpers.message( 'The request is not sent for a period exceeding 3 days' );
|
|
436
|
-
}
|
|
437
|
-
|
|
438
431
|
return value;
|
|
439
432
|
} ),
|
|
440
433
|
|