61 Commits

Author SHA1 Message Date
jason 3a0934bdc6 Merge pull request 'feat: custom violation types — persist, manage, and use in violation form' (#46) from claude/musing-bell into master
Reviewed-on: #46
2026-03-18 16:25:53 -05:00
jason 95d56b5018 feat: custom violation types — persist, manage, and use in violation form
Adds a full CRUD system for user-defined violation types stored in a new
violation_types table. Custom types appear in the violation dropdown alongside
hardcoded types, grouped by category, with ✦ marker and a green Custom badge.

- db/database.js: auto-migration adds violation_types table on startup
- server.js: GET/POST/PUT/DELETE /api/violation-types; type_key auto-generated
  as custom_<slug>; DELETE blocked if any violations reference the type
- ViolationTypeModal.jsx: create/edit modal with name, category (datalist
  autocomplete from existing categories), handbook chapter reference,
  description/reference text, fixed vs sliding point toggle, context field
  checkboxes; delete with usage guard
- ViolationForm.jsx: fetches custom types on mount; merges into dropdown via
  mergedGroups memo; resolveViolation() checks hardcoded then custom; '+ Add
  Type' button above dropdown; 'Edit Type' button appears when a custom type is
  selected; newly created type auto-selects; all audit calls flow through
  existing audit() helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 16:23:21 -05:00
jason d6585c01c6 Code review and fixes 2026-03-11 16:33:38 -05:00
jason b656c970f0 feat: stat card badges act as filters; Elite Standing = 0-4 pts 2026-03-11 00:11:42 -05:00
jason 91ba19d038 fix: update TierWarning to use dark-mode-compatible colors 2026-03-10 16:00:24 -05:00
jason 0769a39491 Update Dashboard with responsive mobile/desktop layouts 2026-03-08 22:05:52 -05:00
jason 15a2b89350 Add mobile-optimized Dashboard component with card layout 2026-03-08 22:05:04 -05:00
jason 74492142a1 Update App.jsx with mobile-responsive navigation and layout 2026-03-08 22:04:05 -05:00
jason 602f371d67 Add mobile-responsive CSS utility file 2026-03-08 22:02:10 -05:00
jason f4ed8c49ce feat: fetch version.json on mount, show short SHA + commit link in footer 2026-03-08 00:55:44 -06:00
jason 20be30318f feat: add local dev fallback version.json stub 2026-03-08 00:45:53 -06:00
jason 995e607003 fix: remove default browser body margin causing white border 2026-03-08 00:38:38 -06:00
jason 981fa3bea4 feat: add footer with copyright, live dev ticker, and Gitea repo link 2026-03-08 00:35:35 -06:00
jason 5f0ae959ed Update client/src/App.jsx 2026-03-08 00:25:11 -06:00
jason 7e1164af13 feat: add footer with copyright, Gitea repo link, and live dev ticker
- © Jason Stedwell copyright with current year
- Gitea icon + link to https://git.alwisp.com/jason/cpas
- Running elapsed time ticker since first commit (2026-03-06T11:33:32)
  ticks every second: Xd HHh MMm SSs format
- App layout changed to flex column so footer pins to page bottom
- Footer styles isolated in `sf` object for clarity
2026-03-08 00:21:30 -06:00
jason d8793000fc feat: replace department text input with preloaded select dropdown 2026-03-07 23:15:15 -06:00
jason 0f31677631 feat: replace department text input with preloaded select dropdown 2026-03-07 23:14:40 -06:00
jason 5d835e6b91 feat: add shared DEPARTMENTS constant 2026-03-07 23:13:26 -06:00
jason 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
jason 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
jason 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
jason c4dd658aa7 feat: wrap App with ToastProvider for global notifications 2026-03-07 21:29:05 -06:00
jason 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
jason 281825377f feat: ReadmeModal — admin usage guide, feature map, workflow reference, roadmap (no install content) 2026-03-07 18:39:01 -06:00
jason 84f5124850 docs: rewrite ReadmeModal as admin usage guide — feature map, workflow, tier system, roadmap 2026-03-07 18:33:54 -06:00
jason d4638783a4 feat: add Docs button to navbar — opens ReadmeModal slide-in panel 2026-03-07 09:52:16 -06:00
jason 9d4d465755 feat: ReadmeModal — full README rendered in a themed slide-in panel 2026-03-07 09:51:57 -06:00
jason 57d0ac9755 feat: wire ExpirationTimeline and EmployeeNotes into EmployeeModal 2026-03-07 09:44:54 -06:00
jason 328fc6f307 feat: EmployeeNotes component — inline free-text notes with quick-add HR flag tags 2026-03-07 09:43:54 -06:00
jason 37efd596dd feat: ExpirationTimeline component — per-violation roll-off countdown with tier drop projection 2026-03-07 09:43:31 -06:00
jason 970bc0efea feat: add Audit Log button to Dashboard toolbar 2026-03-07 09:26:33 -06:00
jason 7ee76468c4 feat: wire EditEmployeeModal and AmendViolationModal into EmployeeModal 2026-03-07 09:25:49 -06:00
jason 2525cce03e feat: AuditLog panel component — filterable, paginated audit trail 2026-03-07 09:24:49 -06:00
jason 15d3f02884 feat: AmendViolationModal — edit non-scoring fields with full diff history 2026-03-07 09:24:13 -06:00
jason ee91a16506 feat: EditEmployeeModal — edit name/dept/supervisor and merge duplicates 2026-03-07 09:23:39 -06:00
jason f4f191518c fix: dark mode colors in ViolationHistory component 2026-03-06 23:26:39 -06:00
jason 52a57f21b0 Merge pull request 'Upload files to "client/src/components"' (#18) from p4-hotfixes into master
Reviewed-on: #18
2026-03-06 17:43:31 -06:00
jason 3cc62c2746 Upload files to "client/src/components" 2026-03-06 17:43:14 -06:00
jason 47e14ae23b Merge pull request 'Upload files to "client/src/components"' (#17) from p4-hotfixes into master
Reviewed-on: #17
2026-03-06 17:20:42 -06:00
jason a6d4885a53 Upload files to "client/src/components" 2026-03-06 17:19:57 -06:00
jason f4869b42b4 Merge pull request 'p4-hotfixes' (#16) from p4-hotfixes into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/16
2026-03-06 15:44:34 -06:00
jason 98fe9d4a79 Upload files to "client/src/components" 2026-03-06 15:44:15 -06:00
jason f52af27114 Upload files to "client/src/components" 2026-03-06 15:38:20 -06:00
jason 7ff066011d Merge pull request 'Upload files to "client/src/components"' (#15) from p4-hotfixes into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/15
2026-03-06 15:26:06 -06:00
jason 35b4ded10c Upload files to "client/src/components" 2026-03-06 15:25:48 -06:00
jason 2ac330904d Merge pull request 'p4-hotfixes' (#13) from p4-hotfixes into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/13
2026-03-06 14:38:57 -06:00
jason 1a09efbfe5 Upload files to "client/src/components" 2026-03-06 14:38:29 -06:00
jason de07e77e07 Merge pull request 'Update client/src/components/ViolationForm.jsx' (#12) from p4-hotfixes into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/12
2026-03-06 14:23:44 -06:00
jason 722f404269 Update client/src/components/ViolationForm.jsx 2026-03-06 14:23:19 -06:00
jason 7db080bd2a Merge pull request 'Upload files to "client/src/components"' (#11) from p4-hotfixes into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/11
2026-03-06 14:21:26 -06:00