@extends('layouts.app') @section('title','Document Settings') @section('content') All Documents @if($tab==='types')

Document Types

Types are master records. Deactivate a used type to stop new uploads without changing existing documents.

@include('documents.type-fields',['type'=>null])
@forelse($types as $type)
{{ $type->name }} {{ ucfirst($type->owner_type) }} {{ $type->active?'Active':'Inactive' }} {{ $type->expiry_required?'Expiry required':($type->has_expiry?'Expiry optional':'Does not expire') }} @include('documents.type-fields',['type'=>$type]) @if($used->contains($type->id))

This type is used by a document and cannot be deleted. Set Active to No to deactivate it.

@else

Delete {{ $type->name }}?

This is allowed only while no documents use this type.

@csrf @method('DELETE')
@endif
@empty

No matching document types.

@endforelse {{ $types->links() }} @if($legacyTypes->isNotEmpty())
Previous branch document types

These types were created by the earlier branch-based setup. Existing documents keep their ownership. For new uploads, use Company or Employee types.

@foreach($legacyTypes as $type)
{{ $type->name }} ยท {{ $type->active?'Active':'Inactive' }}@include('documents.type-fields',['type'=>$type])
@endforeach
@endif
@elseif($tab==='categories')

Company Categories

Add category
@foreach($categories as $category)
{{ $category->name }}{{ $category->active?'Active':'Inactive' }}Edit category@if($usedCategories->contains($category->id))In use: deactivate through Edit.@else

Delete {{ $category->name }}?

@csrf @method('DELETE')
@endif
@endforeach{{ $categories->links() }}
@else @include('admin.settings.document-storage')

Automatic safety checks

@if(!\App\Domain\Documents\DocumentScanPolicy::enabled())@elseif($failures)@else

No persistent file-check failures detected.

@endif

Files are encrypted and private on both server storage and S3. When malware scanning is enabled, preview, download and text reading require successful safety checks. The existing maintenance task processes checks and retries automatically.

@endif @endsection