@extends('layouts.app') @php use App\Models\AgreementFile; $saved = $file->exists; $value = fn (string $field, $fallback = null) => old($field, $file->{$field} ?? $fallback); $dateValue = fn (string $field) => old($field, $file->{$field}?->format('Y-m-d')); $sequence = $file->documentSequence(); @endphp @section('title', ($saved ? 'Edit file — '.$file->showroom : 'Open an agreement file')) @section('heading', $saved ? 'Agreement file — '.$file->showroom : 'Open a Showroom Agreement File') @section('subheading', 'Clause 10.2 — labelled with the showroom and its lot number') @section('actions') Cancel @endsection @section('content') @if ($errors->any())