This commit is contained in:
Ludovic CANDELLIER
2022-04-13 23:49:48 +02:00
parent 6e133246cf
commit 9c2b9cf02e
56 changed files with 948 additions and 336 deletions

View File

@@ -9,18 +9,24 @@ class Botanic
{
public function make(Builder $menu)
{
$menu->add('Botanique', [ 'permission' => 'backend_access', 'icon' => 'leaf' ])
$menu->add('Botanique', ['icon' => 'leaf' ])
->id('botanic')
->activeIfRoute('botanic')
->order(5);
$menu->addTo('botanic', 'Familles', [ 'route' => 'Admin.Botanic.Families.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Families.*'])->order(1);
$menu->addTo('botanic', 'Genres', [ 'route' => 'Admin.Botanic.Genres.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Genres.*'])->order(2);
$menu->addTo('botanic', 'Espèces', [ 'route' => 'Admin.Botanic.Species.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Species.*'])->order(3);
$menu->addTo('botanic', 'Variétés', [ 'route' => 'Admin.Botanic.Varieties.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Varieties.*'])->order(4);
$menu->addTo('botanic', 'Familles', [
'route' => 'Admin.Botanic.Families.index',
])->activeIfRoute(['Admin.Botanic.Families.*'])->order(1);
$menu->addTo('botanic', 'Genres', [
'route' => 'Admin.Botanic.Genres.index',
])->activeIfRoute(['Admin.Botanic.Genres.*'])->order(2);
$menu->addTo('botanic', 'Espèces', [
'route' => 'Admin.Botanic.Species.index',
])->activeIfRoute(['Admin.Botanic.Species.*'])->order(3);
$menu->addTo('botanic', 'Variétés', [
'route' => 'Admin.Botanic.Varieties.index',
])->activeIfRoute(['Admin.Botanic.Varieties.*'])->order(4);
}
}

View File

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

View File

@@ -8,24 +8,16 @@ class Deliveries
{
public function make(Builder $menu)
{
$menu->add('Modes de vente', [
'permission' => 'backend_access',
'icon' => 'address-card'
])
$menu->add('Modes de vente', ['icon' => 'store'])
->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);
])->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);
])->activeIfRoute(['Admin.Shop.Deliveries.*'])->order(1);
}
}

View File

@@ -8,18 +8,24 @@ class Orders
{
public function make(Builder $menu)
{
$menu->add('Commandes', [ 'permission' => 'backend_access', 'icon' => 'shopping-basket' ])
$menu->add('Commandes', ['icon' => 'shopping-basket'])
->id('orders')
->activeIfRoute('orders')
->order(1);
$menu->addTo('orders', 'Commandes', [ 'route' => 'Admin.Shop.Orders.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Orders.*'])->order(1);
$menu->addTo('orders', 'Factures', [ 'route' => 'Admin.Shop.Invoices.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Invoices.*'])->order(2);
$menu->addTo('orders', 'Avoirs', [ 'route' => 'Admin.Shop.Invoices.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Invoices.*'])->order(3);
$menu->addTo('orders', 'Bons de livraison', [ 'route' => 'Admin.Shop.Invoices.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Invoices.*'])->order(4);
$menu->addTo('orders', 'Commandes', [
'route' => 'Admin.Shop.Orders.index',
])->activeIfRoute(['Admin.Shop.Orders.*'])->order(1);
$menu->addTo('orders', 'Factures', [
'route' => 'Admin.Shop.Invoices.index',
])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(2);
$menu->addTo('orders', 'Avoirs', [
'route' => 'Admin.Shop.Invoices.index',
])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(3);
$menu->addTo('orders', 'Bons de livraison', [
'route' => 'Admin.Shop.Invoices.index',
])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(4);
}
}

View File

@@ -8,43 +8,57 @@ class Shop
{
public function make(Builder $menu)
{
$menu->add('En vente', [ 'permission' => 'backend_access', 'icon' => 'store' ])
$menu->add('En vente', ['icon' => 'shopping-cart' ])
->id('shop')
->activeIfRoute('shop')
->order(2);
$menu->addTo('shop', 'Articles', [ 'route' => 'Admin.Shop.Articles.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Articles.*'])->order(1);
$menu->addTo('shop', 'Déclinaisons', [ 'route' => 'Admin.Shop.Variations.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Variations.*'])->order(2);
$menu->addTo('shop', 'Tarifs', [ 'route' => 'Admin.Shop.Tariffs.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Tariffs.*'])->order(3);
$menu->addTo('shop', 'Offres', [ 'route' => 'Admin.Shop.Offers.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Offers.*'])->order(4);
$menu->addTo('shop', 'Articles', [
'route' => 'Admin.Shop.Articles.index',
])->activeIfRoute(['Admin.Shop.Articles.*'])->order(1);
$menu->addTo('shop', 'Déclinaisons', [
'route' => 'Admin.Shop.Variations.index',
])->activeIfRoute(['Admin.Shop.Variations.*'])->order(2);
$menu->addTo('shop', 'Tarifs', [
'route' => 'Admin.Shop.Tariffs.index',
])->activeIfRoute(['Admin.Shop.Tariffs.*'])->order(3);
$menu->addTo('shop', 'Offres', [
'route' => 'Admin.Shop.Offers.index',
])->activeIfRoute(['Admin.Shop.Offers.*'])->order(4);
$menu->addTo('shop', 'Rayons', [ 'route' => 'Admin.Shop.Categories.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Categories.*'])->order(6);
$menu->addTo('shop', 'Rayons', [
'route' => 'Admin.Shop.Categories.index',
])->activeIfRoute(['Admin.Shop.Categories.*'])->order(6);
$menu->addTo('shop', 'Tags', [ 'route' => 'Admin.Shop.Tags.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Tags.*'])->order(8);
$menu->addTo('shop', 'Tags', [
'route' => 'Admin.Shop.Tags.index',
])->activeIfRoute(['Admin.Shop.Tags.*'])->order(8);
$menu->addTo('shop', 'Groupes de tags', [ 'route' => 'Admin.Shop.TagGroups.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.TagGroups.*'])->order(8);
$menu->addTo('shop', 'Groupes de tags', [
'route' => 'Admin.Shop.TagGroups.index',
])->activeIfRoute(['Admin.Shop.TagGroups.*'])->order(8);
$menu->addTo('shop', 'Natures d\'articles', [ 'route' => 'Admin.Shop.ArticleNatures.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.ArticleNatures.*'])->order(9);
$menu->addTo('shop', 'Natures d\'articles', [
'route' => 'Admin.Shop.ArticleNatures.index',
])->activeIfRoute(['Admin.Shop.ArticleNatures.*'])->order(9);
$menu->addTo('shop', 'Packages', [ 'route' => 'Admin.Shop.Packages.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Packages.*'])->order(12);
$menu->addTo('shop', 'Packages', [
'route' => 'Admin.Shop.Packages.index',
])->activeIfRoute(['Admin.Shop.Packages.*'])->order(12);
$menu->addTo('shop', 'Unités de tarifs', [ 'route' => 'Admin.Shop.TariffUnities.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.TariffUnities.*'])->order(13);
$menu->addTo('shop', 'Unités de tarifs', [
'route' => 'Admin.Shop.TariffUnities.index',
])->activeIfRoute(['Admin.Shop.TariffUnities.*'])->order(13);
$menu->addTo('shop', 'Unités', [ 'route' => 'Admin.Shop.Unities.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Unities.*'])->order(14);
$menu->addTo('shop', 'Accueil', [ 'route' => 'Admin.Shop.Homepages.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Homepages.*'])->order(14);
$menu->addTo('shop', 'Unités', [
'route' => 'Admin.Shop.Unities.index',
])->activeIfRoute(['Admin.Shop.Unities.*'])->order(14);
$menu->addTo('shop', 'Accueil', [
'route' => 'Admin.Shop.Homepages.index',
])->activeIfRoute(['Admin.Shop.Homepages.*'])->order(14);
}
}