login changes

This commit is contained in:
2026-09-01 13:22:02 +05:30
parent 9b24d9ec09
commit 599508bc20

View File

@@ -166,10 +166,23 @@ function Problem({ message }: { message: string }) {
* `getstaffs` resolved, even when it is not in this list, because the backend's
* label is authoritative and most accounts carry an id absent from `app_roles`.
*/
/**
* The back-office roles, and what each one can actually reach.
*
* The labels used to be bare — Administrator, Manager, Staff — and the
* difference between them is not a matter of seniority, it is which workspace
* the account lands in. `resolveRole` sends roleids 1 and 3 to the merchant
* console; everything else becomes a branch user, pinned to one shop.
*
* Somebody choosing "Staff" for a person they meant to be a second
* administrator gets an account that signs in to the wrong workspace, and
* nothing on the way there says so. Naming the consequence in the option is the
* cheapest possible fix.
*/
const STAFF_ROLES = [
{ id: 3, label: 'Administrator' },
{ id: 4, label: 'Manager' },
{ id: 5, label: 'Staff' },
{ id: 3, label: 'Administrator — runs the whole business' },
{ id: 4, label: 'Manager — one shop' },
{ id: 5, label: 'Staff — one shop' },
];
export function PersonDrawer({