@measurequick/measurequick-report-generator 1.0.1 → 1.0.3

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.
@@ -1,4 +1,4 @@
1
- {
1
+ export const body = {
2
2
  "meta": {
3
3
  "reportName": "Test Report",
4
4
  "reportType": "cooling",
@@ -109,31 +109,30 @@ export const outdoorMeasurements = {
109
109
  }
110
110
  };
111
111
 
112
- export const performanceData = {
113
-
114
- Nominal: 3.0 Tons / 36,000 Btu/h
115
- Normalized: 2.9 Tons / 34,373 Btu/h
116
- Actual: 0.9 Tons / 11,391 Btu/h
117
- (33.1% Normalized)
118
- Sensible: 0.6 Tons / 7,480 Btu/h
119
- (82.3% Normalized)
120
- Latent: 0.3 Tons / 3,910 Btu/h
121
- (15.5% Normalized)
122
- Sensible Heat Ratio: 0.66
123
-
124
-
125
-
126
- Temp Split Target: 7.0°F
127
- Temp Split: 8.1°F
128
- Dehumidification: 3.6 lb/hr
129
- 0.4 gal/hr
130
- Energy Efficiency:
131
- Fan Efficacy: 1.16
132
- Total Power: 3,587
133
- EER: 3.2
134
- Approx. SEER: 3.5
135
- Sensible Efficiency: 82.3%
112
+ // Nominal: 3.0 Tons / 36,000 Btu/h
113
+ // Normalized: 2.9 Tons / 34,373 Btu/h
114
+ // Actual: 0.9 Tons / 11,391 Btu/h
115
+ // (33.1% Normalized)
116
+ // Sensible: 0.6 Tons / 7,480 Btu/h
117
+ // (82.3% Normalized)
118
+ // Latent: 0.3 Tons / 3,910 Btu/h
119
+ // (15.5% Normalized)
120
+ // Sensible Heat Ratio: 0.66
121
+ //
122
+ //
123
+ //
124
+ // Temp Split Target: 7.0°F
125
+ // Temp Split: 8.1°F
126
+ // Dehumidification: 3.6 lb/hr
127
+ // 0.4 gal/hr
128
+ // Energy Efficiency:
129
+ // Fan Efficacy: 1.16
130
+ // Total Power: 3,587
131
+ // EER: 3.2
132
+ // Approx. SEER: 3.5
133
+ // Sensible Efficiency: 82.3%
136
134
 
135
+ export const performanceData = {
137
136
  "pressure_evaporator": {
138
137
  "label": "Low Pressure",
139
138
  "units": ["PSIG", "°F"]
package/index.js CHANGED
@@ -1,13 +1,17 @@
1
1
 
2
2
  import * as graphics from "./assets/graphics.js";
3
3
  import * as templates from "./assets/templates.js";
4
- import * as request from "./assets/request.json";
4
+ import * as request from "./assets/request.js";
5
5
 
6
- var jsPDF = require("jspdf/dist/jspdf.node.min");
6
+ var jsPDF = require("jspdf");
7
7
  var doc = new jsPDF(templates.docOptions);
8
+ var reportData;
8
9
 
9
- export function getReport(reportData) {
10
+ export function getReport(data=null) {
10
11
  try {
12
+ if (data == null) reportData = JSON.parse(JSON.stringify(request.body));
13
+ else reportData = JSON.parse(JSON.stringify(data));
14
+
11
15
  printBoilerPlate(reportData.meta.reportTheme);
12
16
 
13
17
  var profilePicture = reportData.meta.profilePicturePlacement == "header" ? reportData.photos.profilePicture : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Generates PDF documents for various MeasureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {