diff --git a/app/Http/Controllers/PetiController.php b/app/Http/Controllers/PetiController.php index 968e411..69b8349 100644 --- a/app/Http/Controllers/PetiController.php +++ b/app/Http/Controllers/PetiController.php @@ -34,25 +34,35 @@ class PetiController extends Controller $search = $request->input('search') ?? ''; if ($search) { $query->where(function ($q) use ($search) { - $q->where('fix_lot', 'like', "%$search%") - ->orWhere('created_by', 'like', "%$search%") + $q->where('fix_lot', 'like', "%$search%") // mencari fix lot + // ->orWhere('created_by', 'like', "%$search%") ->orWhereHas('customer', function ($customerQuery) use ($search) { - $customerQuery->where('name', 'like', "%$search%") - ->orWhere('code_customer', 'like', "%$search%") - ->orWhere('lot_no', 'like', "%$search%"); + $customerQuery->where('name', 'like', "%$search%") //mencari nama customer + ->orWhere('code_customer', 'like', "%$search%") //mencari kode customer + ->orWhere('lot_no', 'like', "%$search%"); //mencari lot no }) ->orWhereHas('warehouse', function ($warehouseQuery) use ($search) { - $warehouseQuery->where('name', 'like', "%$search%"); + $warehouseQuery->where('name', 'like', "%$search%"); //mencari nama gudang }) ->orWhereHas('tipe_peti', function ($tipePetiQuery) use ($search) { - $tipePetiQuery->where('type', 'like', "%$search%") - ->orWhere('size_peti', 'like', "%$search%"); + $tipePetiQuery->where('type', 'like', "%$search%") //mencari type + ->orWhere('size_peti', 'like', "%$search%"); //mencari ukuran peti }) ->orWhereHas('kondisipeti', function ($kondisiPetiQuery) use ($search) { - $kondisiPetiQuery->where('nama_kondisi', 'like', "%$search%"); + $kondisiPetiQuery->where('nama_kondisi', 'like', "%$search%"); //mencari nama kondisi }) - ->orWhere('packing_no', 'like', "%$search%") - ->orWhere('status', 'like', "%$search%"); + ->orWhere(function ($statusQuery) use ($search) { + if (strtolower($search) === 'ada') { + $statusQuery->where('status_isi', 1); + } elseif (strtolower($search) === 'tidak ada') { + $statusQuery->where('status_isi', 0); + } else { + $statusQuery->where('status_isi', 'like', "%$search%"); + } + }) //mencari status isi ADA atau TIDAK ADA + ->orWhere('warna', 'like', "%$search%") + ->orWhere('packing_no', 'like', "%$search%"); //mencari packing no + // ->orWhere('status', 'like', "%$search%"); }); } diff --git a/resources/views/dashboard/Master_Data/Customer/index.blade.php b/resources/views/dashboard/Master_Data/Customer/index.blade.php index 0ddbc89..a9c94fd 100644 --- a/resources/views/dashboard/Master_Data/Customer/index.blade.php +++ b/resources/views/dashboard/Master_Data/Customer/index.blade.php @@ -18,8 +18,6 @@ href="#">Import Data Customer Export Data Customer - {{-- - Something else here --}} diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php index 5aee097..1a16936 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php @@ -12,7 +12,6 @@ @include('layouts.components.alert-prompt') @if (auth()->user()->role_id == 1) -
- @elseif(auth()->user()->role_id == 2) diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index 9293828..3fc1291 100644 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -67,9 +67,9 @@ aria-labelledby="headingHistory" data-parent="#accordionSidebar">
Peminjaman + href="{{ route('dashboard.history.historyPeminjaman') }}">Peti Out Pengembalian + href="{{ route('dashboard.history.historyPengembalian') }}">Peti In Transfer
diff --git a/resources/views/pages/layouts/sidebar_user.blade.php b/resources/views/pages/layouts/sidebar_user.blade.php index 18486cd..bcc08c4 100644 --- a/resources/views/pages/layouts/sidebar_user.blade.php +++ b/resources/views/pages/layouts/sidebar_user.blade.php @@ -65,9 +65,9 @@ aria-labelledby="headingHistory" data-parent="#accordionSidebar">
Peminjaman + href="{{ route('dashboard.history.historyPeminjaman') }}">Peti Out Pengembalian + href="{{ route('dashboard.history.historyPengembalian') }}">Peti In Transfer
diff --git a/resources/views/pages/user/Master_Data/Customer/index.blade.php b/resources/views/pages/user/Master_Data/Customer/index.blade.php index 82909ba..a57ee09 100644 --- a/resources/views/pages/user/Master_Data/Customer/index.blade.php +++ b/resources/views/pages/user/Master_Data/Customer/index.blade.php @@ -12,7 +12,7 @@ No - Nama + Nama Customer Kode Customer No. Telepon Alamat @@ -31,7 +31,6 @@ {{ $data_customer->address }} @empty -

Data Kosong

@endforelse diff --git a/resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php b/resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php index 330765e..d988aac 100644 --- a/resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php +++ b/resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php @@ -37,34 +37,45 @@ No + Fix Lot - User Customer - GD Kode Customer Tipe Peti Ukuran Peti Lot No - Kondisi Peti Packing No - Status + GD + Kondisi Peti + Isi Peti + Warna Peti @forelse ($peti as $data_peti) {{ $i++ }} + + {{ $data_peti->fix_lot }} - {{ $data_peti->created_by }} {{ $data_peti->customer->name }} - {{ $data_peti->warehouse->name }} {{ $data_peti->customer->code_customer }} {{ $data_peti->tipe_peti->type }} {{ $data_peti->tipe_peti->size_peti }} {{ $data_peti->customer->lot_no }} - {{ $data_peti->kondisipeti->nama_kondisi }} {{ $data_peti->packing_no }} - {{ $data_peti->status }} + {{ $data_peti->warehouse->name }} + {{ $data_peti->kondisipeti->nama_kondisi }} + + @if ($data_peti->status_isi == 1) + ADA + @elseif($data_peti->status_isi == 0) + TIDAK ADA + @else + TIDAK ADA + @endif + + {{ $data_peti->warna }} @empty diff --git a/resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php b/resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php index 7ef10b0..b4f9b31 100644 --- a/resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php +++ b/resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php @@ -20,15 +20,13 @@ @php $nokondisi = 1; @endphp - @forelse ($kondisiPeti as $data_kondisiPeti) + @foreach ($kondisiPeti as $data_kondisiPeti) {{ $nokondisi++ }} {{ $data_kondisiPeti->nama_kondisi }} {{ $data_kondisiPeti->deskripsi_kondisi }} - @empty -

Data Kosong

- @endforelse + @endforeach diff --git a/resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php b/resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php index 1725ed0..0b88324 100644 --- a/resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php +++ b/resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php @@ -29,7 +29,6 @@ {{ $data_typepeti->description }} @empty -

Data Kosong

@endforelse diff --git a/resources/views/pages/user/Master_Data/Warehouse/index.blade.php b/resources/views/pages/user/Master_Data/Warehouse/index.blade.php index 240c1cc..8f623f6 100644 --- a/resources/views/pages/user/Master_Data/Warehouse/index.blade.php +++ b/resources/views/pages/user/Master_Data/Warehouse/index.blade.php @@ -17,7 +17,6 @@ Nama Gudang Deskripsi Alamat - {{-- Action --}} diff --git a/resources/views/pages/user/dashboard/disposal/index.blade.php b/resources/views/pages/user/dashboard/disposal/index.blade.php index d0f1306..6b2888d 100644 --- a/resources/views/pages/user/dashboard/disposal/index.blade.php +++ b/resources/views/pages/user/dashboard/disposal/index.blade.php @@ -34,6 +34,7 @@ @endforelse +