generated from liutk/owl-admin-base
Compare commits
No commits in common. "fb8de73aba70fd96ae1c5c33096e4da21e80263e" and "b9732088174894a445bf04e15ffc235f22bb1f9e" have entirely different histories.
fb8de73aba
...
b973208817
|
|
@ -17,11 +17,10 @@ class EmployeeController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
$this->createTypeButton('drawer', 'lg')->visible($user->can('admin.hr.employees.create')),
|
$this->createTypeButton('drawer', 'lg')->visible(Admin::user()->can('admin.hr.employees.create')),
|
||||||
...$this->baseHeaderToolBar(),
|
...$this->baseHeaderToolBar(),
|
||||||
$this->exportAction(true)->visible($user->can('admin.hr.employees.export')),
|
$this->exportAction(true)->visible($user->can('admin.hr.employees.export')),
|
||||||
])
|
])
|
||||||
|
|
@ -45,16 +44,16 @@ class EmployeeController extends AdminController
|
||||||
amisMake()->TableColumn()->name('remarks')->label(__('employee.remarks')),
|
amisMake()->TableColumn()->name('remarks')->label(__('employee.remarks')),
|
||||||
amis()->TableColumn()->name('is_sign')->label(__('employee.is_sign'))->type('switch'),
|
amis()->TableColumn()->name('is_sign')->label(__('employee.is_sign'))->type('switch'),
|
||||||
$this->rowActions([
|
$this->rowActions([
|
||||||
$this->rowShowButton()->visible($user->can('admin.hr.employees.view')),
|
$this->rowShowButton()->visible(Admin::user()->can('admin.hr.employees.view')),
|
||||||
$this->rowEditTypeButton('drawer', 'lg')->visible($user->can('admin.hr.employees.update')),
|
$this->rowEditTypeButton('drawer', 'lg')->visible(Admin::user()->can('admin.hr.employees.update')),
|
||||||
$this->rowDeleteButton()->visible($user->can('admin.hr.employees.delete')),
|
$this->rowDeleteButton()->visible(Admin::user()->can('admin.hr.employees.delete')),
|
||||||
amisMake()->AjaxAction()
|
amisMake()->AjaxAction()
|
||||||
->label(__('employee.leave'))
|
->label(__('employee.leave'))
|
||||||
->level('link')
|
->level('link')
|
||||||
->icon('fa fa-sign-out')
|
->icon('fa fa-sign-out')
|
||||||
->confirmText(__('employee.leave_confirm'))
|
->confirmText(__('employee.leave_confirm'))
|
||||||
->api('post:'.admin_url('hr/employees/${id}/leave'))
|
->api('post:'.admin_url('hr/employees/${id}/leave'))
|
||||||
->visible($user->can('admin.hr.employees.leave'))
|
->visible(Admin::user()->can('admin.hr.employees.leave'))
|
||||||
->visibleOn('${employee_status == '.EmployeeStatus::Online->value.'}'),
|
->visibleOn('${employee_status == '.EmployeeStatus::Online->value.'}'),
|
||||||
amisMake()->AjaxAction()
|
amisMake()->AjaxAction()
|
||||||
->label(__('employee.reback'))
|
->label(__('employee.reback'))
|
||||||
|
|
@ -62,7 +61,7 @@ class EmployeeController extends AdminController
|
||||||
->icon('fa fa-sign-out')
|
->icon('fa fa-sign-out')
|
||||||
->confirmText(__('employee.leave_confirm'))
|
->confirmText(__('employee.leave_confirm'))
|
||||||
->api('post:'.admin_url('hr/employees/${id}/leave'))
|
->api('post:'.admin_url('hr/employees/${id}/leave'))
|
||||||
->visible($user->can('admin.hr.employees.leave'))
|
->visible(Admin::user()->can('admin.hr.employees.leave'))
|
||||||
->visibleOn('${employee_status == '.EmployeeStatus::Offline->value.'}'),
|
->visibleOn('${employee_status == '.EmployeeStatus::Offline->value.'}'),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class HolidayController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class OfficalBusinessController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class OvertimeController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ class PromotionController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class SignController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ class SignRepairController extends AdminController
|
||||||
|
|
||||||
public function list(): Page
|
public function list(): Page
|
||||||
{
|
{
|
||||||
$user = Admin::user();
|
|
||||||
$crud = $this->baseCRUD()
|
$crud = $this->baseCRUD()
|
||||||
->tableLayout('fixed')
|
->tableLayout('fixed')
|
||||||
->headerToolbar([
|
->headerToolbar([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue