feat(waiter): what a waiter may do comes from permission keys (platform-v2 step 4.3)
- Payments: ordering.orders.close checked on pay/close and the counter POS
(waiters have it by default, owner decision); pay-offline always recorded.
- The venue switches waiter_cancellations / price_adjust / revert are gone:
ordering.orders.cancel, ordering.prices.modify and the new
ordering.payments.revert (overridable) decide; moves/split/transfer/merge
need ordering.orders.open; discounts pricing.discounts.apply; chat chat.use.
- Venue role defaults: role_permissions (Alembic 0024), role_template(role, db),
GET/PUT /api/waiters/roles/{role}/permissions applying the change to everyone
with the role; manager Settings -> Operation -> "What each role may do".
0024 also grants the new key to existing owners and store managers.
- Bootstrap `approvable`; @xenia/access useAllowed(key) -> yes/approve/no.
The waiter shows each action by key, "with a manager's approval (PIN)" where
allowed; GET /api/orders/cancel-permissions removed.
- Tests: test_waiter_keys.py (11), access allowed(), waiter.mjs +5, manager.mjs +3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -228,7 +228,18 @@
|
||||
"saveCount_one": "Save {{count}} change",
|
||||
"saveCount_other": "Save {{count}} changes",
|
||||
"saved": "Permissions of {{name}} saved",
|
||||
"cannotGrant": "You can only give permissions you have yourself: \"{{label}}\"."
|
||||
"cannotGrant": "You can only give permissions you have yourself: \"{{label}}\".",
|
||||
"roleTitle": "What a {{role}} may do",
|
||||
"roleSubtitle_one": "Changes apply at once to the {{count}} person with this role, and to staff added later.",
|
||||
"roleSubtitle_other": "Changes apply at once to the {{count}} people with this role, and to staff added later.",
|
||||
"defaultHas": "Part of the role by default",
|
||||
"defaultHasNot": "Not part of the role by default",
|
||||
"roleReset": "Back to the defaults",
|
||||
"roleResetDone": "Set to the defaults. Save to keep it.",
|
||||
"roleSaved": "Permissions of the role {{role}} saved",
|
||||
"rolesTitle": "What each role may do",
|
||||
"rolesDescription": "The permissions each role gets: taking payments, cancelling, changing prices, discounts, chat… A change applies to everyone with the role and to staff added later. Single people can still be changed on the Staff page.",
|
||||
"rolesEdit": "Edit"
|
||||
},
|
||||
"sessions": {
|
||||
"intro": "Everyone signed in right now, and where. Ending a session signs that person out at once; they can sign in again.",
|
||||
|
||||
@@ -295,7 +295,10 @@
|
||||
"business_day": {
|
||||
"manage": "Open and close the business day"
|
||||
},
|
||||
"refunds": "Refund payments from other shifts"
|
||||
"refunds": "Refund payments from other shifts",
|
||||
"payments": {
|
||||
"revert": "Turn paid items back to unpaid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pos_counter": {
|
||||
|
||||
Reference in New Issue
Block a user