tango-app-api-store-builder 1.0.0-beta-170 → 1.0.0-beta-172

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-170",
3
+ "version": "1.0.0-beta-172",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4893,9 +4893,22 @@ export async function getRolloutDetails( req, res ) {
4893
4893
  if ( req.body.filter.status.includes( 'yetToAssign' ) ) {
4894
4894
  orCondition.push( {
4895
4895
  $expr: {
4896
- $eq: [ { $size: '$taskDetails' }, 0 ],
4896
+ $lt: [ { $size: '$taskDetails' }, 2 ],
4897
4897
  },
4898
- } );
4898
+ },
4899
+ {
4900
+ $and: [
4901
+ { taskDetails: { $elemMatch: { type: 'merchRollout', status: 'submit' } } },
4902
+ { 'taskFeedback.fixtureStatus': 'disagree' },
4903
+ ],
4904
+ },
4905
+ {
4906
+ $and: [
4907
+ { taskDetails: { $elemMatch: { type: 'vmRollout', status: 'submit' } } },
4908
+ { 'taskFeedback.vmStatus': 'disagree' },
4909
+ ],
4910
+ },
4911
+ );
4899
4912
  }
4900
4913
 
4901
4914
  if ( req.body.filter.status.includes( 'taskAssigned' ) ) {
@@ -4905,8 +4918,7 @@ export async function getRolloutDetails( req, res ) {
4905
4918
  }
4906
4919
 
4907
4920
  if ( req.body.filter.status.includes( 'reviewPending' ) ) {
4908
- orCondition.push( {
4909
- $or: [
4921
+ orCondition.push(
4910
4922
  {
4911
4923
  $and: [
4912
4924
  { taskDetails: { $elemMatch: { type: 'merchRollout', status: 'submit' } } },
@@ -4919,15 +4931,18 @@ export async function getRolloutDetails( req, res ) {
4919
4931
  { 'taskFeedback.vmStatus': 'pending' },
4920
4932
  ],
4921
4933
  },
4922
- ],
4923
- } );
4934
+ );
4924
4935
  }
4925
4936
 
4926
4937
  if ( req.body.filter.status.includes( 'completed' ) ) {
4927
4938
  orCondition.push( {
4928
4939
  $and: [
4929
- { taskDetails: { $elemMatch: { type: 'merchRollout', status: 'submit' } } },
4930
- { taskDetails: { $elemMatch: { type: 'vmRollout', status: 'submit' } } },
4940
+ {
4941
+ $or: [
4942
+ { taskDetails: { $elemMatch: { type: 'merchRollout', status: 'submit' } } },
4943
+ { taskDetails: { $elemMatch: { type: 'vmRollout', status: 'submit' } } },
4944
+ ],
4945
+ },
4931
4946
  {
4932
4947
  $expr: {
4933
4948
  $eq: [ { $size: { $objectToArray: '$taskFeedback' } }, 0 ],
@@ -1054,7 +1054,7 @@ export async function revokeTask( req, res ) {
1054
1054
  if ( !req.body.floorId ) {
1055
1055
  return res.sendError( 'floor id is required', 400 );
1056
1056
  }
1057
- await processedService.deleteMany( { planoId: req.body.planoId, floorId: req.body.floorId, checklistStatus: { $ne: 'submit' }, date_iso: { $gte: new Date( dayjs().format( 'YYYY-MM-DD' ) ) }, ...( req.body?.type && { planoType: req.body?.type } ) } );
1057
+ await processedService.deleteMany( { planoId: req.body.planoId, floorId: req.body.floorId, checklistStatus: { $ne: 'submit' }, ...( req.body?.type && { planoType: req.body?.type } ) } );
1058
1058
  return res.sendSuccess( 'Task revoked successfully' );
1059
1059
  } catch ( e ) {
1060
1060
  logger.error( { functionName: 'revokeTask', error: e } );