mirror of
https://github.com/kbenestad/ClubLedger.git
synced 2026-06-18 09:44:33 +00:00
Policies: - never – not allowed (default) - always – allowed for all charges - staff_override – default no; staff sees checkbox to allow per charge - admin_override – default no; only admins see the allow-per-charge checkbox - staff_block – default yes; staff sees checkbox to block per charge Backend: - CONFIG: allow_negative_balance → overdraft_policy: "never" - migrate_db(): converts old allow_negative_balance setting in app_settings to the equivalent overdraft_policy value on first startup after upgrade - ChargeRequest: new optional overdraft_override: bool = False - POST /charge: full policy logic; admin_override enforced server-side so a non-admin can't bypass it by sending override=true - POST /admin/settings: validates policy value before saving Frontend: - Admin settings: checkbox replaced by <select> with five options - Bar form: barOverrideRow (hidden by default); selectBarMember() shows it with the right label when policy is staff_override / admin_override (admin only) / staff_block; hidden for never and always - clearBarSelection() resets the override checkbox and hides the row https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7 |
||
|---|---|---|
| .. | ||
| app.js | ||
| bar.html | ||
| bar.js | ||
| cashier.html | ||
| cashier.js | ||
| common.js | ||
| index.html | ||
| style.css | ||