Fix on AdminLTE 3, and add some features

This commit is contained in:
Ludovic CANDELLIER
2020-05-09 01:05:55 +02:00
parent d0e3bb6251
commit 86a073cad7
27 changed files with 670 additions and 95 deletions

View File

@@ -3,33 +3,31 @@
namespace App\Menu;
use Sebastienheyd\Boilerplate\Menu\Builder;
use App\Repositories\Users;
class Shop
{
public function make(Builder $menu)
{
$menu->add('Commerce', [ 'permission' => 'backend_access', 'icon' => 'shopping-basket' ])
$menu->add('Catalogue', [ 'permission' => 'backend_access', 'icon' => 'store' ])
->id('shop')
->activeIfRoute('shop')
->order(1);
->order(2);
$menu->addTo('shop', 'Categories', [ 'route' => 'Shop.Admin.Categories.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Categories.*'])->order(1);
$menu->addTo('shop', 'Articles', [ 'route' => 'Shop.Admin.Articles.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Articles.*'])->order(2);
->activeIfRoute(['Shop.Admin.Articles.*'])->order(1);
$menu->addTo('shop', 'Categories', [ 'route' => 'Shop.Admin.Categories.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Categories.*'])->order(2);
$menu->addTo('shop', 'Familles d\'articles', [ 'route' => 'Shop.Admin.ArticleFamilies.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleFamilies.*'])->order(3);
$menu->addTo('shop', 'Familles d\'attributs', [ 'route' => 'Shop.Admin.ArticleAttributeFamilies.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleAttributeFamilies.*'])->order(4);
$menu->addTo('shop', 'Attributs', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(5);
$menu->addTo('shop', 'Réductions', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(6);
$menu->addTo('shop', 'Stock', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(7);
$menu->addTo('shop', 'Commandes', [ 'route' => 'Shop.Admin.Orders.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Orders.*'])->order(6);
$menu->addTo('shop', 'Factures', [ 'route' => 'Shop.Admin.Invoices.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Invoices.*'])->order(7);
}
}