Unit Management

List all rental items across categories (iPhone and Gear).

@if(auth()->user()->role === 'admin') @if($activeTab === 'units') @else @endif @endif
@if($activeTab === 'units')
@foreach($units as $unit) @endforeach @if(count($units) == 0) @endif
Nama & Info Status Aksi
{{ $unit->seri }} @if($unit->category) {{ $unit->category->name }} @endif
@if($unit->imei)
{{ $unit->imei }}
@endif {{-- Specs + price shown only on mobile --}}
@if($unit->warna || $unit->memori)
{{ $unit->warna }} · {{ $unit->memori }}
@endif
Rp {{ number_format($unit->harga_per_hari, 0, ',', '.') }}/hari · Rp {{ number_format($unit->harga_per_jam, 0, ',', '.') }}/jam
@if($unit->trashed()) Terhapus @elseif($unit->is_active) Aktif @else Nonaktif @endif
@if($unit->trashed()) @if(auth()->user()->role === 'admin') {{-- Restore Button --}} {{-- Force Delete Button --}} @endif @else @if(auth()->user()->role === 'admin') @endif @endif
Belum ada data unit.
{{ $units->currentPage() }} / {{ $units->lastPage() }}
@else
@foreach($categories as $cat) @endforeach
Nama Kategori Slug / Icon Custom Fields Aksi
{{ $cat->name }} /{{ $cat->slug }} @if($cat->icon) {{ $cat->icon }} @endif @if($cat->custom_fields)
@foreach($cat->custom_fields as $field) {{ $field }} @endforeach
@else - @endif
{{ $categories->currentPage() }} / {{ $categories->lastPage() }}
@endif @if($showModal)

{{ $isEditing ? 'Edit Item Sewa' : 'Tambah Item Sewa Baru' }}

@php $selectedCat = $all_categories->find($category_id); $isIphone = $selectedCat && str_contains(strtolower($selectedCat->slug), 'iphone'); @endphp
@error('category_id') {{ $message }} @enderror
@error('seri') {{ $message }} @enderror
@if($isIphone)
@error('imei') {{ $message }} @enderror
@endif
@if($isIphone)
@error('memori') {{ $message }} @enderror
@error('warna') {{ $message }} @enderror
@endif
@if($selectedCat && $selectedCat->custom_fields && count($selectedCat->custom_fields) > 0)
@foreach($selectedCat->custom_fields as $fieldName)
@endforeach
@endif
@error('harga_per_jam') {{ $message }} @enderror
@error('harga_per_hari') {{ $message }} @enderror
@endif @if($showCatModal)

{{ $isEditingCat ? 'Edit Kategori' : 'Tambah Kategori Baru' }}

@error('cat_name') {{ $message }} @enderror
@error('cat_slug') {{ $message }} @enderror

Tentukan kolom spesifikasi tambahan untuk kategori ini.

@foreach($cat_fields as $index => $field)
@endforeach
@endif