fix: merchant-users page shows role from user.role instead of owned_merchants_count
Some checks failed
Some checks failed
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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user