@php $canManage = $wsMember->canManageTeam(); $roleInfo = [ 'owner' => ['crown', 'Full control: team, terms, ordering and approvals.'], 'approver' => ['shield-check', 'Orders without limits and approves buyer requests.'], 'buyer' => ['shopping-cart', 'Places orders; above their limit they go for approval.'], 'viewer' => ['eye', 'Sees pricing, orders and statements. Cannot order.'], ]; @endphp
@foreach($roleInfo as $role => [$icon, $text])

{{ $roles[$role] }}

{{ $text }}

@endforeach

{{ $members->count() }} {{ str('member')->plural($members->count()) }}

    @foreach($members as $member) @php $isSelf = $member->is($wsMember); @endphp
  • {{ strtoupper(substr($member->customer->name ?: $member->customer->email, 0, 1)) }}

    {{ $member->customer->name ?: $member->customer->email }} @if($isSelf)(you)@endif

    {{ $member->customer->email }} · {{ $member->last_active_at ? 'active '.$member->last_active_at->diffForHumans() : 'invited, not signed in yet' }}

    {{ $member->roleLabel() }} @if($member->role === 'buyer') {{ $member->order_limit_cents !== null ? 'Limit AUD '.number_format($member->order_limit_cents / 100) : 'No limit' }} @endif
    @if($canManage)
    Edit access
    @csrf @method('PUT')
    @unless($isSelf)
    @csrf @method('DELETE')
    @endunless
    @endif
  • @endforeach