This commit is contained in:
2020-08-24 21:36:04 +00:00
parent 251101627d
commit ba0e8db4cc

View File

@@ -7,29 +7,7 @@ REPORTING
Useful links:
https://handlebarsjs.com/
Report templates pre-designed and open source: https://github.com/wildbit/postmark-templates
Assume headless chrome first for rendering, if it suffices then don't bother with other renderers unless it becomes necessary.
it's the most modern and probably supported long term way of doing the rendering and also easiest to grok for users since they develop in chrome should look the same or closest
TODO: Template engine / javascript test - Render a report off static data
Check how jsreport feeds javascript to their rendering process
https://github.com/jsreport/jsreport-core
https://github.com/jsreport/jsreport-core/blob/master/lib/render/engineScript.js
//actual render here
https://github.com/jsreport/jsreport-chrome-pdf/blob/d3fe318aac3628d8cb62f86f8f71314f21745798/lib/conversion.js
Design a simple report with static json data that exercises the template engine and javascript functions both shared and unique to the report
Excercise both handlebars and custom javascript and shared javascript
also css needs to be in there as well, just working, not necessarily correct or beautiful, just make sure it can work
Process:
handlebars compiles template
handlebars runs compiled template against data and generates HTML
Open HTML generated in headless and pdf it
return pdf
TODO: BASIC CAN REPORT OFF DATA WITH TEMPLATE ENGINE WORKING TESTS
@@ -49,6 +27,7 @@ Assume headless chrome first for rendering, if it suffices then don't bother wit
custom javascript functions
Shared javascript libs
Localization
handlebars helpers
Localized dates and currency
Bar codes
Mailing labels
@@ -82,6 +61,29 @@ CLIENT TODO HERE: Nothing at client until I get to here to save backtracking
----------- REPORTING NOTES ----------------------
Assume headless chrome first for rendering, if it suffices then don't bother with other renderers unless it becomes necessary.
it's the most modern and probably supported long term way of doing the rendering and also easiest to grok for users since they develop in chrome should look the same or closest
TODO: Template engine / javascript test - Render a report off static data
Check how jsreport feeds javascript to their rendering process
https://github.com/jsreport/jsreport-core
https://github.com/jsreport/jsreport-core/blob/master/lib/render/engineScript.js
//actual render here
https://github.com/jsreport/jsreport-chrome-pdf/blob/d3fe318aac3628d8cb62f86f8f71314f21745798/lib/conversion.js
Design a simple report with static json data that exercises the template engine and javascript functions both shared and unique to the report
Excercise both handlebars and custom javascript and shared javascript
also css needs to be in there as well, just working, not necessarily correct or beautiful, just make sure it can work
Process:
handlebars compiles template
handlebars runs compiled template against data and generates HTML
Open HTML generated in headless and pdf it
return pdf
CLIENT UI
At client maybe pick output format first then select report, so can pick HTML to just view immediately, can pick pdf to download or print, can pick csv to export etc