Browse Source

fix: create transaction

Muhammad Iqbal Afandi 3 years ago
parent
commit
d1f2724197
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/Http/Controllers/TransactionController.php

+ 3
- 3
app/Http/Controllers/TransactionController.php View File

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