tango-app-api-store-builder 1.0.0-beta-128 → 1.0.0-beta-129

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-128",
3
+ "version": "1.0.0-beta-129",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -252,6 +252,10 @@ export async function getplanoFeedback( req, res ) {
252
252
  {
253
253
  $project: {
254
254
  '_id': 1,
255
+ 'type': 1,
256
+ 'type': 1,
257
+ 'taskId': 1,
258
+ 'taskData': 1,
255
259
  'answers': 1,
256
260
  'createdAt': 1,
257
261
  'date_iso': 1,
@@ -311,9 +315,18 @@ export async function getplanoFeedback( req, res ) {
311
315
  planoId: { $first: '$planoId' },
312
316
  status: { $first: '$status' },
313
317
  taskType: { $first: '$taskType' },
318
+ type: { $first: '$type' },
319
+ taskId: { $first: '$taskId' },
320
+ taskData: { $first: '$taskData' },
314
321
  baseFixtureData: { $first: '$FixtureData' },
315
322
  collectedVmConfigs: {
316
- $push: '$FixtureData.vmConfig',
323
+ $push: {
324
+ $cond: [
325
+ { $ne: [ '$FixtureData.vmConfig', {} ] },
326
+ '$FixtureData.vmConfig',
327
+ '$$REMOVE',
328
+ ],
329
+ },
317
330
  },
318
331
  },
319
332
  },
@@ -329,6 +342,9 @@ export async function getplanoFeedback( req, res ) {
329
342
  planoId: 1,
330
343
  status: 1,
331
344
  taskType: 1,
345
+ type: 1,
346
+ taskId: 1,
347
+ taskData: 1,
332
348
  FixtureData: {
333
349
  $mergeObjects: [
334
350
  '$baseFixtureData',
@@ -607,13 +623,13 @@ export async function updateFixtureStatus( req, res ) {
607
623
  { 'det._id': new mongoose.Types.ObjectId( req.body.DetailsId ) },
608
624
 
609
625
  ] );
610
- if ( updateResponse&&updateResponse.answers.length>0 ) {
626
+ if ( updateResponse && updateResponse.answers.length > 0 ) {
611
627
  console.log( updateResponse.answers[0] );
612
- let findissuse= updateResponse.answers[0].issues.filter( ( data ) => data._id==req.body.issueId );
628
+ let findissuse = updateResponse.answers[0].issues.filter( ( data ) => data._id == req.body.issueId );
613
629
  console.log( findissuse );
614
- let findDetails = findissuse[0].Details.filter( ( det ) => det.status==='agree' );
630
+ let findDetails = findissuse[0].Details.filter( ( det ) => det.status === 'agree' );
615
631
  console.log( '======', findDetails.length );
616
- if ( findissuse[0].Details.length=== findDetails.length ) {
632
+ if ( findissuse[0].Details.length === findDetails.length ) {
617
633
  await planoTaskService.updateOnefilters(
618
634
  { _id: new mongoose.Types.ObjectId( req.body._id ) },
619
635
  {
@@ -626,9 +642,9 @@ export async function updateFixtureStatus( req, res ) {
626
642
  }
627
643
  let findoneplanoData = await planoTaskService.findOne( { _id: new mongoose.Types.ObjectId( req.body._id ) } );
628
644
  console.log( '************', findoneplanoData.answers[0].issues );
629
- let totalApproved= findoneplanoData.answers[0].issues.filter( ( data ) => data.status==='pending' );
645
+ let totalApproved = findoneplanoData.answers[0].issues.filter( ( data ) => data.status === 'pending' );
630
646
  console.log( '---------->', totalApproved.length );
631
- if ( totalApproved.length===0 ) {
647
+ if ( totalApproved.length === 0 ) {
632
648
  await planoTaskService.updateOne(
633
649
  {
634
650
  _id: new mongoose.Types.ObjectId( req.body._id ),
@@ -640,7 +656,7 @@ export async function updateFixtureStatus( req, res ) {
640
656
  }
641
657
  }
642
658
 
643
- if ( req.body.taskType==='layout' ) {
659
+ if ( req.body.taskType === 'layout' ) {
644
660
  await planoTaskService.updateOnefilters(
645
661
  { _id: new mongoose.Types.ObjectId( req.body._id ) },
646
662
  {
@@ -754,7 +770,7 @@ export async function updateStoreFixture( req, res ) {
754
770
  export async function updateredostatus( req, res ) {
755
771
  try {
756
772
  console.log( '------->', req.body );
757
- if ( req.body.type==='layout' ) {
773
+ if ( req.body.type === 'layout' ) {
758
774
  await planoTaskService.updateOne(
759
775
  {
760
776
  planoId: new mongoose.Types.ObjectId( req.body.planoId ),