@extends('layouts.app') @section('title',$document ? 'Edit document' : 'Add Document') @section('content') Back to documents
@csrf
@if($document)
{{ $document->owner_label }}

Owner and document type remain unchanged.

@else
Search by name or code, then tap a matching employee.
@endif
@if(!$document) @else @endif
Used for expiry status and reminders.
@if($document) @php($latest=$document->versions->sortByDesc('id')->first()) @php($currentFiles=$latest?->upload_group ? $document->versions->where('upload_group',$latest->upload_group) : $document->versions->where('id',$latest?->id))

Keep the existing files, or select replacements. Earlier uploads remain in history.

    @foreach($currentFiles as $version)
  • {{ $version->filename }} ({{ $version->fileAccessAllowed() ? 'Available' : 'Safety check pending' }})
  • @endforeach
@endif

Use one PDF for all pages, or a front photo with the optional back below.

Add a back side (optional)
@if(!$ocrEnabled)

OCR is off. You can enter the details manually. A platform administrator can enable OCR under Companies → your company → Company security.

@else

Optional. Suggestions appear only when you click this button and after safety checks pass.

@endif
More details (optional) Number, issue date, name & note
Cancel

Dates save even if scanning is pending. Files stay private until safety checks pass.

@if(!$document)

Add new type

@endif
@endsection