fix: merchant-users page shows role from user.role instead of owned_merchants_count
Some checks failed
CI / ruff (push) Successful in 10s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

The Role column was deriving Owner/Team Member from owned_merchants_count
which was unreliable. Now uses user.role directly (merchant_owner vs
store_member) which is the source of truth after RBAC Phase 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 22:54:42 +01:00
parent 1eef69f300
commit c47a394a7b

View File

@@ -167,10 +167,10 @@
<!-- Role -->
<td class="px-4 py-3 text-xs">
<span class="px-2 py-1 font-semibold leading-tight rounded-full"
:class="user.owned_merchants_count > 0
:class="user.role === 'merchant_owner'
? 'text-orange-700 bg-orange-100 dark:bg-orange-700 dark:text-orange-100'
: 'text-blue-700 bg-blue-100 dark:bg-blue-700 dark:text-blue-100'"
x-text="user.owned_merchants_count > 0 ? 'Owner' : 'Team Member'">
x-text="user.role === 'merchant_owner' ? 'Merchant Owner' : 'Store Member'">
</span>
</td>