@extends('layouts.app') @php use App\Models\LeaseProposal; use App\Models\Permission; use App\Support\Format; $query = request()->except(['page', 'sort', 'dir']); $sortLink = function (string $column) use ($sort, $direction, $query) { $next = ($sort === $column && $direction === 'asc') ? 'desc' : 'asc'; return route('proposals.index', $query + ['sort' => $column, 'dir' => $next]); }; $sortIcon = function (string $column) use ($sort, $direction) { if ($sort !== $column) { return 'bi-arrow-down-up opacity-25'; } return $direction === 'asc' ? 'bi-sort-down-alt' : 'bi-sort-up-alt'; }; @endphp @section('title', $archived ? 'Archived proposals' : 'Lease proposal evaluations') @section('heading', $archived ? 'Archived lease proposals' : 'Evaluation of lease proposals') @section('subheading', 'Terms offered by landlords, recorded for review before signing') @section('actions') @can(Permission::PROPOSAL_CREATE) Evaluate a proposal @endcan @endsection @section('content') @if ($archived)
Showing archived proposals, kept so the activity trail stays complete. Back to current proposals.
@else
All @foreach ($options['statuses'] as $key => $label) {{ $label }} @if (($counts[$key] ?? 0) > 0) {{ $counts[$key] }} @endif @endforeach
@endif
@if ($archived) @endif
Clear
{{ number_format($proposals->total()) }} {{ \Illuminate\Support\Str::plural('proposal', $proposals->total()) }} @unless ($archived) Archived proposals @endunless
@forelse ($proposals as $proposal) {{-- The wait before the term starts, or how long it has been running. --}} {{-- The PDFs kept against the proposal: the TSF, letter of offer, agreement. --}} @empty @endforelse
Dated Reference Outlet Location Landlord Commencing Days remaining Rate / sq ft Total rent vs today % rent Deposit Forms Status
{{ Format::date($proposal->proposal_date) }} {{ $proposal->reference_no ?: '—' }} {{ $proposal->outlet }}
{{ $proposal->type_label }}
{{ $proposal->location ?: '—' }} @if ($proposal->region)
{{ $proposal->region->code }}
@endif
{{ $proposal->landlord?->name ?: '—' }} {{ $proposal->display_commencement }} {{ Format::dayCount($proposal->days_to_commencement) }} {{ Format::rate($proposal->base_rent_yr1_rate) }} {{ Format::money($proposal->total_rent) }} @if ($proposal->rent_variance_percent === null) — @else {{ $proposal->rent_variance_percent > 0 ? '+' : '' }}{{ $proposal->rent_variance_percent }}% @endif {{ Format::percent($proposal->percentage_rent_percent) }} {{ Format::money($proposal->deposit_total) }} @if ($archived) — @else Forms @if (($proposal->forms_count ?? 0) > 0) {{ $proposal->forms_count }} @endif @endif {{ $proposal->status_label }} @if ($proposal->recommendation !== LeaseProposal::REC_PENDING)
{{ $proposal->recommendation_label }}
@endif
@if ($archived) @can(Permission::PROPOSAL_UPDATE)
@csrf
@endcan @else @can(Permission::PROPOSAL_UPDATE) @endcan @endif
No lease proposals recorded yet. @can(Permission::PROPOSAL_CREATE) Evaluate the first one. @endcan
@if ($proposals->hasPages()) @endif
@endsection