tango-app-api-analysis-zone 3.0.0-alpha.41 → 3.0.0-alpha.42

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-zone",
3
- "version": "3.0.0-alpha.41",
3
+ "version": "3.0.0-alpha.42",
4
4
  "description": "zone Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -197,24 +197,24 @@ export const zoneHeatmapAvailableDatesV1 = async ( req, res ) => {
197
197
  try {
198
198
  let reqestData = req.body;
199
199
 
200
- const date1 = new Date( reqestData.fromDate );
201
- const date2 = new Date( reqestData.toDate );
202
- // Get the difference in milliseconds
203
- const diffInMs = date2 - date1;
204
- // Convert milliseconds to days
205
- let diffInDays = parseInt( diffInMs / ( 1000 * 60 * 60 * 24 ) );
206
- if ( diffInDays <= 7 ) {
207
- if ( reqestData.dateType == 'weekly' ) {
208
- // subtract 7 days to the date
209
- date2.setDate( date2.getDate() - 7 );
210
- reqestData.fromDate = date2.toISOString().slice( 0, 10 );
211
- }
212
- if ( reqestData.dateType == 'monthly' ) {
213
- // subtract 31 days to the date
214
- date2.setDate( date2.getDate() - 31 );
215
- reqestData.fromDate = date2.toISOString().slice( 0, 10 );
216
- }
217
- }
200
+ // const date1 = new Date( reqestData.fromDate );
201
+ // const date2 = new Date( reqestData.toDate );
202
+ // // Get the difference in milliseconds
203
+ // const diffInMs = date2 - date1;
204
+ // // Convert milliseconds to days
205
+ // let diffInDays = parseInt( diffInMs / ( 1000 * 60 * 60 * 24 ) );
206
+ // if ( diffInDays <= 7 ) {
207
+ // if ( reqestData.dateType == 'weekly' ) {
208
+ // // subtract 7 days to the date
209
+ // date2.setDate( date2.getDate() - 7 );
210
+ // reqestData.fromDate = date2.toISOString().slice( 0, 10 );
211
+ // }
212
+ // if ( reqestData.dateType == 'monthly' ) {
213
+ // // subtract 31 days to the date
214
+ // date2.setDate( date2.getDate() - 31 );
215
+ // reqestData.fromDate = date2.toISOString().slice( 0, 10 );
216
+ // }
217
+ // }
218
218
 
219
219
  let LamdaURL = 'https://tgtkai5zzq7fhp7ymtsnm3a2lm0czulr.lambda-url.ap-south-1.on.aws/';
220
220
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
@@ -182,24 +182,24 @@ export const overallStoreConcentrationDatesV2 = async ( req, res ) => {
182
182
  try {
183
183
  let reqestData = req.body;
184
184
 
185
- const date1 = new Date( reqestData.fromDate );
186
- const date2 = new Date( reqestData.toDate );
185
+ // const date1 = new Date( reqestData.fromDate );
186
+ // const date2 = new Date( reqestData.toDate );
187
187
  // Get the difference in milliseconds
188
- const diffInMs = date2 - date1;
188
+ // const diffInMs = date2 - date1;
189
189
  // Convert milliseconds to days
190
- let diffInDays = parseInt( diffInMs / ( 1000 * 60 * 60 * 24 ) );
191
- if ( diffInDays <= 7 ) {
192
- if ( reqestData.dateType == 'weekly' ) {
193
- // subtract 7 days to the date
194
- date2.setDate( date2.getDate() - 7 );
195
- reqestData.fromDate = date2.toISOString().slice( 0, 10 );
196
- }
197
- if ( reqestData.dateType == 'monthly' ) {
198
- // subtract 31 days to the date
199
- date2.setDate( date2.getDate() - 31 );
200
- reqestData.fromDate = date2.toISOString().slice( 0, 10 );
201
- }
202
- }
190
+ // let diffInDays = parseInt( diffInMs / ( 1000 * 60 * 60 * 24 ) );
191
+ // if ( diffInDays <= 7 ) {
192
+ // if ( reqestData.dateType == 'weekly' ) {
193
+ // // subtract 7 days to the date
194
+ // date2.setDate( date2.getDate() - 7 );
195
+ // reqestData.fromDate = date2.toISOString().slice( 0, 10 );
196
+ // }
197
+ // if ( reqestData.dateType == 'monthly' ) {
198
+ // // subtract 31 days to the date
199
+ // date2.setDate( date2.getDate() - 31 );
200
+ // reqestData.fromDate = date2.toISOString().slice( 0, 10 );
201
+ // }
202
+ // }
203
203
 
204
204
  let LamdaURL = 'https://nmjcclomhgdecmoyned3sp6y6q0pemhg.lambda-url.ap-south-1.on.aws/';
205
205
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );