{{ __('Administrative Communications') }}

{{ __('Requests between administrations and employees.') }}

@can('administrative communications create') @endcan
@if (session()->has('message'))
{{ session('message') }}
@endif
@forelse ($requests as $request) @php $senderAdministration = $request->senderAdministrate?->getTranslation('name', app()->getLocale()); $recipientAdministration = $request->recipientAdministrate?->getTranslation('name', app()->getLocale()); $displayStatus = $request->status === 'open' ? 'pending' : $request->status; $statusClass = match ($displayStatus) { 'pending' => 'bg-sky-600', 'in_progress' => 'bg-amber-600', 'completed' => 'bg-green-600', 'rejected' => 'bg-red-600', default => 'bg-gray-500', }; @endphp @empty @endforelse
# {{ __('Subject') }} {{ __('From') }} {{ __('To') }} {{ __('Status') }} {{ __('Attachments') }} {{ __('Date') }} {{ __('Actions') }}
{{ $request->id }} {{ $request->subject }}
{{ $request->sender?->name_localized ?? $request->sender?->name ?? '—' }}
@if($senderAdministration)
{{ $senderAdministration }}
@endif
@if ($recipientAdministration) {{ $recipientAdministration }} @else {{ $request->recipientUser?->name_localized ?? $request->recipientUser?->name ?? '—' }} @endif {{ __($displayStatus) }} {{ $request->attachments_count }} {{ $request->created_at?->format('Y-m-d H:i') }} {{ __('View') }}
{{ __('No communication requests found.') }}
{{ $requests->links() }}

{{ __('New communication request') }}

@if ($recipientType === 'administrate')
@error('recipientAdministrateId')

{{ $message }}

@enderror
@else
@error('recipientEmployeeAdministrateId')

{{ $message }}

@enderror
@if ($recipientEmployeeAdministrateId) @if ($employees->isEmpty())

{{ __('No eligible employees in this administration.') }}

@endif @else

{{ __('Select an administration to view employees.') }}

@endif @error('recipientUserId')

{{ $message }}

@enderror
@endif
@error('subject')

{{ $message }}

@enderror
@error('description')

{{ $message }}

@enderror

{{ __('Up to 5 files, 50 MB each.') }}

@error('attachments')

{{ $message }}

@enderror @error('attachments.*')

{{ $message }}

@enderror @if(count($attachments))
    @foreach($attachments as $file)
  • {{ $file->getClientOriginalName() }}
  • @endforeach
@endif