mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Auth system - staff_accounts table: name, username, bcrypt password, role (staff|admin) - Session tokens in memory (8-hour TTL), httpOnly cookie - POST /auth/login, /auth/logout, GET /auth/me - All API endpoints now require a valid session - Default admin account seeded on first run (admin/admin), printed to console - Staff name for transactions comes from the session, no more dropdown Currency input fix - Amount inputs are now decimal (step=0.01); users enter 1.00 not 100 - Frontend multiplies by cfg.currency_divisor before POSTing - TopupRequest/ChargeRequest no longer include staff_name (from session) Admin area (4th tab, admin role only) - App Settings: club name, currency symbol, major/minor unit names, divisor, min/max topup, max charge, receipt footer, allow overdraft - Settings persisted in app_settings DB table; merged with CONFIG defaults at startup and refreshed after each save - Staff Accounts: list with edit modal (name, username, password, role, active flag) and delete; Add Account inline form - /admin/settings GET/POST, /admin/staff-accounts CRUD - /config endpoint exposes live settings to frontend on every page load receipt_footer field rendered on both receipt and statement print views https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7 |
||
|---|---|---|
| .. | ||
| app.js | ||
| bar.html | ||
| bar.js | ||
| cashier.html | ||
| cashier.js | ||
| common.js | ||
| index.html | ||
| style.css | ||