@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{-- Header Card --}}
List {{ $title_menu }}
@include('components.alert')

{{-- Tombol Tambah --}}
{{-- Tabel Data --}}
{{-- MODIFIKASI 1: Kolom Checkbox --}} @foreach ($table_header as $header) @continue($header->field === 'buffer_stok') @endforeach @foreach ($table_detail as $detail) @php $primary = ''; foreach ($table_primary as $p) { $primary == '' ? ($primary = $detail->{$p->field}) : ($primary = $primary . ':' . $detail->{$p->field}); } @endphp isactive == '0' ? 'class=not style=background-color:#ffe9ed;' : '' }}> {{-- 1. Checkbox --}} {{-- 2. Action Buttons --}} {{-- 3. Nomor Urut --}} {{-- 4. Kolom Dinamis (Kode, Nama, dll) --}} @foreach ($table_header as $field) @php $string = $field->field; @endphp @continue($string === 'buffer_stok') @endforeach @endforeach
Action No{{ $header->alias }}
{{-- TOMBOL VIEW --}} View
{{ $loop->iteration }} @if ($field->type == 'join') @if ($field->query != '') @php $query = $field->query . "'" . $detail->$string . "'"; $data_query = DB::select($query); @endphp @foreach ($data_query as $q)
Warning: Undefined variable $q in /opt/lampp/htdocs/tsiinventory/resources/views/master/msbrng/list.blade.php on line 143
{{ $sAsArray[0] != '' ? $sAsArray[0] : '' }} @endforeach @endif @elseif ($field->type == 'image') @if ($detail->$string) @php $galleryImages = []; if (!empty($detail->gambar_json)) { $decodedGallery = json_decode( $detail->gambar_json, true, ); if (is_array($decodedGallery)) { foreach ($decodedGallery as $galleryItem) { if (!empty($galleryItem)) { $galleryImages[] = (string) $galleryItem; } } } } if (!empty($detail->gambar)) { $galleryImages[] = (string) $detail->gambar; } if (!empty($detail->gambar2)) { $galleryImages[] = (string) $detail->gambar2; } if (!empty($detail->$string)) { $galleryImages[] = (string) $detail->$string; } $galleryImages = array_values( array_unique(array_filter($galleryImages)), ); @endphp Thumbnail @else No Image @endif @elseif (in_array(strtolower($string), ['stok', 'qty', 'aktual_stok', 'min_stok', 'max_stok', 'selisih'])) {{ (float) $detail->$string }} @else {{ $detail->$string }} @endif
{{-- MODIFIKASI 3: MODAL PRINT LABEL --}} {{-- MODAL PREVIEW GAMBAR --}} @endsection @push('css') @endpush @push('js') @php $selectedTipe = request('tipe_filter', 'sparepart'); $selectedStatus = request('status_filter', '1'); @endphp @if (Session::has('message') && Session::get('class') == 'danger') @endif @endpush