@extends('layouts.app') @section('title', 'Sewa - INUFA') @section('header', 'Sewa Paket Sound System') @section('content')
@if(count($pakets) > 0)
@foreach($pakets as $paket)

{{ $paket->nama_paket }}

@if($paket->image) {{ $paket->nama_paket }} @else
@endif @php $activeSewa = $paket->sewas()->whereIn('status', ['confirmed', 'ongoing'])->count(); @endphp @if($activeSewa > 0)

Sedang Disewa

Stok tersedia: {{ $paket->stok - $activeSewa }}

@endif
Harga Sewa: Rp {{ number_format($paket->harga, 0, ',', '.') }}/hari
Jenis Paket: {{ ucfirst($paket->jenis_paket) }}
@if($paket->minimum_order)
Minimum Order: {{ $paket->minimum_order }} hari
@endif
Stok: {{ $paket->stok - $activeSewa }} tersedia
@if($paket->keterangan)

{{ $paket->keterangan }}

@endif
@if($activeSewa >= $paket->stok) @else Sewa Sekarang @endif
@endforeach
@else

Tidak Ada Paket Tersedia

Saat ini tidak ada paket yang tersedia untuk disewa.

@if(auth()->check() && auth()->user()->role === 'admin') Tambah Paket Baru @endif
@endif
@endsection