@medicus.ai/medicus-report-pdf-generator 1.0.283 → 1.0.285

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.
@@ -3428,4 +3428,11 @@ div[key="mind"] .score-details-title {
3428
3428
  .score-main {
3429
3429
  width: 100%;
3430
3430
  float: left;
3431
+ }
3432
+ .es .insight-container.insight-container-with-img .tips-text,
3433
+ .es .insight-container.insight-container-without-img .tips-text{
3434
+ font-size:9px
3435
+ }
3436
+ .es .disclaimer-text{
3437
+ font-size:7px
3431
3438
  }
@@ -147,7 +147,7 @@ let generateHTMLWellbeingReport = async (data, isDebugging, clientName, language
147
147
  let firstSectionTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/wellbeing/blocks/first-section.html'), 'utf8');
148
148
 
149
149
  let tipsTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/wellbeing/blocks/tips.html'), 'utf8');
150
- console.log("tipsTemplate", tipsTemplate)
150
+
151
151
  /*create the dom element*/
152
152
  const dom = new JSDOM(html);
153
153
  let historyData = [];
@@ -292,6 +292,7 @@ let generateHTMLWellbeingReport = async (data, isDebugging, clientName, language
292
292
  $(".first-section-scores .physical-score-section .part-1,.first-section-scores .physical-score-section .part-2").addClass('inactive')
293
293
  }
294
294
  $(".score-main").addClass(client);
295
+ $(".score-main").addClass(language);
295
296
  /* Second section*/
296
297
  let partScores = data.partsScore;
297
298
  let allScores = {'lifeStyle': [], 'body': [], 'mind': [], healthRisk: []}
@@ -349,20 +350,23 @@ let generateHTMLWellbeingReport = async (data, isDebugging, clientName, language
349
350
  let mindTips = []
350
351
  let bodyTips = []
351
352
  let i = 0;
352
- tips.map((key, index) => {
353
- if (key.partId === 1 || key.partId === 2 || key.partId === 3) {
354
- if (key.partId === 1) {
355
- key.type = 'lifeStyleInsights'
356
- lifeStyleTips.push(key)
357
- }
358
- if (key.partId === 2) {
359
- key.type = 'bodyInsights'
360
- bodyTips.push(key)
361
- }
362
- if (key.partId === 3) {
363
- key.type = 'mindInsights'
364
- mindTips.push(key)
365
- }
353
+ Object.entries(partScores).map(([key, value], index) => {
354
+ if (key === 'bodyInsights' || key === 'lifeStyleInsights' || key === 'mindInsights') {
355
+ partScores[key]['tips'].map((tip, index) => {
356
+ if (key === 'lifeStyleInsights') {
357
+ tip.type = 'lifeStyleInsights'
358
+ lifeStyleTips.push(tip)
359
+ }
360
+ if (key === 'bodyInsights') {
361
+ tip.type = 'bodyInsights'
362
+ bodyTips.push(tip)
363
+ }
364
+ if (key === 'mindInsights') {
365
+ tip.type = 'mindInsights'
366
+ mindTips.push(tip)
367
+ }
368
+ i++;
369
+ })
366
370
  }
367
371
  });
368
372
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.0.283",
3
+ "version": "1.0.285",
4
4
  "description": "Nasco corporate report - latest update in 24/4/2023 - Fix translation for SanusX PDF",
5
5
  "main": "index.js",
6
6
  "scripts": {