tango-app-api-trax 3.7.53 → 3.7.55

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.53",
3
+ "version": "3.7.55",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1089,7 +1089,7 @@ export async function sopMobilechecklistMultiSectionFormatterv1( req, res, next
1089
1089
 
1090
1090
  if ( requestData.submittype == 'submit' ) {
1091
1091
  reqAnswers.forEach( ( reqA ) => {
1092
- if ( ![ 'multiplechoicemultiple', 'multipleImage' ].includes( reqA?.answerType ) && ( reqA.answerType == 'dropDown' && !reqA.allowMultiple ) ) {
1092
+ if ( ![ 'multiplechoicemultiple', 'multipleImage', 'image/video' ].includes( reqA?.answerType ) && ( reqA.answerType == 'dropDown' && !reqA.allowMultiple ) ) {
1093
1093
  if ( ( !reqA.linkType && ( reqA.answer == null || reqA.answer == '' ) ) || ( reqA.linkType && reqA.linkquestionenabled && ( reqA.answer == null || reqA.answer == '' ) ) ) {
1094
1094
  return res.sendError( 'Please Fill All Fields', 400 );
1095
1095
  }
@@ -1343,7 +1343,7 @@ export async function sopMobilechecklistMultiSectionFormatterv1( req, res, next
1343
1343
  structure.redoComment = qaAnswers[j]?.redoComment;
1344
1344
  };
1345
1345
  newArray.push( structure );
1346
- } else if ( qaAnswers[j].answerType == 'multipleImage' ) {
1346
+ } else if ( [ 'image/video', 'multipleImage' ].includes( qaAnswers[j].answerType ) ) {
1347
1347
  let separatedArray = typeof requestSection[i].Multianswer == 'string' ? JSON.parse( requestSection[i].Multianswer ) : requestSection[i].Multianswer;
1348
1348
  let mcmi = [];
1349
1349
  // for (let k = 0; k < qaans.length; k++) {
@@ -1373,6 +1373,9 @@ export async function sopMobilechecklistMultiSectionFormatterv1( req, res, next
1373
1373
  newAnswer.runAI = qaAnswers[j].answers[0]?.runAI || false;
1374
1374
  newAnswer.runAIFeatures = qaAnswers[j].answers[0]?.runAIFeatures || [];
1375
1375
  newAnswer.runAIDescription = qaAnswers[j].answers[0]?.runAIDescription || '';
1376
+ if ( qaAnswers[j].answerType == 'image/video' ) {
1377
+ newAnswer.answerType = separatedArray[s].answerType;
1378
+ }
1376
1379
  mcmi.push( newAnswer );
1377
1380
  }
1378
1381
  }
@@ -2009,6 +2012,32 @@ export async function submitChecklist( req, res ) {
2009
2012
  };
2010
2013
  console.log( 'inserttraxlogs =>', inserttraxlogs );
2011
2014
  insertOpenSearchData( openSearch.traxActivityLog, inserttraxlogs );
2015
+ let checklistDetails = await checklistService.findOne( { _id: getchecklist[0].sourceCheckList_id }, { notifyFlags: 1, approver: 1 } );
2016
+ if ( checklistDetails?.notifyFlags?.notifyType?.length ) {
2017
+ let emailList = checklistDetails?.notifyFlags?.notifyType.includes( 'approver' ) ? checklistDetails.approver.flatMap( ( ele ) => ele?.value ): [];
2018
+ emailList = [ ...emailList, ...checklistDetails?.notifyFlags?.notifyType?.users.flatMap( ( ele ) => ele?.value ) ];
2019
+ let data = {
2020
+ storeName: getchecklist[0].storeName,
2021
+ flagCount: updateData.questionFlag,
2022
+ checklistName: getchecklist[0].checkListName,
2023
+ submittedBy: getchecklist[0].userName,
2024
+ time: updateData.submitMobileTime,
2025
+ domain: JSON.parse( process.env.URL ).domain,
2026
+ };
2027
+ const templateHtml = fs.readFileSync( path.resolve( path.dirname( '' ) ) + '/src/hbs/trialExtentionEmail.hbs', 'utf8' );
2028
+ const template = Handlebars.compile( templateHtml );
2029
+ const html = template( { data: data } );
2030
+ emailList.forEach( ( email ) => {
2031
+ let params = {
2032
+ toEmail: email,
2033
+ mailSubject: 'TangoEye | Checklist Flag',
2034
+ htmlBody: html,
2035
+ attachment: '',
2036
+ sourceEmail: JSON.parse( process.env.SES ).adminEmail,
2037
+ };
2038
+ sendEmailWithSES( params.toEmail, params.mailSubject, params.htmlBody, params.attachment, params.sourceEmail );
2039
+ } );
2040
+ }
2012
2041
  }
2013
2042
 
2014
2043
  return res.sendSuccess( 'Checklist Updated Successfully' );
@@ -3237,6 +3266,7 @@ export async function questionList( req, res ) {
3237
3266
  startTime: { $ifNull: [ '$startTime', '' ] },
3238
3267
  submitTime: { $ifNull: [ '$submitTime', '' ] },
3239
3268
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
3269
+ sourceCheckList_id: 1,
3240
3270
  // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
3241
3271
  allowedStoreLocation: {
3242
3272
  $cond: {
@@ -3292,7 +3322,7 @@ export async function questionList( req, res ) {
3292
3322
  }
3293
3323
 
3294
3324
  for ( let [ ansIndex, answer ] of question.answers.entries() ) {
3295
- if ( question.answerType == 'multiplechoicemultiple' ) {
3325
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
3296
3326
  let checkvalidation = null;
3297
3327
  if ( answer.validationAnswer && answer.validationAnswer !='' ) {
3298
3328
  if ( answer.validationType != 'Descriptive Answer' ) {
@@ -3346,24 +3376,24 @@ export async function questionList( req, res ) {
3346
3376
  getchecklist[0].questionAnswers[secIndex].questions[questionIndex].userAnswer[userAnsIndex].multiReferenceImage = userAns.multiReferenceImage;
3347
3377
  }
3348
3378
 
3349
- if ( question.answerType == 'multiplechoicemultiple' ) {
3379
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
3350
3380
  let ansIndex = Multianswer.findIndex( ( item ) => item.answer == userAns.answer );
3351
3381
  if ( ansIndex ) {
3352
3382
  Multianswer[ansIndex].validationAnswer = userAns.validationAnswer;
3353
3383
  }
3354
3384
  }
3355
- if ( question.answerType == 'multipleImage' ) {
3385
+ if ( [ 'image/video', 'multipleImage' ].includes( question.answerType ) ) {
3356
3386
  if ( userAns && userAns.answer && userAns.answer !='' ) {
3357
3387
  // let manswer = await signedUrl( { file_path: decodeURIComponent( userAns.answer ), Bucket: bucket.sop } );
3358
3388
  let manswer = `${cdnurl.TraxAnswerCDN}${userAns.answer}`;
3359
- Multianswer.push( { 'answer': manswer, 'no': userAnsIndex, 'validationAnswer': '' } );
3389
+ Multianswer.push( { 'answer': manswer, 'no': userAnsIndex, 'validationAnswer': '', ...( question.answerType == 'image/video' && { answerType: userAns?.answerType } ) } );
3360
3390
  } else {
3361
3391
 
3362
3392
  }
3363
3393
  }
3364
3394
  }
3365
3395
  }
3366
- if ( question.answerType == 'multiplechoicemultiple' ) {
3396
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
3367
3397
  Multianswer.forEach( ( item ) => {
3368
3398
  if ( item.validationAnswer == null ) {
3369
3399
  item.answer = null;
@@ -3375,11 +3405,11 @@ export async function questionList( req, res ) {
3375
3405
  question.Multianswer = Multianswer;
3376
3406
  }
3377
3407
  }
3378
- if ( question.answerType == 'multipleImage' ) {
3408
+ if ( [ 'image/video', 'multipleImage' ].includes( question.answerType ) ) {
3379
3409
  if ( Multianswer.length ) {
3380
3410
  question.Multianswer = Multianswer;
3381
3411
  } else {
3382
- Multianswer.push( { 'answer': null, 'no': 0, 'validationAnswer': null } );
3412
+ Multianswer.push( { 'answer': null, 'no': 0, 'validationAnswer': null, ...( question.answerType == 'image/video' && { answerType: null } ) } );
3383
3413
  question.Multianswer = Multianswer;
3384
3414
  }
3385
3415
  }
@@ -3424,6 +3454,11 @@ export async function questionList( req, res ) {
3424
3454
  }
3425
3455
  }
3426
3456
 
3457
+ let checklisDetails = await checklistService.findOne( { _id: getchecklist?.[0]?.sourceCheckList_id }, { export: 1 } );
3458
+ if ( checklisDetails ) {
3459
+ getchecklist[0]['export'] = checklisDetails.export;
3460
+ }
3461
+
3427
3462
  return res.sendSuccess( getchecklist );
3428
3463
  }
3429
3464
  } catch ( e ) {
@@ -4245,6 +4280,7 @@ export async function questionListV1( req, res ) {
4245
4280
  startTime: { $ifNull: [ '$startTime', '' ] },
4246
4281
  submitTime: { $ifNull: [ '$submitTime', '' ] },
4247
4282
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
4283
+ sourceCheckList_id: { $ifNull: [ '$sourceCheckList_id', '' ] },
4248
4284
  // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
4249
4285
  allowedStoreLocation: {
4250
4286
  $cond: {
@@ -4300,7 +4336,7 @@ export async function questionListV1( req, res ) {
4300
4336
  }
4301
4337
 
4302
4338
  for ( let [ ansIndex, answer ] of question.answers.entries() ) {
4303
- if ( question.answerType == 'multiplechoicemultiple' ) {
4339
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
4304
4340
  let checkvalidation = null;
4305
4341
  if ( answer.validationAnswer && answer.validationAnswer !='' ) {
4306
4342
  if ( answer.validationType != 'Descriptive Answer' ) {
@@ -4352,13 +4388,13 @@ export async function questionListV1( req, res ) {
4352
4388
 
4353
4389
  getchecklist[0].questionAnswers[secIndex].questions[questionIndex].userAnswer[userAnsIndex].multiReferenceImage = userAns.multiReferenceImage;
4354
4390
  }
4355
- if ( question.answerType == 'multiplechoicemultiple' ) {
4391
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
4356
4392
  let ansIndex = Multianswer.findIndex( ( item ) => item.answer == userAns.answer );
4357
4393
  if ( ansIndex ) {
4358
4394
  Multianswer[ansIndex].validationAnswer = userAns.validationAnswer;
4359
4395
  }
4360
4396
  }
4361
- if ( question.answerType == 'multipleImage' ) {
4397
+ if ( question.answerType == 'multipleImage' || question.answerType == 'image/video' ) {
4362
4398
  if ( userAns && userAns.answer && userAns.answer !='' ) {
4363
4399
  let manswer = `${cdnurl.TraxAnswerCDN}${userAns.answer}`;
4364
4400
  Multianswer.push( { 'answer': manswer, 'no': userAnsIndex, 'validationAnswer': '' } );
@@ -4368,7 +4404,7 @@ export async function questionListV1( req, res ) {
4368
4404
  }
4369
4405
  }
4370
4406
  }
4371
- if ( question.answerType == 'multiplechoicemultiple' ) {
4407
+ if ( question.answerType == 'multiplechoicemultiple' || ( question.answerType == 'dropdown' && question.allowMultiple ) ) {
4372
4408
  Multianswer.forEach( ( item ) => {
4373
4409
  if ( item.validationAnswer == null ) {
4374
4410
  item.answer = null;
@@ -4380,7 +4416,7 @@ export async function questionListV1( req, res ) {
4380
4416
  question.Multianswer = Multianswer;
4381
4417
  }
4382
4418
  }
4383
- if ( question.answerType == 'multipleImage' ) {
4419
+ if ( question.answerType == 'multipleImage' || question.answerType == 'image/video' ) {
4384
4420
  if ( Multianswer.length ) {
4385
4421
  question.Multianswer = Multianswer;
4386
4422
  } else {
@@ -4429,6 +4465,11 @@ export async function questionListV1( req, res ) {
4429
4465
  }
4430
4466
  }
4431
4467
 
4468
+ let checklisDetails = await checklistService.findOne( { _id: getchecklist?.[0]?.sourceCheckList_id }, { export: 1 } );
4469
+ if ( checklisDetails ) {
4470
+ getchecklist[0]['export'] = checklisDetails.export;
4471
+ }
4472
+
4432
4473
  return res.sendSuccess( getchecklist );
4433
4474
  }
4434
4475
  } catch ( e ) {
@@ -4508,6 +4549,10 @@ export async function downloadChecklist( req, res ) {
4508
4549
  checklistDetails = await processedTask.findOne( { _id: requestData.checklistId, checklistStatus: 'submit' } );
4509
4550
  }
4510
4551
 
4552
+ if ( !checklistDetails ) {
4553
+ return res.sendError( 'No data found', 204 );
4554
+ }
4555
+
4511
4556
  let storeDetails = await storeService.findOne( { storeId: checklistDetails.store_id }, { storeProfile: 1 } );
4512
4557
  if ( !storeDetails ) {
4513
4558
  return res.sendError( 'No data found', 204 );
@@ -4521,31 +4566,29 @@ export async function downloadChecklist( req, res ) {
4521
4566
 
4522
4567
  checklistDetails = { ...checklistDetails.toObject(), ...storeDetails?.toObject()?.storeProfile };
4523
4568
 
4524
- console.log( checklistDetails );
4525
4569
 
4526
4570
  let scheduleDateTime = dayjs( checklistDetails.submitTime );
4527
4571
  checklistDetails.submitDate = scheduleDateTime.format( 'DD MMM, YYYY' );
4528
4572
  checklistDetails.submitTime = scheduleDateTime.format( 'hh:mm A' );
4529
- // if ( checklistDetails?.brandDetails?.brandLogo ) {
4530
- // let bucketpath = req.user.client_id + '/logo';
4531
-
4532
- // let params = {
4533
- // bucketName: JSON.parse( process.env.BUCKET )?.sop,
4534
- // filePath: `${bucketpath}/${checklistDetails?.brandDetails?.brandLogo}`,
4535
- // };
4536
- // let url = await signedUrl( params.filePath, params.bucketName );
4537
-
4538
- // let brandImage = await convertUrltoBase64( url );
4539
- // if ( brandImage ) {
4540
- // checklistDetails.brandLogo = brandImage;
4541
- // }
4542
- // }
4543
- // checklistDetails.brandName = checklistDetails.brandDetails.brandName;
4573
+ if ( clientDetails?.profileDetails?.logo ) {
4574
+ let bucketpath = checklistDetails.client_id + '/logo';
4575
+
4576
+ let params = {
4577
+ Bucket: JSON.parse( process.env.BUCKET )?.assets,
4578
+ file_path: `${bucketpath}/${clientDetails?.profileDetails?.logo}`,
4579
+ };
4580
+ let url = await signedUrl( params );
4581
+ let brandImage = await convertUrltoBase64( url );
4582
+ if ( brandImage ) {
4583
+ checklistDetails['brandLogo'] = brandImage;
4584
+ }
4585
+ }
4586
+ checklistDetails['brandName'] = clientDetails?.clientName;
4544
4587
  for ( let section of checklistDetails.questionAnswers ) {
4545
4588
  for ( let question of section.questions ) {
4546
4589
  question.remarks = question.remarks == null || question.remarks == 'null' ? '' : question.remarks;
4547
4590
  for ( let answer of question.userAnswer ) {
4548
- if ( answer.referenceImage != '' ) {
4591
+ if ( answer?.referenceImage?.trim() ) {
4549
4592
  let inputData = {
4550
4593
  Bucket: JSON.parse( process.env.BUCKET )?.sop,
4551
4594
  file_path: answer.referenceImage,
@@ -4556,7 +4599,7 @@ export async function downloadChecklist( req, res ) {
4556
4599
  answer.referenceImage = base64Image;
4557
4600
  }
4558
4601
  }
4559
- if ( answer.validationType == 'Capture Image' && answer.validationAnswer != '' ) {
4602
+ if ( answer.validationType == 'Capture Image' && answer?.validationAnswer?.trim() ) {
4560
4603
  let inputData = {
4561
4604
  Bucket: JSON.parse( process.env.BUCKET )?.sop,
4562
4605
  file_path: answer.validationAnswer,
@@ -4567,7 +4610,7 @@ export async function downloadChecklist( req, res ) {
4567
4610
  answer.validationAnswer = base64Image;
4568
4611
  }
4569
4612
  }
4570
- if ( answer.answer != '' && [ 'image', 'descriptiveImage' ].includes( question.answerType ) ) {
4613
+ if ( answer?.answer?.trim() && [ 'image', 'descriptiveImage', 'multipleImage', 'image/video' ].includes( question.answerType ) ) {
4571
4614
  let inputData = {
4572
4615
  Bucket: JSON.parse( process.env.BUCKET )?.sop,
4573
4616
  file_path: answer.answer,
@@ -4093,7 +4093,7 @@ async function updateOpenSearch( user, data ) {
4093
4093
  export const aiChecklist = async ( req, res ) => {
4094
4094
  try {
4095
4095
  let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
4096
- let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ];
4096
+ let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ];
4097
4097
  let checklistDetails = [];
4098
4098
  let publishList = [];
4099
4099
  let unpublishList = [];
@@ -4106,7 +4106,7 @@ export const aiChecklist = async ( req, res ) => {
4106
4106
  checklistDetails = [ ...publishList, ...unpublishList ];
4107
4107
 
4108
4108
  checklistDetails.forEach( ( item ) => {
4109
- if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( item.checkListType ) ) {
4109
+ if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ].includes( item.checkListType ) ) {
4110
4110
  item.storeCount = storeDetails;
4111
4111
  }
4112
4112
  } );
@@ -0,0 +1,249 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+
6
+ <meta charset="utf-8">
7
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
8
+ <title>Trial Intiate Email</title>
9
+ <meta name="viewport" content="width=device-width, initial-scale=1">
10
+ <style type="text/css">
11
+ @media screen {
12
+ @font-face {
13
+ font-family: 'Inter';
14
+ font-style: normal;
15
+ font-weight: 400;
16
+ font-display: swap;
17
+ src: local("Inter"), local("Inter-Regular"), url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiI2B.woff2) format('woff2');
18
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
19
+ }
20
+ }
21
+
22
+ body {
23
+ font-family: "Inter", sans-serif !important;
24
+ }
25
+
26
+ body,
27
+ table,
28
+ td,
29
+ a {
30
+ -ms-text-size-adjust: 100%;
31
+ -webkit-text-size-adjust: 100%;
32
+ }
33
+
34
+ table,
35
+ td {
36
+ mso-table-rspace: 0pt;
37
+ mso-table-lspace: 0pt;
38
+ }
39
+
40
+ img {
41
+ -ms-interpolation-mode: bicubic;
42
+ }
43
+
44
+ a[x-apple-data-detectors] {
45
+ font-family: "inherit" !important;
46
+ font-size: inherit !important;
47
+ font-weight: inherit !important;
48
+ line-height: inherit !important;
49
+ color: inherit !important;
50
+ text-decoration: none !important;
51
+ }
52
+
53
+
54
+ div[style*="margin: 16px 0;"
55
+
56
+ ] {
57
+ margin: 0 !important;
58
+ }
59
+
60
+ body {
61
+ width: 100% !important;
62
+ height: 100% !important;
63
+ padding: 0 !important;
64
+ margin: 0 !important;
65
+ }
66
+
67
+
68
+ table {
69
+ border-collapse: collapse !important;
70
+ }
71
+
72
+ a {
73
+ color: #1a82e2;
74
+ }
75
+
76
+ img {
77
+ height: auto;
78
+ line-height: 100%;
79
+ text-decoration: none;
80
+ border: 0;
81
+ outline: none;
82
+ }
83
+
84
+ .flagText {
85
+ /* font-family: 'Inter'; */
86
+ /* color: #667085 !important; */
87
+ font-size: 16px;
88
+ font-weight: 600;
89
+ line-height: 24px;
90
+ text-align: left;
91
+
92
+ }
93
+ </style>
94
+
95
+ </head>
96
+
97
+ <body style="background-color: #dbe5ea;">
98
+
99
+ <div class="preheader"
100
+ style="display: none; max-width: 0; max-height: 0; overflow: hidden; font-size: 1px; line-height: 1px; color: #fff; opacity: 0;">
101
+ Email Summary (Hidden)
102
+ </div>
103
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-left:10px;padding-right:10px">
104
+ <tr>
105
+ <td bgcolor="#dbe5ea" style="padding:32px 10px 0 10px">
106
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 680px;" align="center">
107
+ <tr>
108
+ <td class="o_bg-white o_px-md o_py-md o_sans o_text"
109
+ style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 24px;background-color: #ffffff;padding-left: 18px;padding-right: 24px;padding-top: 24px;padding-bottom: 24px;">
110
+ <p style="margin-top: 0px;margin-bottom: 0px;"><a class="o_text-white"
111
+ href="https://tangoeye.ai/"
112
+ style="text-decoration: none;outline: none;color: #ffffff;"><img
113
+ src="https://devtangoretail-api.tangoeye.ai/logo.png" width="200" height="100"
114
+ alt="SimpleApp"
115
+ style="-ms-interpolation-mode: bicubic;vertical-align: middle;border: 0;line-height: 100%;height: auto;outline: none;text-decoration: none;"></a>
116
+ </p>
117
+ </td>
118
+ </tr>
119
+ <tr>
120
+ <td align="left" bgcolor="#ffffff"
121
+ style="padding-left: 30px;padding-right: 24px; font-size: 14px; line-height: 24px;">
122
+ <p class="o_heading o_mb-xxs"
123
+ style="width: 624px;height: 0px;border: 1px solid #CBD5E1;flex: none;order: 1;flex-grow: 0;">
124
+ </p>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
129
+ style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom: 10px;">
130
+ <div class="o_col-6s o_sans o_text-md o_text-light o_center"
131
+ style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 28px;color: #82899a;">
132
+ <span class="o_heading o_text-dark o_mb-xxs"
133
+ style="font-weight: 400;margin-top: 0px;margin-bottom: 4px;color: #121A26;line-height: 140%;">
134
+ Hi,<br />
135
+ Flag has been detected based on the response submitted in a recently completed
136
+ checklist for Store {{data.storeName}}. Review
137
+ the flagged item and take the necessary action from the dashboard.
138
+ </span>
139
+ </div>
140
+ </td>
141
+ </tr>
142
+ <tr>
143
+ <td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
144
+ style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom: 10px;">
145
+ <div class="o_col-6s o_sans o_text-md o_text-light o_center"
146
+ style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 28px;color: #82899a;">
147
+ <span class="o_heading o_text-dark o_mb-xxs"
148
+ style="font-weight: 400;margin-top: 0px;margin-bottom: 4px;color: #121A26;line-height: 140%;">
149
+ Details of the checklist are as follows:
150
+ </span>
151
+ </div>
152
+ </td>
153
+ </tr>
154
+ </table>
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
159
+ <table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%"
160
+ style="max-width: 680px;">
161
+ <tr bgcolor="#ffffff" style="border:none;margin-top:0px;">
162
+ <td class="flagText" style="padding-left:30px; line-height: 24px;color:#000000">Store Name :
163
+ </td>
164
+ <td></td>
165
+ <td></td>
166
+ <td class="flagText">{{data.storeName}}</td>
167
+ </tr>
168
+ <tr bgcolor="#ffffff" style="border:none;margin-top:0px;">
169
+ <td class="flagText" style="padding-left:30px; line-height: 24px;">Checklist Name :</td>
170
+ <td></td>
171
+ <td></td>
172
+ <td class="flagText">{{data.checklistName}}%</td>
173
+ </tr>
174
+
175
+ <tr bgcolor="#ffffff" style="border:none;margin-top:0px;">
176
+ <td class="flagText" style="padding-left:30px; line-height: 24px;">No of Flags :</td>
177
+ <td></td>
178
+ <td></td>
179
+ <td class="flagText">{{data.flagCount}}</td>
180
+ </tr>
181
+ <tr bgcolor="#ffffff" style="border:none;margin-top:0px;">
182
+ <td class="flagText" style="padding-left:30px; line-height: 24px;">Submitted By :</td>
183
+ <td></td>
184
+ <td></td>
185
+ <td class="flagText">{{data.submittedBy}}</td>
186
+ </tr>
187
+ <tr bgcolor="#ffffff" style="border:none;margin-top:0px;">
188
+ <td class="flagText" style="padding-left:30px; line-height: 24px;">Date & Time :</td>
189
+ <td></td>
190
+ <td></td>
191
+ <td class="flagText">{{data.time}}</td>
192
+ </tr>
193
+ </table>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
198
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 680px;">
199
+ <tr>
200
+ <td bgcolor="#ffffff" style="padding: 20px;padding-top:15px;padding-left:30px;">
201
+ <table border="0" cellpadding="0" cellspacing="0">
202
+ <tr>
203
+ <td align="center" bgcolor="#00A3FF" style="border-radius: 6px;height:50px;">
204
+ <a href="{{data.domain}}" target="_blank"
205
+ style="display: inline-block; padding: 16px 36px; font-size: 16px; color: #ffffff; text-decoration: none; border-radius: 6px;">View
206
+ Flags
207
+ </a>
208
+ </td>
209
+ </tr>
210
+ </table>
211
+ </td>
212
+ </tr>
213
+ </table>
214
+ </td>
215
+ </tr>
216
+ <tr>
217
+ <td align="center" bgcolor="#dbe5ea" style="padding:0 10px 32px 10px;">
218
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 680px;">
219
+ <tr>
220
+ <td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
221
+ style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-top:5px">
222
+ <div class="o_col-6s o_sans o_text-md o_text-light o_center"
223
+ style="margin-top: 0px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
224
+ <p>
225
+ If you have any questions or need assistance, please reach out to us at
226
+ support@tangotech.co.in.
227
+ </p>
228
+ </div>
229
+ </td>
230
+ </tr>
231
+ <tr>
232
+ <td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
233
+ style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom:15px">
234
+ <div class="o_col-6s o_sans o_text-md o_text-light o_center"
235
+ style="margin-top: 0px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
236
+ <p>
237
+ © Tango Eye. All rights reserved.</p>
238
+ </div>
239
+ </td>
240
+ </tr>
241
+ </table>
242
+ </td>
243
+ </tr>
244
+
245
+ </table>
246
+
247
+ </body>
248
+
249
+ </html>
@@ -204,18 +204,20 @@
204
204
  {{#neq ../answerType 'video'}}
205
205
  {{#neq ../answerType 'image'}}
206
206
  {{#neq ../answerType 'descriptiveImage'}}
207
- {{#eq sopFlag true }}
208
- <span id="agreed" style="color:red">{{answer}}</span><br>
209
- {{/eq}}
210
- {{#eq sopFlag false }}
211
- <span id="agreed">{{answer}}</span><br>
212
- {{/eq}}
213
- {{#neq validationAnswer ''}}
214
- {{#eq validationType 'Capture Image'}}
215
- <img src = "{{validationAnswer}}" alt="test" width="200" height="180">
207
+ {{#neq ../answerType 'multipleImage'}}
208
+ {{#eq sopFlag true }}
209
+ <span id="agreed" style="color:red">{{answer}}</span><br>
216
210
  {{/eq}}
217
- {{#neq validationType 'Capture Image'}}
218
- {{validationAnswer}}
211
+ {{#eq sopFlag false }}
212
+ <span id="agreed">{{answer}}</span><br>
213
+ {{/eq}}
214
+ {{#neq validationAnswer ''}}
215
+ {{#eq validationType 'Capture Image'}}
216
+ <img src = "{{validationAnswer}}" alt="test" width="200" height="180">
217
+ {{/eq}}
218
+ {{#neq validationType 'Capture Image'}}
219
+ {{validationAnswer}}
220
+ {{/neq}}
219
221
  {{/neq}}
220
222
  {{/neq}}
221
223
  {{/neq}}
@@ -245,6 +247,46 @@
245
247
  </table>
246
248
  {{!-- {{/each}} --}}
247
249
  {{/eq}}
250
+ {{#eq ../answerType 'multipleImage'}}
251
+ {{!-- {{#each ../answers}} --}}
252
+ <table style="width:100%">
253
+ <tr>
254
+ {{#neq referenceImage ''}}
255
+ <td style="width:50%">
256
+ <div class="Reference"><span>Reference Image</span><br>
257
+ <img src="{{referenceImage}}" width="200" height="180" />
258
+ </div>
259
+ </td>
260
+ {{/neq}}
261
+ <td style="width:50%">
262
+ <div class="Reference"><span>Uploaded Image</span><br>
263
+ <img src="{{answer}}" width="200" height="180" />
264
+ </div>
265
+ </td>
266
+ </tr>
267
+ </table>
268
+ {{!-- {{/each}} --}}
269
+ {{/eq}}
270
+ {{#eq ../answerType 'image/video'}}
271
+ {{!-- {{#each ../answers}} --}}
272
+ <table style="width:100%">
273
+ <tr>
274
+ {{#neq referenceImage ''}}
275
+ <td style="width:50%">
276
+ <div class="Reference"><span>Reference Image</span><br>
277
+ <img src="{{referenceImage}}" width="200" height="180" />
278
+ </div>
279
+ </td>
280
+ {{/neq}}
281
+ <td style="width:50%">
282
+ <div class="Reference"><span>Uploaded Image</span><br>
283
+ <img src="{{answer}}" width="200" height="180" />
284
+ </div>
285
+ </td>
286
+ </tr>
287
+ </table>
288
+ {{!-- {{/each}} --}}
289
+ {{/eq}}
248
290
  {{#eq ../answerType 'descriptiveImage'}}
249
291
  {{!-- {{#each ../answers}} --}}
250
292
  <table style="width:100%">