@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 Document belongs toEmployee@if($companyAccess)Company@endif Employee @foreach($employees as $person){{ $person->full_name }}{{ $person->employee_number }}@endforeach No matching employees. Try another name or code. Search by name or code, then tap a matching employee. @endif $document]) @if(!$document || $document->owner_type==='employee') hidden @endif>Company categoryChoose a category@foreach($categories as $category)document_category_id===$category->id)>{{ $category->name }}{{ !$category->active ? ' (inactive)' : '' }}@endforeachManage groups under Documents → Company Categories. @if(!$document) Document typeChoose a document type@foreach($types as $type){{ $type->name }}@endforeachAdd new type @else Document type @endif Expiry date does_not_expire) data-no-expiry @disabled($document?->type->expiry_required)>Does not expire 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) Read text from document @if(!$ocrEnabled)OCR is off. You can enter the details manually. A platform administrator can enable OCR under Companies → your company → Company security.@elseOptional. Suggestions appear only when you click this button and after safety checks pass.@endif Review suggested detailsView text read from document More details (optional) Number, issue date, name & note Document number Issue date Document name (optional)Filled from the type. Change it only if you want a different name. Note (optional){{ $document?->note }} Save documentCancel Dates save even if scanning is pending. Files stay private until safety checks pass. @if(!$document)Add new typeType nameCancelAdd type@endif @endsection
Owner and document type remain unchanged.
No matching employees. Try another name or code.
Keep the existing files, or select replacements. Earlier uploads remain in history.
Use one PDF for all pages, or a front photo with the optional back below.
OCR is off. You can enter the details manually. A platform administrator can enable OCR under Companies → your company → Company security.
Optional. Suggestions appear only when you click this button and after safety checks pass.
Dates save even if scanning is pending. Files stay private until safety checks pass.