tango-app-api-trax 3.3.1-beta-74 → 3.3.1-beta-76

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-74",
3
+ "version": "3.3.1-beta-76",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2481,7 +2481,7 @@ export async function checklistv1( req, res ) {
2481
2481
  const totalData = [ ...checklistData, ...taskData ];
2482
2482
 
2483
2483
  if ( !totalData.length ) {
2484
- return res.sendError( { error: 'No Data Found' }, 204 );
2484
+ return res.sendSuccess( { count: 0, data: [] } );
2485
2485
  }
2486
2486
 
2487
2487
  const getSortingParams = ( status ) => {
@@ -3026,7 +3026,7 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
3026
3026
  if ( teamsList.length ) {
3027
3027
  let teamDetails = await teamsServices.findteams( { _id: { $in: teamsList } } );
3028
3028
  if ( teamDetails.length ) {
3029
- let idList = teamDetails.flatMap( ( item ) => item.users.map( ( ele ) => ele.userId ) );
3029
+ let idList = [ ...teamDetails.flatMap( ( item ) => item.users.map( ( ele ) => ele.userId ) ), ...teamDetails.flatMap( ( item ) => item.Teamlead.map( ( ele ) => ele.userId ) ) ];
3030
3030
  let userIdList = allQuestion.filter( ( qn ) => !qn?.teamName ).map( ( qn ) => qn.assignId.toString() );
3031
3031
  idList = idList.filter( ( id ) => !userIdList.includes( id.toString() ) );
3032
3032
  let getUserDetails = await userService.find( { _id: { $in: idList } } );
@@ -3330,6 +3330,7 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
3330
3330
  date_iso: insertdata.date_iso,
3331
3331
  client_id: insertdata.client_id,
3332
3332
  checkListId: updatedchecklist._id,
3333
+ checklistStatus: 'inprogress',
3333
3334
  }, { userId: 1, store_id: 1 } );
3334
3335
 
3335
3336
  if ( inprogressData.length ) {