{{-- resources/views/pro/society/show.blade.php --}} @extends('layouts.base') @section('title', __('Company')) @section('content')

{{ __('Company details') }}

@if(session('ok'))
{{ session('ok') }}
@endif @if(empty($society))
{{ __('No company attached to your account.') }}
@else
{{ $society->name }}
{{ __('Address') }}
{{ $society->street ?? '' }}
{{ $society->postcode ?? '' }} {{ $society->city ?? '' }} {{ $society->country ?? '' }}
@if(!empty($society->phone))
{{ __('Phone') }}
{{ $society->phone }}
@endif @if(!empty($society->email))
{{ __('Email') }}
{{ $society->email }}
@endif @if(!empty($society->subscribed_at))
{{ __('Subscribed at') }}
{{ \Illuminate\Support\Carbon::parse($society->subscribed_at)->format('Y-m-d') }}
@endif
{{-- Company users (Admin Pro + Pro) --}}

{{ __('Company users') }}

@php // if controller eager loads: $society->users $companyUsers = $society->users ?? collect(); @endphp @if($companyUsers->isEmpty())
{{ __('No users associated with this company.') }}
@else

{{ __('Showing :count users (page :page of :pages)', [ 'count' => $allUsers->total(), 'page' => $allUsers->currentPage(), 'pages' => $allUsers->lastPage(), ]) }}

@foreach($allUsers as $u) @endforeach
{{ __('Lastname') }} {{ __('Firstname') }} {{ __('Email') }} {{ __('Role') }}
{{ $u->lastname ?? '—' }} {{ $u->firstname ?? '—' }} {{ $u->email }} @switch((int)($u->role_id ?? 0)) @case(1) {{ __('Admin') }} @break @case(2) {{ __('Admin Pro') }} @break @case(4) {{ __('Pro') }} @break @default {{ __('User') }} @endswitch
{{ $allUsers->links() }}
@endif @endif
@endsection