tango-app-api-store-builder 1.0.29 → 1.0.31

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-store-builder",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9573,8 +9573,8 @@ export async function productMappings( req, res ) {
9573
9573
 
9574
9574
  const { fixtureId, Top, Mid, Bottom } = payload;
9575
9575
 
9576
- const storeName = 'LKST2681';
9577
- const storeId = '11-2362';
9576
+ const storeName = 'LKST11';
9577
+ const storeId = '11-259';
9578
9578
  const clientId = '11';
9579
9579
 
9580
9580
  if ( !fixtureId ) {
@@ -8455,7 +8455,7 @@ export async function getPlanogramListOld( req, res ) {
8455
8455
 
8456
8456
  return res.sendSuccess( { data, count: total } );
8457
8457
  } catch ( err ) {
8458
- logger.error( { functionName: 'getLayoutList', error: err } );
8458
+ logger.error( { functionName: 'getPlanogramListOld', error: err } );
8459
8459
  return res.sendError( err, 500 );
8460
8460
  }
8461
8461
  }
@@ -8582,15 +8582,16 @@ export async function getPlanogramList( req, res ) {
8582
8582
  merchCompliance: {
8583
8583
  $floor: [
8584
8584
  {
8585
- $multiply: [
8586
- {
8585
+ $cond: {
8586
+ if: { $gt: [ { $ifNull: [ '$productCount', 0 ] }, 0 ] },
8587
+ then: {
8587
8588
  $divide: [
8588
8589
  { $ifNull: [ { $arrayElemAt: [ '$complianceCount.count', 0 ] }, 0 ] },
8589
- { $ifNull: [ '$productCount', 1 ] },
8590
+ '$productCount',
8590
8591
  ],
8591
8592
  },
8592
- 100,
8593
- ],
8593
+ else: 0,
8594
+ },
8594
8595
  },
8595
8596
  ],
8596
8597
  },
@@ -8683,7 +8684,7 @@ export async function getPlanogramList( req, res ) {
8683
8684
 
8684
8685
  return res.sendSuccess( { data, count: total } );
8685
8686
  } catch ( err ) {
8686
- logger.error( { functionName: 'getLayoutList', error: err } );
8687
+ logger.error( { functionName: 'getPlanogramList', error: err } );
8687
8688
  return res.sendError( err, 500 );
8688
8689
  }
8689
8690
  }
@@ -61,12 +61,12 @@ storeBuilderRouter
61
61
  .post( '/planoList', isAllowedSessionHandler, getAssinedStore, storeBuilderController.planoList )
62
62
  .get( '/taskDetails', isAllowedSessionHandler, storeBuilderController.getTaskDetails )
63
63
  .get( '/getPlanoUser', isAllowedSessionHandler, storeBuilderController.getPlanoUser )
64
- .post( '/planoRolloutList', isAllowedSessionHandler, storeBuilderController.getRolloutDetails )
64
+ .post( '/planoRolloutList', isAllowedSessionHandler, getAssinedStore, storeBuilderController.getRolloutDetails )
65
65
  .get( '/getRolloutTaskDetails', isAllowedSessionHandler, storeBuilderController.getRolloutTaskDetails )
66
66
  .get( '/getScandid', storeBuilderController.getScandid )
67
67
  .get( '/getPlanoStoreList', isAllowedSessionHandler, getAssinedStore, storeBuilderController.getPlanoStoreList )
68
68
  .get( '/getFixtureAIDetails', isAllowedSessionHandler, storeBuilderController.getFixtureAIDetails )
69
69
  .post( '/updateProductMapping', storeBuilderController.updateProductMapping )
70
70
  .post( '/calculateCompliance', isAllowedSessionHandler, storeBuilderController.calculateCompliance )
71
- .post( '/getPlanogramList', isAllowedSessionHandler, storeBuilderController.getPlanogramList )
71
+ .post( '/getPlanogramList', isAllowedSessionHandler, getAssinedStore, storeBuilderController.getPlanogramList )
72
72
  ;