Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvsuo-pc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhilin
lvsuo-pc
Commits
ca87c15c
Commit
ca87c15c
authored
Aug 21, 2025
by
liuyingkang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(Admin): 修复律师协约收入控制器权限问题
- 新增删除按钮权限检查,无权限时隐藏删除按钮 - 保持代码格式一致性,移除多余空行
parent
e87f4ccc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
app/Admin/Controllers/LawyerCovenantIncomeController.php
+7
-2
No files found.
app/Admin/Controllers/LawyerCovenantIncomeController.php
View file @
ca87c15c
...
...
@@ -24,7 +24,7 @@ protected function grid()
{
return
Grid
::
make
(
new
Covenant
(),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
whereNull
(
'deleted_at'
);
// 新增这行
$lawyerID
=
$grid
->
model
()
->
filter
()
->
input
(
'no'
)
??
''
;
//律师ID
if
(
$lawyerID
)
{
$grid
->
model
()
->
where
(
'lawyer_id'
,
$lawyerID
);
...
...
@@ -49,6 +49,11 @@ protected function grid()
$grid
->
disableEditButton
();
$grid
->
disableRowSelector
();
// 检查是否有删除权限,没有则隐藏删除按钮
if
(
!
Admin
::
user
()
->
can
(
'delete'
))
{
$grid
->
disableDeleteButton
();
}
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
// 更改为 panel 布局
$filter
->
panel
();
...
...
@@ -90,7 +95,7 @@ protected function grid()
$actions
->
append
(
'<a href="/view-covenant-invoiced?cid='
.
$cid
.
'" alt="查看开票" >查看开票</a>'
);
}
});
// 添加分页设置
$grid
->
paginate
(
50
);
// 默认每页50条
$grid
->
perPages
([
10
,
20
,
50
,
100
]);
// 可选分页大小
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment