tango-app-api-trax 3.7.72 → 3.7.74

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.72",
3
+ "version": "3.7.74",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2182,7 +2182,7 @@ export async function submitChecklist( req, res ) {
2182
2182
  flagCount: updateData.questionFlag,
2183
2183
  checklistName: getchecklist[0].checkListName,
2184
2184
  submittedBy: getchecklist[0].userName,
2185
- time: updateData.submitMobileTime,
2185
+ time: updateData.submitTime_string,
2186
2186
  domain: `${JSON.parse( process.env.URL ).domain}/manage/trax/flags`,
2187
2187
  };
2188
2188
  const fileContent = fs.readFileSync( path.resolve( path.dirname( '' ) ) + '/src/hbs/flag.hbs', 'utf8' );
@@ -2451,8 +2451,9 @@ export async function submiteyeTestTask( req, res ) {
2451
2451
  if ( findQrExists ) {
2452
2452
  return res.sendError( 'Qr code already Exists', 400 );
2453
2453
  }
2454
-
2455
- await cameraService.updateOne( { streamName: streamId }, { qrCode: qrCode, isEyeTestStream: true } );
2454
+ let findCamera = await cameraService.findOne( { streamName: streamId } );
2455
+ await storeService.updateOne({storeId:findCamera.storeId},{"edge.isSocketEnable":true})
2456
+ await cameraService.updateOne( { streamName: streamId }, { qrCode: qrCode, isEyeTestStream: true, } );
2456
2457
  return res.sendSuccess( 'Qr code added successfully' );
2457
2458
 
2458
2459
  const findQuery = [
@@ -3826,6 +3827,7 @@ export async function taskQuestionList( req, res ) {
3826
3827
  } else {
3827
3828
  logger.info( `v5 => Task Continue => store Name: ${getchecklist[0].storeName}, User Email: ${getchecklist[0].userEmail}, Task Name: ${getchecklist[0].checkListName}` );
3828
3829
  let bucket = JSON.parse( process.env.BUCKET );
3830
+ let cdnurl = JSON.parse( process.env.CDNURL );
3829
3831
  for ( let [ secIndex, section ] of getchecklist[0].questionAnswers.entries() ) {
3830
3832
  for ( let [ questionIndex, question ] of section.questions.entries() ) {
3831
3833
  let Multianswer = [];
@@ -3910,7 +3912,7 @@ export async function taskQuestionList( req, res ) {
3910
3912
  }
3911
3913
  if ( question.answerType == 'multipleImage' || question.answerType == 'image/video' ) {
3912
3914
  if ( userAns && userAns.answer && userAns.answer != '' ) {
3913
- let manswer = await signedUrl( { file_path: decodeURIComponent( userAns.answer ), Bucket: bucket.sop } );
3915
+ let manswer = `${cdnurl.TraxAnswerCDN}${userAns.answer}`;
3914
3916
  Multianswer.push( { 'answer': manswer, 'no': userAnsIndex, 'validationAnswer': '', ...( question.answerType == 'image/video' && { answerType: userAns?.answerType } ) } );
3915
3917
  } else {
3916
3918
 
@@ -4021,8 +4023,9 @@ export async function uploadAnswerImage( req, res ) {
4021
4023
  if ( req.files && req.files.answerImage ) {
4022
4024
  let imageUrl;
4023
4025
  let filePath = `${folder}/${req.user.clientId}/${date}/${input.checklistId}/${input.sectionName.replace( ' ', '' )}/${input.questionNo}/`;
4026
+ const ext = path.extname( req.files.answerImage.name ).slice( 1 );
4024
4027
  let params = {
4025
- fileName: `${Date.now()}-${Math.floor( 1000 + Math.random() * 9000 )}.${req.files.answerImage.name.split( '.' )[1]}`,
4028
+ fileName: `${Date.now()}-${Math.floor( 1000 + Math.random() * 9000 )}.${ext}`,
4026
4029
  Key: filePath,
4027
4030
  Bucket: bucket.sop,
4028
4031
  body: req.files.answerImage.data,
@@ -4,6 +4,10 @@
4
4
  <head>
5
5
  <title>{{data.checkListName}}</title>
6
6
  <style type="text/css">
7
+
8
+ body {
9
+ font-family: Inter !important;
10
+ }
7
11
  .pdffile {
8
12
  position: relative;
9
13
  font-family: Inter !important;
@@ -209,7 +213,7 @@
209
213
  {{#eq sopFlag false }}
210
214
  <span id="agreed">{{answer}}</span><br>
211
215
  {{/eq}}
212
- {{#neq validationAnswer ''}}
216
+ {{#eq validation true}}
213
217
  {{#eq validationType 'Capture Image'}}
214
218
  <img src = "{{validationAnswer}}" alt="test" width="200" height="180">
215
219
  {{/eq}}
@@ -219,7 +223,7 @@
219
223
  {{#eq validationType 'Descriptive Answer'}}
220
224
  {{validationAnswer}}
221
225
  {{/eq}}
222
- {{/neq}}
226
+ {{/eq}}
223
227
  {{/if}}
224
228
  {{#eq ../answerType 'video'}}
225
229
  <a href="{{answer}}" target="_blank" style="text-decoration: underline;color:#0085D2"