Quellcode durchsuchen

fix: create transaction

Muhammad Iqbal Afandi vor 3 Jahren
Ursprung
Commit
d1f2724197
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3
    3
      app/Http/Controllers/TransactionController.php

+ 3
- 3
app/Http/Controllers/TransactionController.php Datei anzeigen

@@ -89,7 +89,7 @@ class TransactionController extends Controller
89 89
         return inertia('transaction/Create', [
90 90
             'transactionNumber' => 'TS' . now()->format('YmdHis'),
91 91
             'customers' => Inertia::lazy(
92
-                fn() => Customer::filter(request('customer'))
92
+                fn() => Customer::filter(['search' => request('customer')])
93 93
                     ->latest()
94 94
                     ->get()
95 95
                     ->transform(fn($customer) => [
@@ -101,7 +101,7 @@ class TransactionController extends Controller
101 101
             ),
102 102
             'discount' => Discount::first()->discount,
103 103
             'laundries' => Inertia::lazy(
104
-                fn() => Laundry::filter(request('laundry'))
104
+                fn() => Laundry::filter(['search' => request('laundry')])
105 105
                     ->latest()
106 106
                     ->get()
107 107
                     ->transform(fn($laundry) => [
@@ -112,7 +112,7 @@ class TransactionController extends Controller
112 112
                     ])
113 113
             ),
114 114
             'products' => Inertia::lazy(
115
-                fn() => Product::filter(request('product'))
115
+                fn() => Product::filter(['search' => request('product')])
116 116
                     ->get()
117 117
                     ->transform(fn($product) => [
118 118
                         'id' => $product->id,