|
@@ -38,8 +38,8 @@ class DistAdminUserController extends AdminController
|
|
$grid->column('id')->sortable();
|
|
$grid->column('id')->sortable();
|
|
$grid->column('username');
|
|
$grid->column('username');
|
|
$grid->column('name');
|
|
$grid->column('name');
|
|
- $grid->column('distributor.company_name','Company Name');
|
|
|
|
- $grid->column('distributor.level_domain','Level Domain');
|
|
|
|
|
|
+ $grid->column('distributor.company_name',admin_trans_label('company_name'));
|
|
|
|
+ $grid->column('distributor.level_domain',admin_trans_label('level_domain'));
|
|
$grid->column('language')->using(config('dictionary.languages'));
|
|
$grid->column('language')->using(config('dictionary.languages'));
|
|
$grid->column('enabled')->switch();
|
|
$grid->column('enabled')->switch();
|
|
$grid->column('created_at');
|
|
$grid->column('created_at');
|
|
@@ -49,9 +49,9 @@ class DistAdminUserController extends AdminController
|
|
$filter->panel();
|
|
$filter->panel();
|
|
$filter->expand();
|
|
$filter->expand();
|
|
$filter->equal('username')->width(2);
|
|
$filter->equal('username')->width(2);
|
|
- $filter->equal('name','name')->width(2);
|
|
|
|
- $filter->like('distributor.company_name', 'Company Name')->width(2);
|
|
|
|
- $filter->equal('enabled', 'enabled')->select(config('dictionary.enabled'))->width(2);
|
|
|
|
|
|
+ $filter->equal('name',)->width(2);
|
|
|
|
+ $filter->like('distributor.company_name', admin_trans_label('company_name'))->width(2);
|
|
|
|
+ $filter->equal('enabled', )->select(config('dictionary.enabled'))->width(2);
|
|
});
|
|
});
|
|
//排序
|
|
//排序
|
|
$grid->model()->orderBy("id",'desc');
|
|
$grid->model()->orderBy("id",'desc');
|
|
@@ -77,7 +77,7 @@ class DistAdminUserController extends AdminController
|
|
$show->row(function ($show) {
|
|
$show->row(function ($show) {
|
|
$show->width(6)->field('id');
|
|
$show->width(6)->field('id');
|
|
$show->width(6)->field('username');
|
|
$show->width(6)->field('username');
|
|
- $show->width(6)->field('name','name');
|
|
|
|
|
|
+ $show->width(6)->field('name');
|
|
$show->width(6)->field('language')->using(config('dictionary.languages'));
|
|
$show->width(6)->field('language')->using(config('dictionary.languages'));
|
|
$show->width(6)->field('enabled')->using(config('dictionary.enabled'));
|
|
$show->width(6)->field('enabled')->using(config('dictionary.enabled'));
|
|
$show->width(6)->field('created_at');
|
|
$show->width(6)->field('created_at');
|
|
@@ -86,20 +86,20 @@ class DistAdminUserController extends AdminController
|
|
|
|
|
|
|
|
|
|
$show->row(function ($show) {
|
|
$show->row(function ($show) {
|
|
- $show->width(6)->field('distributor.company_name', 'Company Name');
|
|
|
|
- $show->width(6)->field('distributor.company_address','Company Address');
|
|
|
|
- $show->width(6)->field('distributor.site_name','Site Name');
|
|
|
|
- $show->width(6)->field('distributor.level_domain','Level Domain');
|
|
|
|
- $show->width(6)->field('distributor.country','Country');
|
|
|
|
- $show->width(6)->field('distributor.contact_number','Contact Number');
|
|
|
|
- $show->width(6)->field('distributor.service_hotline','Service Hotline');
|
|
|
|
|
|
+ $show->width(6)->field('distributor.company_name', admin_trans_label('company_name'));
|
|
|
|
+ $show->width(6)->field('distributor.company_address',admin_trans_label('company_address'));
|
|
|
|
+ $show->width(6)->field('distributor.site_name',admin_trans_label('site_name'));
|
|
|
|
+ $show->width(6)->field('distributor.level_domain',admin_trans_label('level_domain'));
|
|
|
|
+ $show->width(6)->field('distributor.country',admin_trans_label('country'));
|
|
|
|
+ $show->width(6)->field('distributor.contact_number',admin_trans_label('contact_number'));
|
|
|
|
+ $show->width(6)->field('distributor.service_hotline',admin_trans_label('service_hotline'));
|
|
$show->width(6)->field('distributor.whats_app','whatsApp');
|
|
$show->width(6)->field('distributor.whats_app','whatsApp');
|
|
$show->width(6)->field('distributor.facebook','Facebook');
|
|
$show->width(6)->field('distributor.facebook','Facebook');
|
|
$show->width(6)->field('distributor.instagram','Instagram');
|
|
$show->width(6)->field('distributor.instagram','Instagram');
|
|
$show->width(6)->field('distributor.youtube','Youtube');
|
|
$show->width(6)->field('distributor.youtube','Youtube');
|
|
$show->width(6)->field('distributor.linkedin','Linkedin');
|
|
$show->width(6)->field('distributor.linkedin','Linkedin');
|
|
$show->width(6)->field('distributor.tiktok','Tiktok');
|
|
$show->width(6)->field('distributor.tiktok','Tiktok');
|
|
- $show->width(6)->field('distributor.remark','Remark');
|
|
|
|
|
|
+ $show->width(6)->field('distributor.remark',admin_trans_label('remark'));
|
|
});
|
|
});
|
|
|
|
|
|
// 按钮
|
|
// 按钮
|
|
@@ -120,9 +120,9 @@ class DistAdminUserController extends AdminController
|
|
$form->password('password')->customFormat(function ($v) {
|
|
$form->password('password')->customFormat(function ($v) {
|
|
return "";
|
|
return "";
|
|
});
|
|
});
|
|
- $form->text('name','name')->required();
|
|
|
|
|
|
+ $form->text('name',)->required();
|
|
$form->select('language')->options(config('dictionary.languages'))->required();
|
|
$form->select('language')->options(config('dictionary.languages'))->required();
|
|
- $form->selectTable('dist_id', 'Select Distributor')
|
|
|
|
|
|
+ $form->selectTable('dist_id', admin_trans_label('distributor'))
|
|
->title('distId')
|
|
->title('distId')
|
|
->from(DistDistributorTable::make());
|
|
->from(DistDistributorTable::make());
|
|
$form->switch('enabled')->default(1);
|
|
$form->switch('enabled')->default(1);
|