From 599508bc2059533dd9242265a4584ee5a537981e Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 1 Sep 2026 13:22:02 +0530 Subject: [PATCH] login changes --- src/features/store-admin/PeopleDrawers.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/features/store-admin/PeopleDrawers.tsx b/src/features/store-admin/PeopleDrawers.tsx index 4a2a373..687d33f 100644 --- a/src/features/store-admin/PeopleDrawers.tsx +++ b/src/features/store-admin/PeopleDrawers.tsx @@ -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({