tango-app-api-trax 3.7.65 → 3.7.66

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.7.65",
3
+ "version": "3.7.66",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2017,7 +2017,7 @@ export async function submitChecklist( req, res ) {
2017
2017
  let checklistDetails = await checklistService.findOne( { _id: getchecklist[0].sourceCheckList_id }, { notifyFlags: 1, approver: 1 } );
2018
2018
  if ( checklistDetails?.notifyFlags?.notifyType?.length ) {
2019
2019
  let emailList = checklistDetails?.notifyFlags?.notifyType.includes( 'approver' ) ? checklistDetails.approver.flatMap( ( ele ) => ele?.value ): [];
2020
- emailList = [ ...emailList, ...checklistDetails?.notifyFlags?.notifyType?.users.flatMap( ( ele ) => ele?.value ) ];
2020
+ emailList = [ ...emailList, ...checklistDetails?.notifyFlags?.users?.map( ( ele ) => ele?.value ) ];
2021
2021
  let data = {
2022
2022
  storeName: getchecklist[0].storeName,
2023
2023
  flagCount: updateData.questionFlag,
@@ -2026,7 +2026,6 @@ export async function submitChecklist( req, res ) {
2026
2026
  time: updateData.submitMobileTime,
2027
2027
  domain: JSON.parse( process.env.URL ).domain,
2028
2028
  };
2029
- emailList = [ 'hs9628sh@gmail.com' ];
2030
2029
  const fileContent = fs.readFileSync( path.resolve( path.dirname( '' ) ) + '/src/hbs/flag.hbs', 'utf8' );
2031
2030
  const htmlContent = handlebars.compile( fileContent );
2032
2031
  const html = htmlContent( { data: data } );
@@ -295,7 +295,7 @@ export const checklistPerformance = async ( req, res ) => {
295
295
  const complianceData = await LamdaServiceCall( complianceURL, detectionPayload );
296
296
  if ( complianceData ) {
297
297
  const end = skip + requestData?.limit;
298
- checklistIdList = complianceData.slice( start, end )?.map( ( ele ) => ele?.checklistId );
298
+ checklistIdList = complianceData.slice( skip, end )?.map( ( ele ) => ele?.checklistId );
299
299
  }
300
300
 
301
301