@extends('layouts.admin') @section('title', 'Kelola Tenant – Beltway Office Park') @section('breadcrumb', 'Tenant Management') @section('content')
@if(request('search') || request('building_id') || request('status')) Reset @endif
Tambah Tenant
@forelse($tenants as $tenant) @php // Get allocations matching filters $allocations = $tenant->spaceAllocations; if (request('building_id')) { $allocations = $allocations->where('building_id', request('building_id')); } if (request('status')) { $allocations = $allocations->where('status', request('status')); } if ($allocations->isEmpty()) { $allocations = collect([null]); } @endphp @foreach($allocations as $alloc) @endforeach @empty @endforelse
Nama Tenant Gedung / Unit Jenis Usaha Status Kontrak Berakhir Aksi
{{ substr($tenant->company_name, 3, 2) ?: 'TN' }}
{{ $tenant->company_name }}
{{ $tenant->pic_name }} • {{ $tenant->email }}
@if($alloc && $alloc->building)
{{ $alloc->building->name }}
@if($alloc->building->name === 'Open Yard') Area Tanah - {{ $alloc->unit_number }} - {{ $alloc->area_size }}m² @elseif($alloc->building->name === 'Workshop') Area Workshop - {{ $alloc->unit_number }} - {{ $alloc->area_size }}m² @else Lt.{{ $alloc->floor_number }} - {{ $alloc->unit_number }} - {{ $alloc->area_size }}m² @endif
@else Belum dialokasi @endif
{{ $tenant->business_sector }} @if($alloc) @if($alloc->status === 'Kontrak Aktif') Kontrak Aktif @elseif($alloc->status === 'Kontrak Mendekati Berakhir') Kontrak Mendekati Berakhir @elseif($alloc->status === 'Hampir Berakhir') Hampir Berakhir @elseif($alloc->status === 'Kontrak Habis') Kontrak Habis @else Kosong @endif @else Tidak ada @endif @if($alloc && $alloc->lease_end) {{ \Carbon\Carbon::parse($alloc->lease_end)->format('Y-m-d') }} @else @endif
@csrf @method('DELETE')
Tidak ada data tenant ditemukan.
@if($tenants->hasPages())
{{ $tenants->links() }}
@endif
@endsection