@php $statusColors = \App\Livewire\Crm\Agreements\Show::STATUS_COLORS; @endphp

{{ __('Agreements') }}

{{ trans_choice('{0} None in force|{1} :count in force|[2,*] :count in force', $inForce, ['count' => $inForce]) }} · {{ __('earlier and renewed agreements are kept below') }}

@if ($canCreate) {{ __('Record an agreement') }} @endif
@forelse ($agreements as $agreement) @php $left = $daysLeft($agreement); @endphp @empty @endforelse
{{ __('Agreement') }} {{ __('Term') }} {{ __('Renewal') }} {{ __('Status') }}
{{ $agreement->title }}

{{ $agreement->type ? __(\App\Models\Crm\Agreement::TYPES[$agreement->type] ?? $agreement->type) : __('Kind not set') }} @if ($agreement->partnership) · {{ __('through :name', ['name' => $agreement->partnership->name]) }} @endif · {{ $agreement->owner?->name ?? __('nobody') }}

{{ $agreement->starts_on?->format('j M Y') ?? __('Not set') }} – {{ $agreement->ends_on?->format('j M Y') ?? __('open-ended') }} @if ($left === null) {{ __('Not applicable') }} @elseif ($left <= 30) {{ trans_choice('{0} Ends today|{1} :count day left|[2,*] :count days left', $left, ['count' => $left]) }} @elseif ($left <= 60) {{ __(':count days left', ['count' => $left]) }} @else {{ __(':count days left', ['count' => number_format($left)]) }} @endif {{ __(\App\Models\Crm\Agreement::STATUSES[$agreement->status] ?? $agreement->status) }}
@if ($agreements->hasPages())
{{ $agreements->onEachSide(1)->links() }}
@endif