放开用户规则展示
This commit is contained in:
@@ -140,20 +140,18 @@ class IndexController extends AdminController
|
|||||||
return $this->parent ? $this->parent->nickname : '---';
|
return $this->parent ? $this->parent->nickname : '---';
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($user->id == 1) {
|
$grid->column('分润规则')->display(function ($title, $column) {
|
||||||
$grid->column('分润规则')->display(function ($title, $column) {
|
return '点击展开';
|
||||||
return '点击展开';
|
})->modal(function ($model) {
|
||||||
})->modal(function ($model) {
|
if ($model->code) {
|
||||||
if ($model->code) {
|
$codes = $model->code->map(function ($code) {
|
||||||
$codes = $model->code->map(function ($code) {
|
return $code->only(['name', 'code', 'profit']);
|
||||||
return $code->only(['name', 'code', 'profit']);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
return new Table(['名称', '规则项', '分润金额(元)'], $codes->toArray());
|
return new Table(['名称', '规则项', '分润金额(元)'], $codes->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
$grid->column('created_at', '注册时间');
|
$grid->column('created_at', '注册时间');
|
||||||
$grid->disableExport(false);
|
$grid->disableExport(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user