@can('manageDocuments', $patient) @endcan @can('manageDocuments', $patient)
@csrf
{{-- No longer required: choose several files and each is named after itself, because one title cannot describe five documents. --}}
{{-- The browser's own multi-select: a stack of paperwork is scanned in one go and picked in one go. No repeat rows here — a file input cannot be given a value by script, so cloning one would produce empty boxes. --}}
{{ __('patients::messages.documents.accepted', ['size' => round((int) config('clinic.uploads.max_size_kb') / 1024)]) }} {{ __('patients::messages.documents.multiple_hint') }}
@error('files')
{{ $message }}
@enderror @error('files.*')
{{ $message }}
@enderror
@endcan @forelse ($documents as $document)
{{-- Always a download, never an inline preview. A PDF rendered in the application's own origin turns an uploaded file into a stored scripting vector against every clinician who opens it. --}} {{ $document->title }} {{ __('patients::messages.documents.categories.'.$document->category) }}
{{ $document->humanSize() }} · {{ $document->uploadedBy?->name ?? '—' }} · {{ $document->created_at->format('Y-m-d') }}
@can('manageDocuments', $patient) @endcan
@empty

{{ __('patients::messages.documents.empty') }}

{{ __('patients::messages.documents.empty_text') }}

@endforelse