LT-55: measurements report (jsPDF, html2canvas)
This commit is contained in:
1 parent
9f2d0add20
commit
c6a710aacd
8 files changed
+143
-71
No files matched your search
@@ -1 +1,3 @@
|
||||
import './templates';
|
||||
import './measurements/measurements.html';
|
||||
import './measurements/measurements.styl';
|
||||
import './measurements/measurements.js';
|
||||
@@ -0,0 +1,15 @@
|
||||
<template name="measurementsReport">
|
||||
<div id="measurementsReport" class="print">
|
||||
{{#each pages}}
|
||||
<div class="page" style="width:{{width}}pt; height:{{height}}pt;">
|
||||
<div class="pageNumber">{{@index}}</div>
|
||||
<div>{{patient.name}}</div>
|
||||
<div>
|
||||
{{#each item in items}}
|
||||
<div class="item">{{item}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,15 @@
|
||||
Template.measurementsReport.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
const data = Template.currentData();
|
||||
const onRendered = data.onRendered;
|
||||
|
||||
if (onRendered) {
|
||||
onRendered(instance);
|
||||
}
|
||||
});
|
||||
|
||||
Template.measurementsReport.helpers({
|
||||
getCanvasData(canvas) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
#measurementsReport
|
||||
background-color: #FFF;
|
||||
color: #000;
|
||||
font-size: 12pt;
|
||||
left: 0;
|
||||
min-width: 300pt;
|
||||
min-height: 150pt;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 10000;
|
||||
// transform: translate(-100%, -100%);
|
||||
|
||||
.page
|
||||
border: solid 1pt #F00;
|
||||
padding: 6pt;
|
||||
|
||||
.pageNumber
|
||||
float: right;
|
||||
|
||||
.item
|
||||
background-color: #EEE;
|
||||
color: #666;
|
||||
margin: 10pt 0;
|
||||
padding: 10pt;
|
||||
// page-break-before: auto;
|
||||
@@ -1 +0,0 @@
|
||||
import './measurements.html';
|
||||
@@ -1,7 +0,0 @@
|
||||
<template name="measurementsReport">
|
||||
<div>
|
||||
{{#each item in items}}
|
||||
<div style="background-color: #fff !important; color: #0A0; margin-bottom: 18pt; page-break-before: auto;">{{item}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user