-
Notifications
You must be signed in to change notification settings - Fork 1
feat: visual print template builder #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace Handlebars templates with a block-based visual template builder that allows non-technical staff to customize print layouts. Key changes: - Add print_templates and default_print_templates database tables - Implement drag-and-drop template builder with @dnd-kit - Support 11 block types: header, text, data-field, data-table, rich-content, divider, spacer, doctors-list, conditional, two-column, image - Add live preview with sample patient/surgery data - Update print dialog to use new template renderer - Add template management UI (create, edit, duplicate, delete, restore) - Fix backup/restore to properly handle WAL mode (checkpoint before backup, delete WAL files before restore) - Fix updateSetting to use upsert for missing settings after restore - Remove Handlebars dependency and old template files
…page - Merge DoA/DoD fields into the main patient info table in print templates instead of using a separate conditional table (removes visual gap) - Add clickable link to surgery view from BHT number on edit surgery page
Move Print Templates from standalone page to Settings tab for consistent navigation. Add refined card design with horizontal layout, gradient icons, hover states, and polished dropdown menus. - Create PrintTemplatesSettings component for Settings integration - Add print-templates as fourth Settings tab - Redirect /settings/print-templates to /settings?tab=print-templates - Design TemplateCard as clickable list item with hover animations - Add consistent icons to all dropdown menu items
- Add description input field to template editor header - Add resetPrintTemplatesToDefaults function that deletes all templates and recreates from default_print_templates table - Change "Restore Default" to "Reset to Defaults" button with confirmation dialog - Simplify UI by removing per-template restore dropdown
- Create PrintDialog component with template dropdown - If only one template exists, print directly without dialog - If multiple templates exist, show selection dialog - Pre-selects default template in dropdown - Update view-surgery.tsx to use PrintDialog for both surgery and follow-up printing
- Reorganize layout with QR code and button in same row - Add "Why Join?" benefits panel on the right side - Better responsive behavior at different screen widths
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Test plan