tango-app-api-task 3.2.1-beta-27 → 3.2.1-beta-28

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-task",
3
- "version": "3.2.1-beta-27",
3
+ "version": "3.2.1-beta-28",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3421,7 +3421,7 @@ async function assignUsers( data ) {
3421
3421
  {
3422
3422
  $match: {
3423
3423
  clientId: data.clientId,
3424
- ...( !data?.clusterName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { cluster: data.clusterName.toLowerCase() },
3424
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { cluster: data.clusterName.toLowerCase() },
3425
3425
  },
3426
3426
  },
3427
3427
  {
@@ -3486,7 +3486,7 @@ async function assignUsers( data ) {
3486
3486
  {
3487
3487
  $match: {
3488
3488
  clientId: data.clientId,
3489
- ...( !data.storeName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { store: data.storeName.toLowerCase() },
3489
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { store: data.storeName.toLowerCase() },
3490
3490
  },
3491
3491
  },
3492
3492
  ];
@@ -3533,7 +3533,7 @@ async function assignUsers( data ) {
3533
3533
  {
3534
3534
  $match: {
3535
3535
  clientId: data.clientId,
3536
- ...( !data?.teamName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { team: data.teamName.toLowerCase() },
3536
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { team: data.teamName.toLowerCase() },
3537
3537
  },
3538
3538
  },
3539
3539
  ];
@@ -3580,7 +3580,7 @@ async function assignUsers( data ) {
3580
3580
  {
3581
3581
  $match: {
3582
3582
  clientId: data.clientId,
3583
- ...( !data?.userEmail ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { userEmail: data.userEmail.toLowerCase() },
3583
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { userEmail: data.userEmail.toLowerCase() },
3584
3584
  },
3585
3585
  },
3586
3586
  ];
@@ -3614,7 +3614,7 @@ async function assignUsers( data ) {
3614
3614
  }
3615
3615
 
3616
3616
  // console.log( assignedData, 'test', data );
3617
- if ( assignedData && !data.upload && data.insert ) {
3617
+ if ( assignedData && data?.insert ) {
3618
3618
  await taskAssignService.updateOne( { checkListId: assignedData.checkListId, assignId: assignedData.assignId }, assignedData );
3619
3619
  } else {
3620
3620
  return assignedData;
@@ -159,6 +159,7 @@ export const approvalTableV1 = async ( req, res ) => {
159
159
  ],
160
160
  },
161
161
  },
162
+ coverage: { $first: '$coverage' },
162
163
  },
163
164
  },
164
165
  {
@@ -177,6 +178,7 @@ export const approvalTableV1 = async ( req, res ) => {
177
178
  unApproveCount: 1,
178
179
  storeName: 1,
179
180
  redo: '$_id.redoType',
181
+ coverage: 1,
180
182
  },
181
183
  },
182
184
  {