fix(tenancy): prioritize active over pending in member status display
Some checks failed
Some checks failed
getMemberStatus() showed "pending" if ANY store had a pending invitation, even if the member was already active in another store. Now checks for active stores first — a member who is active in at least one store shows as "active", not "pending". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -347,8 +347,8 @@ function merchantTeam() {
|
|||||||
*/
|
*/
|
||||||
getMemberStatus(member) {
|
getMemberStatus(member) {
|
||||||
if (!member.stores || member.stores.length === 0) return 'inactive';
|
if (!member.stores || member.stores.length === 0) return 'inactive';
|
||||||
|
if (member.stores.some(s => s.is_active && !s.is_pending)) return 'active';
|
||||||
if (member.stores.some(s => s.is_pending)) return 'pending';
|
if (member.stores.some(s => s.is_pending)) return 'pending';
|
||||||
if (member.stores.some(s => s.is_active)) return 'active';
|
|
||||||
return 'inactive';
|
return 'inactive';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user