feature/ack-signature-and-toasts #29

Merged
jason merged 10 commits from feature/ack-signature-and-toasts into master 2026-03-07 21:47:24 -06:00

10 Commits

Author SHA1 Message Date
da602f69af docs: update ReadmeModal admin guide for acknowledgment signature and toast notifications
- Added acknowledgment signature workflow to "Logging a Violation" section (step 7)
- Added toast notification step to violation logging workflow (step 9)
- Updated Violation History section: amend now includes acknowledged-by/date fields
- Added PDF acknowledgment rendering note to Violation History
- Added "Toast Notifications" as standalone feature section
- Updated Amendable Fields to include acknowledged_by and acknowledged_date
- Updated Immutability Rules table with ack fields
- Moved acknowledgment signature and toast system to Shipped in roadmap
- Removed acknowledgment signature from Near-term (already shipped)
2026-03-07 21:46:30 -06:00
66f59dead3 docs: update README for acknowledgment signature field, toast notifications, and PDF logo refactor
- Moved acknowledgment signature field from Proposed to Completed (Phase 7)
- Added toast notification system to Completed (Phase 7)
- Updated Violation Form features with acknowledgment section and toasts
- Updated Employee Profile Modal features with toast notifications
- Added Toast Notification System as standalone feature section
- Updated PDF Generation section: logo loaded from disk, ack rendering
- Updated Amendable Fields table with acknowledged_by and acknowledged_date
- Updated Database Schema section with new violation columns
- Updated Project Structure tree with ToastProvider.jsx and template.js description
- Updated API reference for POST /api/violations to note new fields
2026-03-07 21:44:22 -06:00
ecd3810050 feat: add toast notifications to EmployeeModal for all actions
- Toast success/error on PDF download, negate, restore, hard delete
- Toast success on employee edit and violation amendment via modal callbacks
- Error details from API responses included in error toasts
2026-03-07 21:40:36 -06:00
114dbb1166 refactor: load logo from disk instead of hardcoded base64 + add acknowledgment signature rendering
- Reads mpm-logo.png from filesystem at startup, converts to base64 data URI dynamically
- Removes massive hardcoded LOGO_B64 constant (~5KB of source code eliminated)
- Falls back gracefully if logo file is not found (dev environments)
- Tries both dist/ and public/ paths for dev vs production compatibility
- Adds acknowledgment rendering: if acknowledged_by is set, shows filled name/date
  instead of blank signature lines, with green "Acknowledged" badge on section header
- Blank signature lines still shown when acknowledgment is not provided
2026-03-07 21:39:01 -06:00
b4edcdc945 feat: accept acknowledged_by/acknowledged_date in violation creation and amendment
- POST /api/violations now accepts acknowledged_by and acknowledged_date
- Both fields added to AMENDABLE_FIELDS whitelist for post-submission edits
- Acknowledgment data persisted to DB and passed through to PDF generation
2026-03-07 21:32:15 -06:00
8944cc80e0 feat: add auto-migration for acknowledged_by/acknowledged_date columns 2026-03-07 21:31:05 -06:00
8e06c9d576 feat: add acknowledged_by and acknowledged_date columns to violations schema 2026-03-07 21:30:47 -06:00
725dfa2963 feat: add acknowledgment signature fields + toast notifications to ViolationForm
- New "Employee Acknowledgment" section with acknowledged_by name and date
- Replaces blank signature line on PDF with recorded acknowledgment
- Toast notifications for submit success/error, PDF download, and validation warnings
- Inline status messages retained as fallback
2026-03-07 21:30:29 -06:00
c4dd658aa7 feat: wrap App with ToastProvider for global notifications 2026-03-07 21:29:05 -06:00
57358dfd21 feat: add Toast notification system
- ToastProvider context with useToast hook
- Supports success, error, info, and warning variants
- Auto-dismiss with configurable duration (default 4s)
- Slide-in animation with progress bar
- Stacks up to 5 toasts, oldest dismissed first
- Consistent with dark theme UI
2026-03-07 21:28:45 -06:00