Refactoring, change menu, add many features

This commit is contained in:
Ludovic CANDELLIER
2021-10-30 02:22:51 +02:00
parent fae7b7897f
commit e356b3fcda
158 changed files with 1114 additions and 412 deletions

View File

@@ -12,7 +12,7 @@ class Botanic
$menu->add('Botanique', [ 'permission' => 'backend_access', 'icon' => 'leaf' ])
->id('botanic')
->activeIfRoute('botanic')
->order(4);
->order(5);
$menu->addTo('botanic', 'Familles', [ 'route' => 'Admin.Botanic.Families.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Families.*'])->order(1);

View File

@@ -8,15 +8,13 @@ class Customers
{
public function make(Builder $menu)
{
$menu->add('Clients', [ 'permission' => 'backend_access', 'icon' => 'address-card' ])
$menu->add('Clients finaux', [ 'permission' => 'backend_access', 'icon' => 'address-card' ])
->id('customers')
->activeIfRoute('customers')
->order(3);
->order(4);
$menu->addTo('customers', __('customer.customers.name'), [ 'route' => 'Admin.Shop.Customers.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Customers.*'])->order(1);
$menu->addTo('customers', __('customer.sale_channels.name'), [ 'route' => 'Admin.Shop.SaleChannels.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.SaleChannels.*'])->order(1);
}
}
}

22
app/Menu/Deliveries.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
namespace App\Menu;
use Sebastienheyd\Boilerplate\Menu\Builder;
class Deliveries
{
public function make(Builder $menu)
{
$menu->add('Modes de vente', [ 'permission' => 'backend_access', 'icon' => 'address-card' ])
->id('sales_mode')
->activeIfRoute('sales_mode')
->order(3);
$menu->addTo('sales_mode', __('shop.sale_channels.name'), [ 'route' => 'Admin.Shop.SaleChannels.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.SaleChannels.*'])->order(1);
$menu->addTo('sales_mode', __('shop.deliveries.title'), [ 'route' => 'Admin.Shop.Deliveries.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Deliveries.*'])->order(1);
}
}