tango-app-api-trax 3.8.12 → 3.8.13-nike

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-trax",
3
- "version": "3.8.12",
3
+ "version": "3.8.13-nike",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  "nodemon": "^3.1.4",
30
30
  "path": "^0.12.7",
31
31
  "puppeteer": "^24.39.1",
32
- "tango-api-schema": "^2.5.72",
32
+ "tango-api-schema": "^2.5.90",
33
33
  "tango-app-api-middleware": "^3.5.2",
34
34
  "url": "^0.11.4",
35
35
  "winston": "^3.13.1",
@@ -53,31 +53,31 @@ async function getBrandInfo( clientId ) {
53
53
  return brandInfo;
54
54
  }
55
55
 
56
- async function streamChecklistZip( res, checklistList, brandInfo, zipBaseName ) {
57
- const zipName = `${sanitizeFilenamePart( zipBaseName, 'visit-checklists' )}_${dayjs().format( 'YYYY-MM-DD_HH-mm' )}.zip`;
56
+ // async function streamChecklistZip( res, checklistList, brandInfo, zipBaseName ) {
57
+ // const zipName = `${sanitizeFilenamePart( zipBaseName, 'visit-checklists' )}_${dayjs().format( 'YYYY-MM-DD_HH-mm' )}.zip`;
58
58
 
59
- res.status( 200 );
60
- res.setHeader( 'Content-Type', 'application/zip' );
61
- res.setHeader( 'Content-Disposition', `attachment; filename="${zipName.replace( /"/g, '\\"' )}"` );
62
- res.setHeader( 'Cache-Control', 'private, no-cache' );
59
+ // res.status( 200 );
60
+ // res.setHeader( 'Content-Type', 'application/zip' );
61
+ // res.setHeader( 'Content-Disposition', `attachment; filename="${zipName.replace( /"/g, '\\"' )}"` );
62
+ // res.setHeader( 'Cache-Control', 'private, no-cache' );
63
63
 
64
- const archive = archiver( 'zip', { zlib: { level: 9 } } );
64
+ // const archive = archiver( 'zip', { zlib: { level: 9 } } );
65
65
 
66
- archive.on( 'error', ( err ) => {
67
- throw err;
68
- } );
66
+ // archive.on( 'error', ( err ) => {
67
+ // throw err;
68
+ // } );
69
69
 
70
- archive.pipe( res );
70
+ // archive.pipe( res );
71
71
 
72
- for ( const checklistDetails of checklistList ) {
73
- const templateData = buildVisitChecklistTemplateData( checklistDetails, brandInfo );
74
- const pdfBuffer = await generateVisitChecklistPDF( templateData );
75
- const pdfName = `${sanitizeFilenamePart( checklistDetails.storeName || checklistDetails.store_id || checklistDetails._id, 'store' )}_${sanitizeFilenamePart( checklistDetails.checkListName || 'Visit Checklist' )}.pdf`;
76
- archive.append( Buffer.isBuffer( pdfBuffer ) ? pdfBuffer : Buffer.from( pdfBuffer ), { name: pdfName } );
77
- }
72
+ // for ( const checklistDetails of checklistList ) {
73
+ // const templateData = buildVisitChecklistTemplateData( checklistDetails, brandInfo );
74
+ // const pdfBuffer = await generateVisitChecklistPDF( templateData );
75
+ // const pdfName = `${sanitizeFilenamePart( checklistDetails.storeName || checklistDetails.store_id || checklistDetails._id, 'store' )}_${sanitizeFilenamePart( checklistDetails.checkListName || 'Visit Checklist' )}.pdf`;
76
+ // archive.append( Buffer.isBuffer( pdfBuffer ) ? pdfBuffer : Buffer.from( pdfBuffer ), { name: pdfName } );
77
+ // }
78
78
 
79
- await archive.finalize();
80
- }
79
+ // await archive.finalize();
80
+ // }
81
81
 
82
82
  async function createChecklistZipBuffer( checklistList, brandInfo ) {
83
83
  const output = new PassThrough();
@@ -139,6 +139,7 @@ export async function getcustomerunattendedlist( req, res ) {
139
139
  }
140
140
  let url = JSON.parse( process.env.LAMBDAURL );
141
141
  let resultData = await LamdaServiceCall( url.customerUnattended, req.body );
142
+ console.log( '🚀 ~ getcustomerunattendedlist ~ url.customerUnattended:', url.customerUnattended );
142
143
  if ( resultData ) {
143
144
  if ( resultData.status_code == '200' ) {
144
145
  return res.sendSuccess( resultData );
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-invalid-this */
1
2
  import Handlebars from 'handlebars';
2
3
  import fs from 'fs';
3
4