@extends('layouts.dashboard') @section('title', 'Factoring Companies') @section('content')

Factoring Companies

Select a factoring company to see the carriers associated with it.

@if ($selectedId)
{{ $carriers->count() }} associated carrier{{ $carriers->count() === 1 ? '' : 's' }}
@endif
@if ($factoringCompanies->isEmpty())
No factoring companies found. Add a company with the "Factoring Company" role first.
@elseif (! $selectedId)
Choose a factoring company above to view its carriers.
@else
Carriers factored by {{ $selected?->display_name }}
@forelse ($carriers as $carrier) @php $address = $carrier->addresses->firstWhere('is_default', true) ?? $carrier->addresses->first(); $contact = $carrier->contacts->firstWhere('is_default', true) ?? $carrier->contacts->first(); @endphp @empty @endforelse
Carrier Name MC # DOT # City State Contact Phone Email
{{ $carrier->display_name }} {{ $carrier->mc_number ?: '—' }} {{ $carrier->dot_number ?: '—' }} {{ $address?->city ?: '—' }} {{ $address?->stateProvince?->code ?: '—' }} {{ $contact?->full_name ?: '—' }} {{ $contact?->phone ?: '—' }} {{ $contact?->email ?: '—' }}
No carriers are associated with this factoring company yet.
@endif
@endsection