PRJ – 12

Wednesday 19/08: 8AM – 2:30PM

After spending another 2 hours wrestling with priting the sheets I gave in. I couldn’t get each product on it’s own page using window.print( ). The window.print() function prints the screen but you can alter the CSS to hide and display what you need to print. Once the print button was pressed the preview of the sheets along with the applications header etc would be hidden and only the product sheets would remain to be printed.

The solution to this would be to use one of the following CSS selectors: page-break-after, page-break-before, breakAfter, breakBefore, however it would only work on relatively positioned divs, with no floats and the list went on. I think the way the sheet are being created is probably causing the page break CSS selectors to not work. I have created a draft pull request and one of the other developers will see if they can fix it and then hopefully we can all learn from it.

I also did some small PR’s such as adding some data to quote PDF’s and adding a domain to a whitelist. For the rest of the day I started working on resolvers for the GraphQL schema I built earlier this week. I couldn’t test them yet because my user permissions are preventing me from running docker for windows so I need to get that sorted. I also learnt how to use GraphQL code generator to generate TypeScript typings for my GraphQL schema. Once I can run docker and run my Knex migration I should be able to start testing some of my queries.

Leave a comment

Design a site like this with WordPress.com
Get started