tango-app-api-trax 3.8.6 → 3.8.7

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.8.6",
3
+ "version": "3.8.7",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4056,7 +4056,7 @@ export async function sendAIEmailList( req, res ) {
4056
4056
  if ( getChecklistDetails?.aiConfig?.alertConfig?.alertSendTo?.email?.type.includes( 'teams' ) ) {
4057
4057
  let teamDetails = await teamsServices.findteams( { teamName: { $in: getChecklistDetails?.aiConfig?.alertConfig?.alertSendTo?.email?.teams?.map( ( ele ) => ele.name ) } } );
4058
4058
  if ( teamDetails.length ) {
4059
- userList.push( ...teamDetails.flatMap( ( team ) => team.users.map( ( user ) => user.email ) ) );
4059
+ userList.push( ...teamDetails.flatMap( ( team ) => team.users.map( ( user ) => user.email ) ), ...teamDetails?.flatMap( ( team ) => team.Teamlead.map( ( user ) => user.email ) ) );
4060
4060
  }
4061
4061
  }
4062
4062
  if ( getChecklistDetails?.aiConfig?.alertConfig?.alertSendTo?.email?.type.includes( 'users' ) ) {