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)
-
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
+