6
0
Fork 0
jiqu-library-server/app/Admin/Actions/Grid/WalletToBankLogVerify.php

45 lines
1004 B
PHP

<?php
namespace App\Admin\Actions\Grid;
use App\Admin\Forms\WalletToBankLogVerify as WalletToBankLogVerifyForm;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Widgets\Modal;
class WalletToBankLogVerify extends RowAction
{
/**
* @return string
*/
protected $title = '<i class="feather icon-shuffle grid-action-icon"></i>';
public function title()
{
if ($this->title) {
return $this->title.'&nbsp;审核';
}
return '审核';
}
/**
* @param Model|Authenticatable|HasPermissions|null $user
*
* @return bool
*/
protected function authorize($user): bool
{
return $user->can('dcat.admin.wallet_to_bank_logs.verify');
}
public function render()
{
$form = WalletToBankLogVerifyForm::make()->payload(['id'=>$this->getKey()]);
return Modal::make()
->lg()
->title($this->title())
->body($form)
->button($this->title());
}
}