tango-app-api-store-builder 1.0.0-beta-43 → 1.0.0-beta-44

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.
@@ -598,7 +598,7 @@ export async function storeFixturesv1( req, res ) {
598
598
  date: currentDate,
599
599
  } );
600
600
 
601
- const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1 } );
601
+ const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1, shelfCapacity: 1 } );
602
602
 
603
603
  const shelfDetails = await Promise.all(
604
604
  shelves.map( async ( shelf ) => {
@@ -692,7 +692,7 @@ export async function storeFixturesv1( req, res ) {
692
692
  date: currentDate,
693
693
  } );
694
694
 
695
- const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1 } );
695
+ const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1, shelfCapacity: 1 } );
696
696
 
697
697
  const shelfDetails = await Promise.all(
698
698
  shelves.map( async ( shelf ) => {
@@ -2017,7 +2017,7 @@ export async function storeFixturesTask( req, res ) {
2017
2017
  type: req.body?.type ? req.body.type : 'fixture',
2018
2018
  }, { status: 1 } );
2019
2019
 
2020
- const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1 } );
2020
+ const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1, shelfCapacity: 1 } );
2021
2021
 
2022
2022
  const shelfDetails = await Promise.all(
2023
2023
  shelves.map( async ( shelf ) => {
@@ -2084,7 +2084,7 @@ export async function storeFixturesTask( req, res ) {
2084
2084
  type: req.body?.type ? req.body.type : 'fixture',
2085
2085
  }, { status: 1 } );
2086
2086
 
2087
- const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1 } );
2087
+ const shelves = await fixtureShelfService.find( { fixtureId: fixture._id }, { shelfNumber: 1, sectionName: 1, sectionZone: 1, shelfCapacity: 1 } );
2088
2088
 
2089
2089
  const shelfDetails = await Promise.all(
2090
2090
  shelves.map( async ( shelf ) => {
@@ -10,4 +10,5 @@ scriptRouter
10
10
  .post( '/bulkInsertPlanoData', scriptController.createPlano )
11
11
  .post( '/bulkIinsertFloorData', scriptController.createFloors )
12
12
  .post( '/bulkIinsertVmTemplateData', scriptController.createVmData )
13
- .post( '/bulkIinsertFixturesShelvesVmsData', scriptController.createFixturesShelves );
13
+ .post( '/bulkIinsertFixturesShelvesVmsData', scriptController.createFixturesShelves )
14
+ .post( '/updateFixturesShelvesVms', scriptController.updateFixturesShelves );
@@ -24,6 +24,10 @@ export async function findOneAndUpdate( query={}, field={} ) {
24
24
  return model.storeFixtureModel.findOneAndUpdate( query, field );
25
25
  }
26
26
 
27
+ export async function findOneAndUpdate2( query={}, field={} ) {
28
+ return model.storeFixtureModel.findOneAndUpdate( query, field, { new: true } );
29
+ }
30
+
27
31
  export async function create( data ) {
28
32
  return model.storeFixtureModel.create( data );
29
33
  }