@extends('layouts.app') @section('content')
{{ $project?->name }} › Units

Units

@forelse($units as $u) @php $map = ['available'=>'green','reserved'=>'yellow','booked'=>'blue','transferred'=>'purple','cancelled'=>'red']; $c = $map[$u->status] ?? 'gray'; $cls = match($c){'green'=>'bg-green-100 text-green-700','yellow'=>'bg-yellow-100 text-yellow-700','blue'=>'bg-blue-100 text-blue-700','purple'=>'bg-purple-100 text-purple-700','red'=>'bg-red-100 text-red-700',default=>'bg-gray-100 text-gray-700'}; @endphp @empty @endforelse
Unit # Phase Category Size Base Price Total Price Status Actions
{{ $u->unit_number }} {{ $u->phase?->name }} {{ $u->unitCategory?->name }} {{ $u->size_sqft }} {{ number_format($u->base_price,2) }} {{ number_format($u->total_price,2) }}{{ ucfirst($u->status) }} Edit
@csrf @method('DELETE')
No units
{{ $units->links() }}
@endsection