@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{ $title_menu ?? 'Barang' }}
{{-- Filter & Search Form --}}
{{-- Re-bind change event for select2 if standard onchange doesn't trigger --}}
{{-- Grid Catalog --}}
@forelse($items as $item) @php // Kumpulkan semua gambar dari array JSON gambar_json $imgList = []; if (isset($item->gambar_json) && !empty($item->gambar_json)) { $decoded = json_decode($item->gambar_json, true); if (is_array($decoded)) { foreach ($decoded as $img) { if (!empty($img) && $img !== 'noimage.png') { $imgList[] = $img; } } } } else { // Fallback ke metode lama jika gambar_json kosong/null (opsional untuk keamanan) $imgFields = ['gambar', 'gambar2', 'gambar3', 'gambar4']; foreach ($imgFields as $f) { if (isset($item->$f) && !empty($item->$f) && $item->$f !== 'noimage.png') { $imgList[] = $item->$f; } } } $imgCount = count($imgList); $itemId = $item->kode_baru; @endphp
{{-- Image Section (Carousel / Clickable) --}} {{-- Content Section --}}
{{ $item->kode_baru }} @if(!empty($item->tipe)) {{ strtoupper($item->tipe) }} @endif
{{ $item->nama }}
{{ $item->nama_kategori ?? '-' }} {{ $item->lokasi ?? '-' }}
Tags: @if(!empty($item->tags)) @php $itemTags = explode(',', $item->tags); @endphp @foreach($itemTags as $tg) @if(trim($tg) != '') {{ trim($tg) }} @endif @endforeach @else - @endif
{{-- Hidden data container for modal --}} @empty
Tidak ada barang ditemukan

Coba gunakan kata kunci atau filter tag yang lain.

@endforelse
{{-- Pagination --}}
{{-- CSS override untuk mencegah pagination meluber dan fixing text glitch --}} {{ $items->links('pagination::bootstrap-5') }}
{{-- ============================================== --}} {{-- MODAL ZOOM GAMBAR (CAROUSEL BOOTSTRAP 5) --}} {{-- ============================================== --}} {{-- ============================================== --}} {{-- BOTTOM SHEET DETAIL BARANG --}} {{-- ============================================== --}}
{{-- Handle bar --}}
{{-- Header --}}
-
-
{{-- Content --}}
{{-- Image Carousel --}} {{-- Info Grid --}}
Kode Lama
-
Jenis
-
Kategori
-
Nama Label
-
Satuan
-
Lokasi
-
{{-- Stok Section --}}
Informasi Stok
0
Stok
0
Min Stok
-
Buffer
{{-- Status & Tags --}}
Status
-
Tags
-
{{-- Bottom Sheet CSS --}} @endsection @push('js') @endpush