@medicus.ai/medicus-report-pdf-generator 1.0.359 → 1.0.360

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/lib/template.js CHANGED
@@ -39,13 +39,13 @@ function renderHTMLTemplate(html, isRtl, data, isIMCLab, lang = 'en') {
39
39
 
40
40
  const fs = require('fs');
41
41
 
42
- fs.writeFile('example.txt',html, (err) => {
43
- if (err) {
44
- console.error('Error writing file:', err);
45
- } else {
46
- console.log('File written successfully!');
47
- }
48
- });
42
+ // fs.writeFile('example.txt',html, (err) => {
43
+ // if (err) {
44
+ // console.error('Error writing file:', err);
45
+ // } else {
46
+ // console.log('File written successfully!');
47
+ // }
48
+ // });
49
49
 
50
50
 
51
51
 
@@ -53,7 +53,7 @@ fs.writeFile('example.txt',html, (err) => {
53
53
  let content = `
54
54
  <div>
55
55
  <div id="page_template" class="all-pages ${IMCclass}">
56
-
56
+
57
57
  ${html}
58
58
  </div>
59
59
  </div>
@@ -449,9 +449,9 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
449
449
  disclaimer_text_color = defaultConfig['disclaimer-text-color']
450
450
  top_box_background = defaultConfig['top-box-background']
451
451
  footer_background = defaultConfig['footer-background']
452
- lifestyleImage = defaultConfig['lifestyle_icon'] ? defaultConfig['lifestyle_icon'] : path.resolve(__dirname + '/../assets/wellbeing/images/lifestyle-section.png')
453
- mindImage = defaultConfig['mind_icon'] ? defaultConfig['mind_icon'] : path.resolve(__dirname + '/../assets/wellbeing/images/mind-section.png')
454
- bodyImage = defaultConfig['body_icon'] ? defaultConfig['body_icon'] : path.resolve(__dirname + '/../assets/wellbeing/images/body-section.png')
452
+ lifestyleImage =path.resolve(__dirname + '/../assets/wellbeing/images/lifestyle-section.png')
453
+ mindImage = path.resolve(__dirname + '/../assets/wellbeing/images/mind-section.png')
454
+ bodyImage = path.resolve(__dirname + '/../assets/wellbeing/images/body-section.png')
455
455
  body_font_color = defaultConfig['body_font_color']
456
456
  list_icons_font_color = defaultConfig['list_icons_font_color']
457
457
  insights_font_color = defaultConfig['insights_font_color']
@@ -501,22 +501,11 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
501
501
  `;
502
502
  }
503
503
  }
504
-
505
504
  const $ = (require('jquery'))(dom.window);
506
-
507
-
508
505
  $('#content').append(headerTemplate);
509
-
510
-
511
506
  $('.report-info').html(headerData);
512
-
513
-
514
-
515
-
516
507
  let iconColor = !empty(bulb_icon_font_color) ? bulb_icon_font_color : general_font_color
517
508
  /*get the window from the dom to be used as a jquery function*/
518
-
519
-
520
509
  $('#content').append('<style>' +
521
510
  '.tips-text{color: ' + insights_font_color + ' !important;}' +
522
511
  '.first-level-font-color{color:' + general_font_color + ' !important;}' +
@@ -608,9 +597,7 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
608
597
  .replace("{{ScoreText}}",localeService.t('scoreText'))
609
598
  .replace("{{lowScoreText}}",localeService.t('lowScoreText'))
610
599
  .replace("{{PhysicalWellbeingText}}", localeService.t('PhysicalWellbeingText'))
611
- .replace("{{PsychologicalWellbeingText}}", localeService.t('PsychologicalWellbeingText'))
612
-
613
-
600
+ .replace("{{PsychologicalWellbeingText}}", localeService.t('PsychologicalWellbeingText'))
614
601
  .replace("{{psychologicalScore}}", Math.floor(wellbeingData.calculation.psychologicalScore))
615
602
  .replace("{{psychologicalScoreDecimalPart}}", parseFloat((wellbeingData.calculation.psychologicalScore)?.toFixed(1) % 1)?.toFixed(1).substring(1))
616
603
  .replace("{{psychologicalWord}}", localeService.t('psychological'))
@@ -620,8 +607,6 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
620
607
  .replace(/{{thirdLevelColor}}/g, third_level_color)
621
608
  .replace(/{{secondLevelColor}}/g, second_level_color)
622
609
  .replace(/{{forthLevelColor}}/g, forth_level_color)
623
-
624
-
625
610
  .replace(/{{firstLevelColor}}/g, client === 'nasco' ? second_level_color : first_level_color)
626
611
  .replace("{{psychologicalColor}}", psychologicalColor)
627
612
  .replace(/{{listIconsFontColor}}/g, list_icons_font_color);
@@ -1257,6 +1242,8 @@ let renderInsightTips = (tips,type) => {
1257
1242
  <div class="insight-wrapper">
1258
1243
  <div class="insight-header">
1259
1244
  <div class="insight-icon">
1245
+ <img src="${tipImage}" alt="${translatedTitle}" />
1246
+
1260
1247
  </div>
1261
1248
  <div class="insight-title">${translatedTitle}</div>
1262
1249
  </div>
@@ -1270,7 +1257,6 @@ let renderInsightTips = (tips,type) => {
1270
1257
  return tipsHtml;
1271
1258
  }
1272
1259
 
1273
- // <img src="${tipImage}" alt="${translatedTitle}" />
1274
1260
 
1275
1261
  else{
1276
1262
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.0.359",
3
+ "version": "1.0.360",
4
4
  "description": "Nasco corporate report - latest update in 12/10/2023 - Fix HRC for bionext",
5
5
  "main": "index.js",
6
6
  "scripts": {