@extends('layouts.admin') @section('title', 'Dashboard Admin - Barang Management') @section('content') @php $breadcrumbs = [ ['label' => 'Dashboard', 'url' => route('admin.dashboard')], ['label' => 'Master', 'url' => '#'], ['label' => 'Barang', 'url' => route('admin.master.materials.index')] ]; @endphp

Barang Management

@if (request('search')) @endif

Total Gabungan

{{ $totalItems ?? $combinedItems->total() }}

Aktif

{{ $activeItems ?? 0 }}

Stock Rendah

{{ $lowStockItems ?? 0 }}

Nonaktif

{{ $inactiveItems ?? 0 }}

@if (request('search') || request('type') || request()->has('status'))
Filter Aktif: @if (request('search')) Pencarian: "{{ request('search') }}" @endif @if (request('type')) Tipe: {{ request('type') === 'material' ? 'Material' : 'Sparepart' }} @endif @if (request()->has('status')) Status: {{ request('status') == '1' ? 'Aktif' : 'Nonaktif' }} @endif
@endif
Material Sparepart
@forelse ($combinedItems as $item) @empty @endforelse
No Gambar Kode Nama Tipe Brand No Part Stock Unit Harga Status Aksi
{{ $combinedItems->firstItem() + $loop->index }} @if($item['image_path']) {{ $item['name'] }} @else
@endif
{{ $item['code'] }}
{{ $item['name'] }} @if(($item['damaged_stock'] ?? 0) > 0) {{ number_format($item['damaged_stock'], 0, ',', '.') }} @endif
{{ ucfirst($item['type']) }} {{ $item['brand'] }} {{ $item['part_number'] }} {{ $item['stock'] }} {{ $item['unit'] }} Rp {{ number_format($item['price'], 0, ',', '.') }} {{ $item['is_active'] ? 'Aktif' : 'Nonaktif' }}
@csrf @method('DELETE')

Belum ada data gabungan

@if ($combinedItems->hasPages())
Menampilkan {{ $combinedItems->firstItem() }}{{ $combinedItems->lastItem() }} dari {{ $combinedItems->total() }} data
{{ $combinedItems->onEachSide(1)->links() }}
@endif
@endsection