tango-app-api-trax 3.3.1-beta-36 → 3.3.1-beta-38

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-trax",
3
- "version": "3.3.1-beta-36",
3
+ "version": "3.3.1-beta-38",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "mongodb": "^6.8.0",
27
27
  "nodemon": "^3.1.4",
28
28
  "path": "^0.12.7",
29
- "tango-api-schema": "^2.2.52",
29
+ "tango-api-schema": "^2.2.56",
30
30
  "tango-app-api-middleware": "^3.1.55",
31
31
  "url": "^0.11.4",
32
32
  "winston": "^3.13.1",
@@ -2454,6 +2454,7 @@ export async function checklistv1( req, res ) {
2454
2454
  ...projectExtraConditions,
2455
2455
  client_id: { $ifNull: [ '$client_id', '' ] },
2456
2456
  coverage: { $ifNull: [ '$coverage', '' ] },
2457
+ taskType: { $ifNull: [ '$type', '' ] },
2457
2458
  },
2458
2459
  },
2459
2460
  ];
@@ -2485,6 +2485,7 @@ export async function insertSingleProcessData( checklistId, processId = 0, oldDa
2485
2485
  insertdata.approver = getCLconfig?.approver || [];
2486
2486
  insertdata.remainder = getCLconfig?.remainder || [];
2487
2487
  insertdata.restrictAttendance = getCLconfig?.restrictAttendance;
2488
+ insertdata.coverage = getCLconfig?.coverage;
2488
2489
 
2489
2490
  let collectSections = [];
2490
2491
  let sectionQuery = [];
@@ -3544,7 +3545,7 @@ async function assignUsers( data ) {
3544
3545
  {
3545
3546
  $match: {
3546
3547
  clientId: data.clientId,
3547
- ...( !data?.clusterName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { cluster: data.clusterName.toLowerCase() },
3548
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { cluster: data.clusterName.toLowerCase() },
3548
3549
  },
3549
3550
  },
3550
3551
  {
@@ -3609,7 +3610,7 @@ async function assignUsers( data ) {
3609
3610
  {
3610
3611
  $match: {
3611
3612
  clientId: data.clientId,
3612
- ...( !data.storeName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { store: data.storeName.toLowerCase() },
3613
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { store: data.storeName.toLowerCase() },
3613
3614
  },
3614
3615
  },
3615
3616
  ];
@@ -3655,7 +3656,7 @@ async function assignUsers( data ) {
3655
3656
  {
3656
3657
  $match: {
3657
3658
  clientId: data.clientId,
3658
- ...( !data?.teamName ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { team: data.teamName.toLowerCase() },
3659
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { team: data.teamName.toLowerCase() },
3659
3660
  },
3660
3661
  },
3661
3662
  ];
@@ -3702,7 +3703,7 @@ async function assignUsers( data ) {
3702
3703
  {
3703
3704
  $match: {
3704
3705
  clientId: data.clientId,
3705
- ...( !data?.userEmail ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { userEmail: data.userEmail.toLowerCase() },
3706
+ ...( data?.id ) ? { _id: new mongoose.Types.ObjectId( data.id ) } : { userEmail: data.userEmail.toLowerCase() },
3706
3707
  },
3707
3708
  },
3708
3709
  ];
@@ -3736,7 +3737,7 @@ async function assignUsers( data ) {
3736
3737
  }
3737
3738
 
3738
3739
  // console.log( assignedData, 'test', data );
3739
- if ( assignedData && !data.upload && data.insert ) {
3740
+ if ( assignedData && data?.insert ) {
3740
3741
  await assignedService.updateOne( { checkListId: assignedData.checkListId, assignId: assignedData.assignId }, assignedData );
3741
3742
  } else {
3742
3743
  return assignedData;