tango-app-api-store-builder 1.0.0-beta-161 → 1.0.0-beta-162

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.0-beta-161",
3
+ "version": "1.0.0-beta-162",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,6 +15,7 @@ import * as floorService from '../service/storeBuilder.service.js';
15
15
  import * as planoStaticService from '../service/planoStaticData.service.js';
16
16
  import * as assignService from '../service/assignService.service.js';
17
17
  import * as storeBuilderService from '../service/storeBuilder.service.js';
18
+ import * as storeFixtureService from '../service/storeFixture.service.js';
18
19
 
19
20
 
20
21
  dayjs.extend( timeZone );
@@ -668,6 +669,11 @@ export async function updateAnswersv2( req, res ) {
668
669
  await sendMessageToQueue( `${sqs.url}${sqs.storeBuilder}`, JSON.stringify( sqsData ) );
669
670
  }
670
671
 
672
+ if ( data.status == 'complete' && [ 'merchRollout', 'vmRollout' ].includes( data.type ) ) {
673
+ let query = data.type == 'merchRollout' ? { isMerchEdited: false } : { isVmEdited: false };
674
+ await storeFixtureService.updateOne( { _id: req.body.fixtureId }, query );
675
+ }
676
+
671
677
  return res.sendSuccess( 'Fixture details updated successfully' );
672
678
  } catch ( e ) {
673
679
  logger.error( { functionName: 'updateAnswers', error: e } );
@@ -21,7 +21,6 @@ export async function updateOne( query, record ) {
21
21
  }
22
22
 
23
23
  export async function updateMany( query, record ) {
24
- console.log( record, 'record' );
25
24
  return model.storeFixtureModel.updateMany( query, { $set: record } );
26
25
  }
27
26