@php $canManage = auth('staff')->user()->hasPermission('storage.manage'); $columnCount = $canManage ? 5 : 4; @endphp
@if ($actionError) {{ $actionError }} @endif
@foreach ($usage as $bucketUsage) @php $percent = $bucketUsage['quota_bytes'] > 0 ? min(100, (int) round($bucketUsage['total_bytes'] / $bucketUsage['quota_bytes'] * 100)) : 0; $retentionDays = $buckets[$bucketUsage['bucket']]['retention_days'] ?? null; $barTone = $percent >= 90 ? 'bg-danger' : ($percent >= 75 ? 'bg-warning' : 'bg-brand'); @endphp

{{ $bucketUsage['label'] }}

{{ number_format($bucketUsage['total_bytes'] / 1048576, 1) }} MB

{{ $percent }}% of {{ number_format($bucketUsage['quota_bytes'] / 1048576, 0) }} MB quota {{ $bucketUsage['count'] }} {{ $bucketUsage['count'] === 1 ? 'file' : 'files' }}

@if ($retentionDays) Cleaned up automatically after {{ $retentionDays }} days @else Kept indefinitely @endif

@endforeach
Files are removed automatically by the weekly cleanup once they pass their bucket's retention period. Mark a file Retained to exempt it — for example evidence tied to an open dispute or audit. Quotas are advisory: uploads are never blocked by them.

Files

@foreach ($buckets as $key => $config) @endforeach
File Bucket Size Status @if ($canManage) Actions @endif @forelse ($assets as $asset) {{ $asset->original_filename }} Uploaded by {{ $asset->uploadedByStaff?->display_name ?? '—' }} {{ $buckets[$asset->bucket]['label'] ?? $asset->bucket }} Attached to {{ $asset->subjectLabel() }} {{ number_format($asset->size_bytes / 1024, 0) }} KB @if ($asset->isRetained()) Retained {{ $asset->retained_reason }} @else — @endif @if ($canManage)
@if ($asset->isRetained()) Unretain @elseif ($retainingAssetId === $asset->id) Save Cancel @else Retain @endif
@endif @empty @endforelse {{ $assets->links() }}