fixed languages

This commit is contained in:
Edward Yang 2022-08-05 19:09:12 +08:00
parent fd88d859aa
commit ba53d3f844
29 changed files with 75 additions and 39 deletions

View File

@ -67,7 +67,7 @@ class PermissionRepo
*/
private function getOrderPermissions(): array
{
$routes = ['orders_index', 'orders_create', 'orders_edit', 'orders_update', 'orders_delete'];
$routes = ['orders_index', 'orders_create', 'orders_show', 'orders_update', 'orders_delete'];
$items = $this->getPermissionList('order', $routes);
return hook_filter('role.order_permissions', $items);
}
@ -80,7 +80,7 @@ class PermissionRepo
*/
private function getProductPermissions(): array
{
$routes = ['products_index', 'products_create', 'products_edit', 'products_update', 'products_delete', 'products_trashed'];
$routes = ['products_index', 'products_create', 'products_show', 'products_update', 'products_delete', 'products_trashed'];
$items = $this->getPermissionList('product', $routes);
return hook_filter('role.product_permissions', $items);
}
@ -93,7 +93,7 @@ class PermissionRepo
*/
private function getCategoryPermissions(): array
{
$routes = ['categories_index', 'categories_create', 'categories_edit', 'categories_update', 'categories_delete'];
$routes = ['categories_index', 'categories_create', 'categories_show', 'categories_update', 'categories_delete'];
$items = $this->getPermissionList('category', $routes);
return hook_filter('role.category_permissions', $items);
}
@ -106,7 +106,7 @@ class PermissionRepo
*/
private function getBrandPermissions(): array
{
$routes = ['brands_index', 'brands_create', 'brands_edit', 'brands_update', 'brands_delete'];
$routes = ['brands_index', 'brands_create', 'brands_show', 'brands_update', 'brands_delete'];
$items = $this->getPermissionList('brand', $routes);
return hook_filter('role.brand_permissions', $items);
}
@ -119,7 +119,7 @@ class PermissionRepo
*/
private function getCustomerPermissions(): array
{
$routes = ['customers_index', 'customers_create', 'customers_edit', 'customers_update', 'customers_delete'];
$routes = ['customers_index', 'customers_create', 'customers_show', 'customers_update', 'customers_delete'];
$items = $this->getPermissionList('customer', $routes);
return hook_filter('role.customer_permissions', $items);
}
@ -132,7 +132,7 @@ class PermissionRepo
*/
private function getCustomerGroupPermissions(): array
{
$routes = ['customer_groups_index', 'customer_groups_create', 'customer_groups_edit', 'customer_groups_update', 'customer_groups_delete'];
$routes = ['customer_groups_index', 'customer_groups_create', 'customer_groups_show', 'customer_groups_update', 'customer_groups_delete'];
$items = $this->getPermissionList('customer_group', $routes);
return hook_filter('role.customer_group_permissions', $items);
}
@ -158,7 +158,7 @@ class PermissionRepo
*/
private function getPluginPermissions(): array
{
$routes = ['plugins_index', 'plugins_import', 'plugins_update', 'plugins_edit', 'plugins_install', 'plugins_update_status', 'plugins_uninstall'];
$routes = ['plugins_index', 'plugins_import', 'plugins_update', 'plugins_show', 'plugins_install', 'plugins_update_status', 'plugins_uninstall'];
$items = $this->getPermissionList('plugin', $routes);
return hook_filter('role.plugin_permissions', $items);
}
@ -171,7 +171,7 @@ class PermissionRepo
*/
private function getAdminUserPermissions()
{
$routes = ['admin_users_index', 'admin_users_create', 'admin_users_edit', 'admin_users_update', 'admin_users_delete'];
$routes = ['admin_users_index', 'admin_users_create', 'admin_users_show', 'admin_users_update', 'admin_users_delete'];
$items = $this->getPermissionList('user', $routes);
return hook_filter('role.user_permissions', $items);
}
@ -184,7 +184,7 @@ class PermissionRepo
*/
private function getRegionPermissions(): array
{
$routes = ['regions_index', 'regions_create', 'regions_edit', 'regions_update', 'regions_delete'];
$routes = ['regions_index', 'regions_create', 'regions_show', 'regions_update', 'regions_delete'];
$items = $this->getPermissionList('region', $routes);
return hook_filter('role.region_permissions', $items);
}
@ -197,7 +197,7 @@ class PermissionRepo
*/
private function getTaxRatePermissions(): array
{
$routes = ['tax_rates_index', 'tax_rates_create', 'tax_rates_edit', 'tax_rates_update', 'tax_rates_delete'];
$routes = ['tax_rates_index', 'tax_rates_create', 'tax_rates_show', 'tax_rates_update', 'tax_rates_delete'];
$items = $this->getPermissionList('tax_rate', $routes);
return hook_filter('role.tax_rate_permissions', $items);
}
@ -210,7 +210,7 @@ class PermissionRepo
*/
private function getTaxClassPermissions(): array
{
$routes = ['tax_classes_index', 'tax_classes_create', 'tax_classes_edit', 'tax_classes_update', 'tax_classes_delete'];
$routes = ['tax_classes_index', 'tax_classes_create', 'tax_classes_show', 'tax_classes_update', 'tax_classes_delete'];
$items = $this->getPermissionList('tax_class', $routes);
return hook_filter('role.tax_class_permissions', $items);
}
@ -223,7 +223,7 @@ class PermissionRepo
*/
private function getCurrencyPermissions(): array
{
$routes = ['currencies_index', 'currencies_create', 'currencies_edit', 'currencies_update', 'currencies_delete'];
$routes = ['currencies_index', 'currencies_create', 'currencies_show', 'currencies_update', 'currencies_delete'];
$items = $this->getPermissionList('currency', $routes);
return hook_filter('role.currency_permissions', $items);
}
@ -236,7 +236,7 @@ class PermissionRepo
*/
private function getLanguagePermissions(): array
{
$routes = ['languages_index', 'languages_create', 'languages_edit', 'languages_update', 'languages_delete'];
$routes = ['languages_index', 'languages_create', 'languages_show', 'languages_update', 'languages_delete'];
$items = $this->getPermissionList('language', $routes);
return hook_filter('role.language_permissions', $items);
}

View File

@ -62,7 +62,7 @@ Route::prefix($adminName)
// 订单
Route::middleware('can:orders_index')->get('orders', [Controllers\OrderController::class, 'index'])->name('orders.index');
Route::middleware('can:orders_show')->get('orders/{order}/edit', [Controllers\OrderController::class, 'edit'])->name('orders.show');
Route::middleware('can:orders_show')->get('orders/{order}', [Controllers\OrderController::class, 'show'])->name('orders.show');
Route::get('plugins', [Controllers\PluginController::class, 'index'])->name('plugins.index');
Route::post('plugins/import', [Controllers\PluginController::class, 'import'])->name('plugins.import');

View File

@ -12,7 +12,7 @@
return [
'brands_index' => 'Index',
'brands_create' => 'Create',
'brands_edit' => 'Detail',
'brands_show' => 'Detail',
'brands_update' => 'Edit',
'brands_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'categories_index' => 'Index',
'categories_create' => 'Create',
'categories_edit' => 'Detail',
'categories_show' => 'Detail',
'categories_update' => 'Edit',
'categories_delete' => 'Delete'
];

View File

@ -13,7 +13,7 @@ return [
'thousand_point' => ',',
'currencies_index' => 'Index',
'currencies_create' => 'Create',
'currencies_edit' => 'Detail',
'currencies_show' => 'Detail',
'currencies_update' => 'Edit',
'currencies_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'customers_index' => 'Index',
'customers_create' => 'Create',
'customers_edit' => 'Detail',
'customers_show' => 'Detail',
'customers_update' => 'Edit',
'customers_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'customer_groups_index' => 'Index',
'customer_groups_create' => 'Create',
'customer_groups_edit' => 'Detail',
'customer_groups_show' => 'Detail',
'customer_groups_update' => 'Edit',
'customer_groups_delete' => 'Delete'
];

View File

@ -13,7 +13,7 @@ return [
'customer_view' => 'Customer View',
'order_total' => 'Order Total',
'customer_new' => 'Customer New',
'order_amount' => 'Order Smount',
'order_amount' => 'Order Amount',
'yesterday' => 'Yesterday',
'day_before' => 'A day earlier',
];

View File

@ -0,0 +1,18 @@
<?php
/**
* order.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-08-02 14:22:41
* @modified 2022-08-02 14:22:41
*/
return [
'languages_index' => 'Index',
'languages_create' => 'Create',
'languages_show' => 'Detail',
'languages_update' => 'Update',
'languages_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'orders_index' => 'Index',
'orders_create' => 'Create',
'orders_edit' => 'Detail',
'orders_show' => 'Detail',
'orders_update' => 'Update',
'orders_delete' => 'Delete',
];

View File

@ -12,7 +12,7 @@
return [
'plugins_index' => 'Index',
'plugins_import' => 'Import',
'plugins_edit' => 'Detail',
'plugins_show' => 'Detail',
'plugins_update' => 'Update',
'plugins_update_status' => 'Delete',
'plugins_install' => 'Install',

View File

@ -12,7 +12,7 @@
return [
'products_index' => 'Index',
'products_create' => 'Create',
'products_edit' => 'Detail',
'products_show' => 'Detail',
'products_update' => 'Edit',
'products_delete' => 'Delete',
'products_trashed' => 'Trashed',

View File

@ -12,7 +12,7 @@
return [
'regions_index' => 'Index',
'regions_create' => 'Create',
'regions_edit' => 'Detail',
'regions_show' => 'Detail',
'regions_update' => 'Edit',
'regions_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'tax_classes_index' => 'Index',
'tax_classes_create' => 'Create',
'tax_classes_edit' => 'Detail',
'tax_classes_show' => 'Detail',
'tax_classes_update' => 'Edit',
'tax_classes_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'tax_rates_index' => 'Index',
'tax_rates_create' => 'Create',
'tax_rates_edit' => 'Detail',
'tax_rates_show' => 'Detail',
'tax_rates_update' => 'Edit',
'tax_rates_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'admin_users_index' => 'Index',
'admin_users_create' => 'Create',
'admin_users_edit' => 'Detail',
'admin_users_show' => 'Detail',
'admin_users_update' => 'Edit',
'admin_users_delete' => 'Delete'
];

View File

@ -12,7 +12,7 @@
return [
'brands_index' => '品牌列表',
'brands_create' => '创建品牌',
'brands_edit' => '品牌详情',
'brands_show' => '品牌详情',
'brands_update' => '更新品牌',
'brands_delete' => '删除品牌'
];

View File

@ -12,7 +12,7 @@
return [
'categories_index' => '分类列表',
'categories_create' => '创建分类',
'categories_edit' => '分类详情',
'categories_show' => '分类详情',
'categories_update' => '更新分类',
'categories_delete' => '删除分类',
];

View File

@ -13,7 +13,7 @@ return [
'thousand_point' => ',',
'currencies_index' => '货币列表',
'currencies_create' => '创建货币',
'currencies_edit' => '货币详情',
'currencies_show' => '货币详情',
'currencies_update' => '更新货币',
'currencies_delete' => '删除货币',
];

View File

@ -12,7 +12,7 @@
return [
'customers_index' => '客户列表',
'customers_create' => '创建客户',
'customers_edit' => '客户详情',
'customers_show' => '客户详情',
'customers_update' => '更新客户',
'customers_delete' => '删除客户',
];

View File

@ -12,7 +12,7 @@
return [
'customer_groups_index' => '客户组列表',
'customer_groups_create' => '创建客户组',
'customer_groups_edit' => '客户组详情',
'customer_groups_show' => '客户组详情',
'customer_groups_update' => '更新客户组',
'customer_groups_delete' => '删除客户组',
];

View File

@ -0,0 +1,18 @@
<?php
/**
* order.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-08-02 14:22:41
* @modified 2022-08-02 14:22:41
*/
return [
'languages_index' => '品牌列表',
'languages_create' => '创建品牌',
'languages_show' => '品牌详情',
'languages_update' => '更新品牌',
'languages_delete' => '删除品牌'
];

View File

@ -12,7 +12,7 @@
return [
'orders_index' => '订单列表',
'orders_create' => '创建订单',
'orders_edit' => '订单详情',
'orders_show' => '订单详情',
'orders_update' => '更新订单',
'orders_delete' => '删除订单',
];

View File

@ -12,7 +12,7 @@
return [
'plugins_index' => '插件列表',
'plugins_import' => '上传插件',
'plugins_edit' => '插件详情',
'plugins_show' => '插件详情',
'plugins_update' => '插件更新',
'plugins_update_status' => '删除插件',
'plugins_install' => '安装',

View File

@ -12,7 +12,7 @@
return [
'products_index' => '产品列表',
'products_create' => '创建产品',
'products_edit' => '产品详情',
'products_show' => '产品详情',
'products_update' => '更新产品',
'products_delete' => '删除产品',
'products_trashed' => '回收站',

View File

@ -12,7 +12,7 @@
return [
'regions_index' => '区域组列表',
'regions_create' => '创建区域组',
'regions_edit' => '区域组详情',
'regions_show' => '区域组详情',
'regions_update' => '更新区域组',
'regions_delete' => '删除区域组',
];

View File

@ -12,7 +12,7 @@
return [
'tax_classes_index' => '税类列表',
'tax_classes_create' => '创建税类',
'tax_classes_edit' => '税类详情',
'tax_classes_show' => '税类详情',
'tax_classes_update' => '更新税类',
'tax_classes_delete' => '删除税类',
];

View File

@ -12,7 +12,7 @@
return [
'tax_rates_index' => '税率列表',
'tax_rates_create' => '创建税率',
'tax_rates_edit' => '税率详情',
'tax_rates_show' => '税率详情',
'tax_rates_update' => '更新税率',
'tax_rates_delete' => '删除税率',
];

View File

@ -12,7 +12,7 @@
return [
'admin_users_index' => '用户列表',
'admin_users_create' => '创建用户',
'admin_users_edit' => '用户详情',
'admin_users_show' => '用户详情',
'admin_users_update' => '更新用户',
'admin_users_delete' => '删除用户',
];