tango-app-api-trax 3.5.0-alpha-13 → 3.5.0-hotfix-1

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.5.0-alpha-13",
3
+ "version": "3.5.0-hotfix-1",
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.116",
29
+ "tango-api-schema": "^2.2.119",
30
30
  "tango-app-api-middleware": "^3.1.77",
31
31
  "url": "^0.11.4",
32
32
  "winston": "^3.13.1",
@@ -1068,13 +1068,6 @@ export async function userList( req, res ) {
1068
1068
  },
1069
1069
  }, clientId: req.body.clientId } );
1070
1070
  req.body.teams = findTeams.map( ( data ) => data.teamName );
1071
- if ( req.body.teams.length===0 ) {
1072
- query.push( {
1073
- $match: {
1074
- userEmail: { $in: [] },
1075
- },
1076
- } );
1077
- }
1078
1071
  }
1079
1072
 
1080
1073
  if ( req.body.teams && req.body.teams.length > 0 ) {
@@ -2753,8 +2753,8 @@ export async function checklistv1( req, res ) {
2753
2753
  };
2754
2754
 
2755
2755
  const [ checklistResult, taskResult ] = await Promise.allSettled( [
2756
- processedchecklist.aggregate( buildPipeline( [ { checkListType: 'custom' } ], { isPlano: 1, planoId: 1, planoType: 1 } ) ),
2757
- processedTask.aggregate( buildPipeline( [], { isPlano: 1, planoId: 1, planoType: 1 } ) ),
2756
+ processedchecklist.aggregate( buildPipeline( [ { checkListType: 'custom' } ], { isPlano: 1, planoId: 1, planoType: 1, floorId: 1 } ) ),
2757
+ processedTask.aggregate( buildPipeline( [], { isPlano: 1, planoId: 1, planoType: 1, floorId: 1 } ) ),
2758
2758
  ] );
2759
2759
 
2760
2760
  const checklistData = checklistResult.status === 'fulfilled' ? checklistResult.value : [];
@@ -2011,8 +2011,10 @@ export const flagChecklistCardsV1 = async ( req, res ) => {
2011
2011
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
2012
2012
  if ( resultData ) {
2013
2013
  if ( resultData.status_code == '200' ) {
2014
- resultData.customerunattendedCards.timeTakentoAssist_string = await convertSecondstoTimeFormat( resultData.customerunattendedCards.timeTakentoAssistsec.secs );
2015
- resultData.customerunattendedCards.timeSpentwithCustomer_string = await convertSecondstoTimeFormat( resultData.customerunattendedCards.timeSpentwithCustomersec.secs );
2014
+ if ( resultData.customerunattendedCards && resultData.customerunattendedCards.timeTakentoAssistsec && resultData.customerunattendedCards.timeTakentoAssistsec.secs ) {
2015
+ resultData.customerunattendedCards.timeTakentoAssist_string = await convertSecondstoTimeFormat( resultData.customerunattendedCards.timeTakentoAssistsec.secs );
2016
+ resultData.customerunattendedCards.timeSpentwithCustomer_string = await convertSecondstoTimeFormat( resultData.customerunattendedCards.timeSpentwithCustomersec.secs );
2017
+ }
2016
2018
  return res.sendSuccess( resultData );
2017
2019
  } else {
2018
2020
  return res.sendError( 'No Content', 204 );