@extends('layouts.base') @section('content') @section('breadcrumb') @endsection @if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif @php $notesCount = \App\Models\Note::where('noteable_type', \App\Models\Network::class) ->where('noteable_id', $network->id) ->count(); $activeTab = session('open_tab') ?: 'informations'; @endphp
@php $initials = $network->name ? strtoupper(substr($network->name, 0, 2)) : ''; @endphp @if($initials) {{ $initials }} @endif

{{ $network->name }}

@if($network->phones && $network->phones->count() > 0) {{ format_phone_display($network->phones->first()->value ?? null) }} @endif @if($network->address?->city) {{ $network->address?->city ?? '-' }} @endif
Retour @if(auth()->user()->canAccessPartnerCommercialNetworksWrite()) @endif

{{ $network->name }}

@if($network->applications && $network->applications->count() > 0)

{{ $network->applications->first()->name }}

@endif @if($network->phones && $network->phones->count() > 0) @foreach($network->phones as $phone)

{{ format_phone_display($phone->value) }} {{ $phone->type?->label() ?? '-' }}

@endforeach @endif
@if($network->address)

{{ $network->address->line_1 ?? '' }} @if($network->address->line_2) , {{ $network->address->line_2 }} @endif

@if($network->address->zip_code || $network->address->city)

{{ $network->address->zip_code ?? '-' }} {{ $network->address->city ?? '-' }}

@endif @if($network->address->country)

{{ $network->address->country->name }}

@endif @endif

créé le {{ $network->created_at->format('d/m/Y H:i') }}

Commercialisateurs rattachés
@if(auth()->user()->canAccessPartnerCommercialNetworksWrite())
Créer un commercialisateur
@endif
@if($network->users->count() > 0)
@foreach($network->users as $user) @endforeach
Nom Prénom Email Téléphone Rôle
{{ $user->fullName() }} {{ $user->email ?? '-' }} @if($user->phones && $user->phones->count() > 0) {{ format_phone_display($user->phones->first()->value ?? null) }} @else - @endif @if($user->professions && $user->professions->count() > 0) @foreach($user->professions as $profession) {{ $profession->name ?? '-' }} @endforeach @else - @endif
@else

Aucun commercialisateur associé à ce réseau.

@endif
@if($network->documents->count() > 0) @else

Aucun document

@endif
@if(auth()->user()->canAccessPartnerCommercialNetworksWrite())
@csrf
@endif @php $notes = \App\Models\Note::where('noteable_type', \App\Models\Network::class) ->where('noteable_id', $network->id) ->with('user') ->orderBy('created_at', 'desc') ->get(); @endphp @if($notes->isEmpty())

Aucune note

@else @foreach($notes as $note)

{{ $note->content }}


{{ $note->created_at->format('d/m/Y') }} @if($note->user) @php $initials = ($note->user->firstname ? substr($note->user->firstname, 0, 1) : '') . ($note->user->lastname ? substr($note->user->lastname, 0, 1) : ''); @endphp @if($initials) {{ strtoupper($initials) }} @endif {{ $note->user->firstname }} {{ $note->user->lastname }} @endif
@endforeach @endif
@if(auth()->user()->canDeletePartnerCommercialNetworks()) @endif @if(auth()->user()->canAccessPartnerCommercialNetworksWrite()) @endif @if($network->documents->count() > 0) @push('scripts') @endpush @endif @endsection