浏览代码

fix bug

3.x
Andrew Wallo 4 个月前
父节点
当前提交
cf42dd47e9

+ 1
- 3
app/Filament/Company/Resources/Purchases/VendorResource.php 查看文件

@@ -220,9 +220,7 @@ class VendorResource extends Resource
220 220
                 ]),
221 221
             ])
222 222
             ->bulkActions([
223
-                Tables\Actions\BulkActionGroup::make([
224
-                    Tables\Actions\DeleteBulkAction::make(),
225
-                ]),
223
+                //
226 224
             ]);
227 225
     }
228 226
 

+ 1
- 3
app/Filament/Company/Resources/Sales/ClientResource.php 查看文件

@@ -309,9 +309,7 @@ class ClientResource extends Resource
309 309
                 ]),
310 310
             ])
311 311
             ->bulkActions([
312
-                Tables\Actions\BulkActionGroup::make([
313
-                    Tables\Actions\DeleteBulkAction::make(),
314
-                ]),
312
+                //
315 313
             ]);
316 314
     }
317 315
 

+ 65
- 0
app/Policies/ClientPolicy.php 查看文件

@@ -0,0 +1,65 @@
1
+<?php
2
+
3
+namespace App\Policies;
4
+
5
+use App\Models\Common\Client;
6
+use App\Models\User;
7
+
8
+class ClientPolicy
9
+{
10
+    /**
11
+     * Determine whether the user can view any models.
12
+     */
13
+    public function viewAny(User $user): bool
14
+    {
15
+        return true;
16
+    }
17
+
18
+    /**
19
+     * Determine whether the user can view the model.
20
+     */
21
+    public function view(User $user, Client $client): bool
22
+    {
23
+        return true;
24
+    }
25
+
26
+    /**
27
+     * Determine whether the user can create models.
28
+     */
29
+    public function create(User $user): bool
30
+    {
31
+        return true;
32
+    }
33
+
34
+    /**
35
+     * Determine whether the user can update the model.
36
+     */
37
+    public function update(User $user, Client $client): bool
38
+    {
39
+        return true;
40
+    }
41
+
42
+    /**
43
+     * Determine whether the user can delete the model.
44
+     */
45
+    public function delete(User $user, Client $client): bool
46
+    {
47
+        return false;
48
+    }
49
+
50
+    /**
51
+     * Determine whether the user can restore the model.
52
+     */
53
+    public function restore(User $user, Client $client): bool
54
+    {
55
+        return false;
56
+    }
57
+
58
+    /**
59
+     * Determine whether the user can permanently delete the model.
60
+     */
61
+    public function forceDelete(User $user, Client $client): bool
62
+    {
63
+        return false;
64
+    }
65
+}

+ 65
- 0
app/Policies/VendorPolicy.php 查看文件

@@ -0,0 +1,65 @@
1
+<?php
2
+
3
+namespace App\Policies;
4
+
5
+use App\Models\Common\Vendor;
6
+use App\Models\User;
7
+
8
+class VendorPolicy
9
+{
10
+    /**
11
+     * Determine whether the user can view any models.
12
+     */
13
+    public function viewAny(User $user): bool
14
+    {
15
+        return true;
16
+    }
17
+
18
+    /**
19
+     * Determine whether the user can view the model.
20
+     */
21
+    public function view(User $user, Vendor $client): bool
22
+    {
23
+        return true;
24
+    }
25
+
26
+    /**
27
+     * Determine whether the user can create models.
28
+     */
29
+    public function create(User $user): bool
30
+    {
31
+        return true;
32
+    }
33
+
34
+    /**
35
+     * Determine whether the user can update the model.
36
+     */
37
+    public function update(User $user, Vendor $client): bool
38
+    {
39
+        return true;
40
+    }
41
+
42
+    /**
43
+     * Determine whether the user can delete the model.
44
+     */
45
+    public function delete(User $user, Vendor $client): bool
46
+    {
47
+        return false;
48
+    }
49
+
50
+    /**
51
+     * Determine whether the user can restore the model.
52
+     */
53
+    public function restore(User $user, Vendor $client): bool
54
+    {
55
+        return false;
56
+    }
57
+
58
+    /**
59
+     * Determine whether the user can permanently delete the model.
60
+     */
61
+    public function forceDelete(User $user, Vendor $client): bool
62
+    {
63
+        return false;
64
+    }
65
+}

正在加载...
取消
保存