Repository navigation
Conversation
The templates table holds the name, title and description of a template. The template_modules table holds its modules in presentation order, each with a module type, an optional slide title and its options as JSON. Deleting a template deletes its modules, and each position is used once per template. The seeder adds two example templates for the tests and for development.
GET /api/templates lists the templates sorted by title, without their modules. GET /api/templates/:templateId returns one template with its modules in presentation order, or a 404 naming the id. The endpoints follow the layers of the run types endpoints.
openapi.yaml is written by hand, and API.md and index.html are generated from it with npm run docs:api.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## alice-insights/dev #2316 +/- ##
======================================================
+ Coverage 46.00% 46.24% +0.23%
======================================================
Files 1070 1090 +20
Lines 17610 17879 +269
Branches 3261 3299 +38
======================================================
+ Hits 8102 8268 +166
- Misses 9508 9611 +103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
kaymeer
left a comment
There was a problem hiding this comment.
The page reuses Bookkeeping's own spinner, error alert, date picker and data helpers, adds no packages, and matches the generation service's request and error codes exactly. I ran it locally against the service: the page generated a five-page PDF for a week, and with the service stopped it showed "Generation failed" with a clear message, and the form stayed ready to try again. The navbar test and fix for laptop screens are a good catch.
One point, about the order of merging:
Stacking on #2308 (a fact, the way to fix it is up to you)
This branch is built on #2308 and its base is alice-insights/dev, so this pull request also contains the three commits of #2308. If it is squash-merged before #2308, those commits end up in this pull request's single commit, with this pull request's author. So #2308 is merged first, and this branch is rebased after that. I suggest GitHub's stacked pull requests (gh stack) for this: they keep the two apart, merge them from the bottom up, and point this one at alice-insights/dev by themselves once #2308 is merged. I plan to use them for my own stacked pull requests too.
Apart from that, this is ready from my side. If it is easier to set up the stack together, let me know.
I DON'T have JIRA ticket
What this PR does
Adds a Presentations page to Bookkeeping’s navigation. A signed-in user chooses a template and a reporting period with Bookkeeping’s existing date picker, then generates a PDF.
How to try it
ALICE_INSIGHTS_URLto the service origin reachable from the Bookkeeping backend.Where to look
lib/public/views/Presentations/contains the page and its state.lib/server/controllers/presentations.controller.jshandles the Bookkeeping route.lib/server/services/presentation/generatePresentation.jscalls ALICE Insights.Notable changes for users
Notable changes for developers
POST /api/presentationsvalidates the template and period, then forwards the signed-in user’s token and uses their name as the author.Changes made to the database