@extends('layouts.portal') @section('title', 'Trust Version History - ' . $trust->trust_name) @section('page_title', 'Trust Version History') @section('page_subtitle', 'Track all updates to ' . $trust->trust_name . ' (Trust #' . $trust->id . ')') @section('sidebar') @include('admin.partials.sidebar', ['active' => 'wills']) @endsection @section('content')

Trust Version History

Trust ID: #{{ $trust->id }} | {{ $trust->trust_name }} | v{{ $currentVersion ?? 1 }}

Back to Trust

Current Version

{{ $currentVersion ?? 1 }}

Total Updates

{{ $versionHistory->count() }}

Last Updated

{{ $trust->updated_at->format('M d, Y') }}

Trust Status

{{ ucfirst(str_replace('_', ' ', $trust->status)) }}

Version Timeline

@if($versionHistory->count() > 0)
@foreach($versionHistory as $index => $version)
v{{ $version->version_number }}

Version {{ $version->version_number }} @if($index === 0) Current @endif

{{ $version->updated_by_role ?? 'Client' }}
@if($version->section_updated)

Section Updated:

{{ ucfirst(str_replace('_', ' ', $version->section_updated)) }}
@endif @if($version->changes_summary)

Summary: {{ $version->changes_summary }}

@endif

Updated At

{{ $version->created_at->format('d M Y, g:i A') }}

Updated By

@if($version->updatedBy)

{{ $version->updatedBy->name ?? 'N/A' }}

@else

System

@endif

Version

v{{ $version->version_number }}
@endforeach
@else

No version history available

@endif

Legend

👤 Client
🤝 Agent
⚖️ Lawyer
🔧 Admin
✓ Current
@endsection