tango-app-api-store-builder 1.0.0-beta-164 → 1.0.0-beta-166

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-164",
3
+ "version": "1.0.0-beta-166",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -80,7 +80,7 @@ function buildPipelineByType( type, planoId, floorId, filterByStatus, filterByAp
80
80
  planoId: new mongoose.Types.ObjectId( planoId ),
81
81
  floorId: new mongoose.Types.ObjectId( floorId ),
82
82
  type: type,
83
- ...( taskId && { taskId: taskId } ),
83
+ ...( taskId && { taskId: new mongoose.Types.ObjectId( taskId ) } ),
84
84
  ...( filterByStatus?.length ? { status: { $in: filterByStatus } } : {} ),
85
85
  },
86
86
  };
@@ -3016,6 +3016,7 @@ export async function storeFixturesTaskv2( req, res ) {
3016
3016
  const vmCount = await planoMappingService.count( { fixtureId: fixture._id, type: 'vm' } );
3017
3017
 
3018
3018
  const compliance = await planoTaskComplianceService.findAndSort( {
3019
+ ...( ( [ 'merchRollout', 'vmRollout' ].includes( req.body?.type )&& req?.body?.taskId ) && { taskId: req.body.taskId } ),
3019
3020
  fixtureId: fixture._id,
3020
3021
  type: req.body?.type ? req.body.type : 'fixture',
3021
3022
  }, { status: 1, answers: 1, taskType: 1 }, { _id: -1 } );
@@ -3116,6 +3117,7 @@ export async function storeFixturesTaskv2( req, res ) {
3116
3117
  const vmCount = await planoMappingService.count( { fixtureId: fixture._id, type: 'vm' } );
3117
3118
 
3118
3119
  const compliance = await planoTaskComplianceService.findAndSort( {
3120
+ ...( ( [ 'merchRollout', 'vmRollout' ].includes( req.body?.type )&& req?.body?.taskId ) && { taskId: req.body.taskId } ),
3119
3121
  fixtureId: fixture._id,
3120
3122
  type: req.body?.type ? req.body.type : 'fixture',
3121
3123
  }, { status: 1, answers: 1, taskType: 1 }, { _id: -1 } );