瀏覽代碼

fix: create transaction

Muhammad Iqbal Afandi 3 年之前
父節點
當前提交
d1f2724197
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      app/Http/Controllers/TransactionController.php

+ 3
- 3
app/Http/Controllers/TransactionController.php 查看文件

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,