@medicus.ai/medicus-report-pdf-generator 1.0.192 → 1.0.195

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.
@@ -0,0 +1,82 @@
1
+ .header-info {
2
+ padding-right: 20px;
3
+ }
4
+
5
+ .container {
6
+ padding-right: 0;
7
+ padding-left: 50px;
8
+ }
9
+
10
+ .section-title {
11
+ padding-right: 12px;
12
+ padding-top: 25px;
13
+ }
14
+
15
+ .side-chart-container {
16
+ direction: ltr;
17
+ }
18
+
19
+ .relations-section {
20
+ display: flex;
21
+ }
22
+
23
+ .element-side-container {
24
+ display: flex;
25
+ flex-direction: row-reverse;
26
+ }
27
+
28
+ .other .container .side-chart-container table {
29
+ direction: ltr;
30
+ }
31
+
32
+ .other .container .side-chart-container table .bar-chart {
33
+ float: right;
34
+ border-radius: 20px 0 0 20px;
35
+ text-align: left;
36
+ }
37
+
38
+ .other .container .side-chart-container table td.bar-title {
39
+ border-left: 1px solid;
40
+ border-right: 0;
41
+ padding-right: 85px;
42
+ }
43
+
44
+ .other .side-chart.side-chart-with-border table tr td:last-child {
45
+ width: 30%;
46
+ }
47
+
48
+ table.data-by-gender tr th:first-child {
49
+ width: 0%;
50
+ }
51
+
52
+ table.data-by-gender th {
53
+ text-align: right;
54
+ }
55
+
56
+ td {
57
+ text-align: right;
58
+ }
59
+
60
+ .bottom-section {
61
+ display: flex;
62
+ }
63
+
64
+ .recommends-section {
65
+ border-radius: 20px 0 0 20px;
66
+ transform: skewY(-3deg);
67
+ padding-bottom: 3%;
68
+ }
69
+
70
+ .recommends-section-content {
71
+ transform: skewY(2deg);
72
+ margin-right: 25px;
73
+ }
74
+
75
+ .sources-section {
76
+ margin-right: 70px
77
+ }
78
+
79
+ .single-section {
80
+ padding-left: 0;
81
+ padding-right: 50px;
82
+ }
@@ -3176,7 +3176,7 @@ div[key="healthRisk"] .score-list {
3176
3176
  width: 100%;
3177
3177
  float: left;
3178
3178
  clear: both;
3179
- margin-top: 20px;
3179
+ margin-top: 15px;
3180
3180
  }
3181
3181
 
3182
3182
  .disclaimer-text {
@@ -497,14 +497,21 @@ ul li::before {
497
497
  padding-left: 2rem;
498
498
  }
499
499
 
500
+ .meter-needle.ui.image {
501
+ left: 4px;
502
+ }
503
+
500
504
  .needle-container {
501
505
  margin-left: 15px;
502
506
  margin-right: auto
503
507
  }
504
508
 
505
509
  .needle-container.loading_Meter1 {
506
- margin-right: 0;
507
- margin-left: 26px;
510
+ margin-right: 37px;
511
+ }
512
+
513
+ .needle-container.loading_Meter2 {
514
+ margin-right: 26px;
508
515
  }
509
516
 
510
517
  .content {
@@ -612,7 +619,7 @@ h5.recommended-tips-title {
612
619
 
613
620
  .physical-score-section .speedometer-value {
614
621
  right: auto;
615
- left: 14px;
622
+ left: 20px;
616
623
  }
617
624
 
618
625
  .physical-score-section .score-header {
@@ -90,12 +90,17 @@ let generateHTMLCorporateReport = async (data, isDebugging) => {
90
90
  if (!data.language) {
91
91
  localeService.setLocale("en")
92
92
  }
93
- else {
94
- localeService.setLocale(data.language);
95
- debugLog("pdf language:", data.language);
93
+ else {
94
+ if (data.language.indexOf('ar') !== -1) {
95
+ data.language = 'ar-SA';
96
+ isRTL = true;
96
97
  }
98
+ localeService.setLocale(data.language);
99
+ debugLog("pdf language:", data.language);
100
+ }
97
101
  /*choose the right template*/
98
- let html = fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/ltr_no_pages.html'), 'utf8');
102
+ let html = !isRTL ? fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/ltr_no_pages.html'), 'utf8') :
103
+ fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/rtl_no_pages.html'), 'utf8')
99
104
 
100
105
  let coverPageTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/cover_page.html'), 'utf8');
101
106
  let participantAnalyticsTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/participant_analytics.html'), 'utf8');
@@ -163,7 +168,7 @@ let generateHTMLCorporateReport = async (data, isDebugging) => {
163
168
  $("#" + pageId + " .element-summary-text").remove()
164
169
  }
165
170
  if (!empty(element.chartValues)) {
166
- $(renderBarChart(element.chartValues)).insertBefore("#" + pageId + " .relations-section-container");
171
+ $(renderBarChart(element.chartValues)).insertAfter("#" + pageId + " .element-summary-container");
167
172
  }
168
173
  if (!empty(element.secondChartValues)) {
169
174
  $(renderBarChart(element.secondChartValues)).insertAfter("#" + pageId + " .side-chart-container");
@@ -1,122 +1,130 @@
1
- {
2
- "yearsOld": {
3
- "message": "years old",
4
- "description": "After the patient old in the header"
5
- },
6
- "lifeStyle": {
7
- "message": "Lifestyle",
8
- "description": "my lifestyle part header"
9
- },
10
- "body": {
11
- "message": "Body",
12
- "description": "my body part header"
13
- },
14
- "mind": {
15
- "message": "Mind",
16
- "description": "my mind part header"
17
- },
18
- "psychological": {
19
- "message": "Psychological",
20
- "description": "Psychological title"
21
- },
22
- "physical": {
23
- "message": "Physical",
24
- "description": "Physical title"
25
- },
26
- "weRecommend": {
27
- "message": "We recommend",
28
- "description": "tips section title"
29
- },
30
- "wellbeingReport": {
31
- "message": "Wellbeing Report",
32
- "description": "Report header"
33
- },
34
- "scoresNote": {
35
- "message": "The higher the score, the healthier you are",
36
- "description": "scores note"
37
- },
38
- "reportHeaderDescription": {
39
- "message": " Your wellbeing score is within sight of a medal, and your lifestyle habits are holding you back. We can help you move up the rankings.",
40
- "description": "Text showing in the report header"
41
- },
42
- "sincerely": {
43
- "message": "Sincerely",
44
- "description": "part of message showing in email template preview in general configuration page"
45
- },
46
- "hospital": {
47
- "message": "HOSPITAL",
48
- "description": "name of field showing at add user"
49
- },
50
- "healthRisk": {
51
- "message": "Health risks",
52
- "description": "part header"
53
- },
54
- "Disclaimer": {
55
- "message": "Disclaimer:",
56
- "description": "Label showing in the footer as disclaimer title"
57
- },
58
- "Disclaimer Text": {
59
- "message": "This report, which was prepared just for you, charts your progress by comparing your current and\n past health behaviors. This information will help you stay on your path to good health. This guide is not meant\n to take the place of a physician visit nor can it diagnose illness or medical problems. It is designed to give\n you information relating to your health risks and overall wellness. This information is provided to help you\n develop a plan of action to make healthy lifestyle changes.:",
60
- "description": "text showing in the footer as disclaimer"
61
- },
62
- "January": {
63
- "message": "January",
64
- "description": "Month name"
65
- },
66
- "February": {
67
- "message": "February",
68
- "description": "Month name"
69
- },
70
- "March": {
71
- "message": "March",
72
- "description": "Month name"
73
- },
74
- "April": {
75
- "message": "April",
76
- "description": "Month name"
77
- },
78
- "May": {
79
- "message": "May",
80
- "description": "Month name"
81
- },
82
- "June": {
83
- "message": "June",
84
- "description": "Month name"
85
- },
86
- "July": {
87
- "message": "July",
88
- "description": "Month name"
89
- },
90
- "August": {
91
- "message": "August",
92
- "description": "Month name"
93
- },
94
- "September": {
95
- "message": "September",
96
- "description": "Month name"
97
- },
98
- "October": {
99
- "message": "October",
100
- "description": "Month name"
101
- },
102
- "November": {
103
- "message": "November",
104
- "description": "Month name"
105
- },
106
- "December": {
107
- "message": "December",
108
- "description": "Month name"
109
- },
110
- "Moxie recommends...": {
111
- "message": "Moxie recommends...",
112
- "description": "Title in corporate report"
113
- },
114
- "Copyright": {
115
- "message": "© Copyright NASCO Insurance 2020",
116
- "description": "Copyright text in corporate report"
117
- },
118
- "Participant Analytics": {
119
- "message": "Participant Analytics",
120
- "description": "Section title in corporate report"
121
- }
1
+ {
2
+ "yearsOld": {
3
+ "message": "سنة",
4
+ "description": "After the patient old in the header"
5
+ },
6
+ "lifeStyle": {
7
+ "message": "نمط الحياة",
8
+ "description": "my lifestyle part header"
9
+ },
10
+ "body": {
11
+ "message": "الصحة الجسدية",
12
+ "description": "my body part header"
13
+ },
14
+ "mind": {
15
+ "message": "الصحة الذهنية",
16
+ "description": "my mind part header"
17
+ },
18
+ "psychological": {
19
+ "message": "معدل الصحة النفسية",
20
+ "description": "Psychological title"
21
+ },
22
+ "physical": {
23
+ "message": "معدل الصحة الجسدية",
24
+ "description": "Physical title"
25
+ },
26
+ "weRecommend": {
27
+ "message": "توصياتنا",
28
+ "description": "tips section title"
29
+ },
30
+ "wellbeingReport": {
31
+ "message": "تقرير الصحة العامة",
32
+ "description": "Report header"
33
+ },
34
+ "scoresNote": {
35
+ "message": "كلما زاد مجموع النقاط، كان هذا دليل على صحة أفضل",
36
+ "description": "scores note"
37
+ },
38
+ "reportHeaderDescription": {
39
+ "message": "أنت على بعد خطوات قليلة من تحقيق نتيجة ممتازة للصحة العامة، لكن عاداتك اليومية ونمط حياتك يعيقان تقدمك. يمكننا مساعدتك في تحقيق هذا التقدم والوصول إلى نتائج أفضل.",
40
+ "description": "Text showing in the report header"
41
+ },
42
+ "sincerely": {
43
+ "message": "مع خالص التقدير",
44
+ "description": "part of message showing in email template preview in general configuration page"
45
+ },
46
+ "hospital": {
47
+ "message": "المشفى",
48
+ "description": "name of field showing at add user"
49
+ },
50
+ "healthRisk": {
51
+ "message": "المخاطر الصحية",
52
+ "description": "part header"
53
+ },
54
+ "Disclaimer": {
55
+ "message": "توضيح:",
56
+ "description": "Label showing in the footer as disclaimer title"
57
+ },
58
+ "Disclaimer Text": {
59
+ "message": "يوضح هذا التقرير الذي تم إعداده من أجلك فقط مدى تقدمك من خلال مقارنة عاداتك الصحية الحالية والسابقة. ستساعدك هذه المعلومات في البقاء على الطريق نحو صحة جيدة. هذا الدليل لا يحل محل زيارة الطبيب ولا يمكنه تشخيص المرض أو المشاكل الطبية. إنه مصمم لتزويدك بمعلومات تتعلق بالمخاطر الصحية وصحتك العامة. يتم توفير هذه المعلومات لمساعدتك في وضع خطة عمل لإجراء تغييرات صحية في نمط الحياة.",
60
+ "description": "text showing in the footer as disclaimer"
61
+ },
62
+ "January": {
63
+ "message": "يناير",
64
+ "description": "Month name"
65
+ },
66
+ "February": {
67
+ "message": "فبراير",
68
+ "description": "Month name"
69
+ },
70
+ "March": {
71
+ "message": "مارس",
72
+ "description": "Month name"
73
+ },
74
+ "April": {
75
+ "message": "أبريل",
76
+ "description": "Month name"
77
+ },
78
+ "May": {
79
+ "message": "مايو",
80
+ "description": "Month name"
81
+ },
82
+ "June": {
83
+ "message": "يونيو",
84
+ "description": "Month name"
85
+ },
86
+ "July": {
87
+ "message": "يوليو",
88
+ "description": "Month name"
89
+ },
90
+ "August": {
91
+ "message": "أغسطس",
92
+ "description": "Month name"
93
+ },
94
+ "September": {
95
+ "message": "سبتمبر",
96
+ "description": "Month name"
97
+ },
98
+ "October": {
99
+ "message": "أكتوبر",
100
+ "description": "Month name"
101
+ },
102
+ "November": {
103
+ "message": "نوفمبر",
104
+ "description": "Month name"
105
+ },
106
+ "December": {
107
+ "message": "ديسمبر",
108
+ "description": "Month name"
109
+ },
110
+ "recommends...": {
111
+ "message": "توصيات",
112
+ "description": "Title in corporate report"
113
+ },
114
+ "Copyright": {
115
+ "message": "© Copyright NASCO Insurance 2020",
116
+ "description": "Copyright text in corporate report"
117
+ },
118
+ "Participant Analytics": {
119
+ "message": "تحليلات المشارك",
120
+ "description": "Section title in corporate report"
121
+ },
122
+ "Page": {
123
+ "message": "صفحة",
124
+ "description": "page number in the corporate report PDF"
125
+ },
126
+ "Sources": {
127
+ "message": "المصادر",
128
+ "descripition": "sources in the corporate report PDF"
129
+ }
122
130
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.0.192",
4
- "description": "Wellbeing report - latest update in 09/6/2022 -fix diagnostikare footer margin",
3
+ "version": "1.0.195",
4
+ "description": "Wellbeing corporate report - latest update in 28/6/2022 -Implement RTL",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "start": "node index.js"
@@ -1,9 +1,11 @@
1
1
  <div class="single-section other page" id="{{pageId}}">
2
2
  <div class="section-title">{{pageTitle}}</div>
3
3
  <div class="container">
4
- <div class='element-summary-container'>
5
- <div class='element-summary-text'></div>
6
- <div class='summary-bg'></div>
4
+ <div class="element-side-container">
5
+ <div class='element-summary-container'>
6
+ <div class='element-summary-text'></div>
7
+ <div class='summary-bg'></div>
8
+ </div>
7
9
  </div>
8
10
  <div class="relations-section-container">
9
11
  <div class="relations-section relations-section-titles"></div>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html dir="rtl" lang="ar">
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
5
+ <title>TEMPLATE</title>
6
+ <link rel="stylesheet" href="../assets/corporate_report/css/report.css" type="text/css">
7
+ <link rel="stylesheet" href="../assets/corporate_report/css/report_rtl.css" type="text/css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap" rel="stylesheet">
9
+ <script>
10
+ var IS_ARABIC = true;
11
+ </script>
12
+
13
+ </head>
14
+ <body>
15
+ <div id="content" class="content">
16
+ </div>
17
+ <!-- JS ------------------------------------>
18
+ <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
19
+ <script type="text/javascript" src="../assets/corporate_report/js/js.js"></script>
20
+ </body>
21
+ </html>