Takes the sales plan the company gives you and converts it into a printable, scannable document that you can use to quickly order for the sales plan.
This app uses a bespoke static SPA builder that takes template.html and injects the source files into it.
The application logic. Parses the CSV, creating an object representing the data. It then wipes the main container and builds the order guide from that data. It’s all very hacky, but it didn’t make much sense to pull in a library to do something so simple. In my experience so far, the spreadsheet has a consistent number of columns, and the columns consistently contain the data I assume it does.
Simple formatting, just enough to make it so that it prints on as few pages as possible while still being scannable. The UPC font is a godsend, it does all the legwork, even computing the check digit.
In order to parse the XLSX file (which I understand is binary), we use a library called xlsx2csv which actually outputs an array of arrays. Ideally this library should be injected into the app HTML during the build step, but is now brought in via CDN.
Should I consider fonts a dependency? IDK, but there are a couple in the CSS.
I consider this to be in a 1.0 state. It’s not perfect, but it does the job as well as it should. It should only need fixing if the format of the spreadsheet changes. Most of the changes I’ve made in the last month have been presentation related.
e.g. data says P3W2 - P3W3 it could say something like “First week of two”
e.g. data says P1W2 - P3W4, and it’s currently P2W2, it could say “Week 5 of 10”
There are sample CSV files inside
tests/
OrderGuide.html
on your work onedrive and use the application there.