Commit graph

9 commits

Author SHA1 Message Date
4ea5238e62 Fix cash summary quantity bug; add Safe Count as own nav item
- Cash summary: derive total_quantity from total_amount/denomination_value
  so value_entered rows are counted (previously SUM(quantity) returned
  NULL for those rows)
- Safe Count: moved safe_cash out of Float Management tabs into its own
  /safe/* route with a dedicated sidebar entry (Vault icon)
- FloatManagement now only shows Petty Cash and Change Tin tabs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 21:36:19 +00:00
e6188fb337 Add proper state machine flow to DailyCashUp
- On mount/date change: auto-fetch existing cash up
  - Draft found → auto-load into editing state
  - Finalised → auto-load into locked state (read-only + banner)
  - Not found → show 'Start Cash Up' prompt
- Removed manual 'Load Existing' / 'New' buttons
- Submitting final transitions immediately to locked state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 21:30:22 +00:00
4cbe68ebf7 Vertical tab order in denomination grids
Tab now moves down the Qty column first (£50→£20→...→1p), then down
the Value Override column, for both takings and float grids.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 21:24:41 +00:00
b9fb7b1dc7 Pass SETTINGS_URL and SETTINGS_SECRET to backend container
These were in the .env file but missing from docker-compose environment,
so process.env.SETTINGS_URL was undefined and newbook.js crashed on
URL construction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 21:22:37 +00:00
f52054e5e2 Fix auth calls to use central auth routes
AuthGate was calling /cashup/api/auth/verify and /cashup/api/auth/login,
which hit the cashup backend (404). Should call /api/auth/* which NPM
routes to the central auth service, matching all other apps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 21:13:04 +00:00
b623f806d8 Pin all fastify plugins to 4.x-compatible versions
cookie v9 + cors v9 = Fastify 4.x
multipart v8 = Fastify 4.x (downgrade from v9 which targets 5.x)
static v7 = Fastify 4.x (downgrade from v8 which targets 5.x)
fastify reverted to 4.x

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:19:33 +00:00
fc6d1baa79 Upgrade fastify to 5.x to match plugin version requirements
All @fastify/* plugins (cookie, cors, multipart, static) were already
on 5.x-targeted versions; fastify itself was still on 4.29.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:14:46 +00:00
577e98e6b1 Fix TypeScript compile errors blocking Docker build
- Add vite-env.d.ts for import.meta.env type support
- Remove unused imports: ChevronRight, useCallback (x2), today
- Silence unused attachments state read (keep setter for future use)
- Fix FloatManagement changeTinTargets reducer: drop unused k, fix v type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:11:01 +00:00
63a5a72fa3 Wire Newbook credentials to settings service 2026-07-01 19:33:16 +00:00