{{ __('Back to administrative communications') }} {{ __($communication->status === 'open' ? 'pending' : $communication->status) }}
@if (session()->has('message'))
{{ session('message') }}
@endif

{{ __('Communication request') }} #{{ $communication->id }}

{{ $communication->subject }}

{{ $communication->created_at?->format('Y-m-d H:i') }}

{{ __('From') }}

{{ $communication->sender?->name_localized ?? $communication->sender?->name ?? '—' }}

@if($communication->senderAdministrate)

{{ $communication->senderAdministrate->getTranslation('name', app()->getLocale()) }}

@endif

{{ __('To') }}

@if($communication->recipientAdministrate)

{{ $communication->recipientAdministrate->getTranslation('name', app()->getLocale()) }}

{{ __('Administration') }}

@else

{{ $communication->recipientUser?->name_localized ?? $communication->recipientUser?->name ?? '—' }}

{{ __('Employee') }}

@endif

{{ __('Request details') }}

{{ $communication->description }}

{{ __('Attachments') }}

@forelse($communication->attachments as $attachment)
{{ $attachment->file_name }} ({{ number_format($attachment->file_size / 1024, 1) }} KB)
@empty

{{ __('No attachments.') }}

@endforelse
@if($communication->task) @php $actor = auth()->user(); $canOpenTask = (int) $communication->task->employee_id === (int) $actor->id || $communication->task->employees->contains('id', $actor->id) || $actor->can('tasks view all'); @endphp

{{ __('Linked task') }}

#{{ $communication->task->id }} · {{ $communication->task->title }} · {{ __($communication->task->status) }}

@if($canOpenTask && $actor->can('tasks show')) {{ __('Open task') }} @endif
@endif @if($communication->status_updated_at)

{{ __('Last status update') }}: {{ $communication->status_updated_at->format('Y-m-d H:i') }} @if($communication->statusUpdatedBy) · {{ $communication->statusUpdatedBy->name_localized ?? $communication->statusUpdatedBy->name }} @endif

@endif @if($communication->status === 'rejected' && filled($communication->rejection_reason))

{{ __('Rejection reason') }}

{{ $communication->rejection_reason }}

@endif

{{ __('Request history') }}

    @forelse($activityLogs as $activity)
  1. {{ $this->activityDescription($activity, $communication->subject) }}

    {{ $activity->user?->name_localized ?? $activity->user?->name ?? '—' }} · {{ $activity->created_at?->format('Y-m-d H:i') }}

  2. @empty
  3. {{ __('No activity yet.') }}
  4. @endforelse
@if($communication->canBeRespondedToBy(auth()->user()) && !in_array($communication->status, ['completed', 'rejected'], true)) @if($communication->status === 'pending') @endif @endif @if($communication->task) {{ __('A task is already linked to this request.') }} @elseif($communication->canBeConvertedToTaskBy(auth()->user()) && $communication->status !== 'completed') @endif

{{ __('The request and task statuses are updated separately.') }}

@if($showRejectModal) @endif @if($showTaskConversionModal)

{{ __('Convert to task') }}

{{ __('The task will keep a link to this request and start with its own status.') }}

@error('taskTitle')

{{ $message }}

@enderror
@error('taskPriority')

{{ $message }}

@enderror

{{ __('The request description is copied here and can be edited for the task.') }}

@error('taskDescription')

{{ $message }}

@enderror
@error('taskCategoryId')

{{ $message }}

@enderror @if($taskCategories->isEmpty())

{{ __('Add a task category before converting this request.') }}

@endif
@error('taskProjectId')

{{ $message }}

@enderror @if($projects->isEmpty())

{{ __('Add a project before converting this request.') }}

@endif
@error('taskTemplateId')

{{ $message }}

@enderror
@error('taskClientId')

{{ $message }}

@enderror
@error('taskStartDate')

{{ $message }}

@enderror
@error('taskStartTime')

{{ $message }}

@enderror
@error('taskDueDate')

{{ $message }}

@enderror
@error('taskDueTime')

{{ $message }}

@enderror
@error('taskReminderDaysBefore')

{{ $message }}

@enderror
@error('taskDuration')

{{ $message }}

@enderror

{{ __('Only employees in the receiving scope can be assigned.') }}

@error('taskAssigneeIds')

{{ $message }}

@enderror @error('taskAssigneeIds.*')

{{ $message }}

@enderror @if($taskAssignees->isEmpty())

{{ __('No active employee is available in the receiving scope.') }}

@endif
@error('taskNotes')

{{ $message }}

@enderror
@endif