@@ -1,12 +0,0 @@ | |||
/* | |||
* Welcome to your app's main JavaScript file! | |||
* | |||
* We recommend including the built version of this JavaScript file | |||
* (and its CSS file) in your base layout (base.html.twig). | |||
*/ | |||
// any CSS you import will output into a single css file (app.css in this case) | |||
import './styles/app.css'; | |||
// start the Stimulus application | |||
import './bootstrap'; |
@@ -10,6 +10,4 @@ import './common.scss'; | |||
import './common.js'; | |||
// start the Stimulus application | |||
//import './bootstrap'; | |||
alert('Yo !') ; | |||
//import './bootstrap'; |
@@ -1,11 +0,0 @@ | |||
import { startStimulusApp } from '@symfony/stimulus-bridge'; | |||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | |||
export const app = startStimulusApp(require.context( | |||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | |||
true, | |||
/\.(j|t)sx?$/ | |||
)); | |||
// register any custom, 3rd party controllers here | |||
// app.register('some_controller_name', SomeImportedController); |
@@ -1,3 +0,0 @@ | |||
body { | |||
background-color: lightgray; | |||
} |
@@ -21,5 +21,7 @@ | |||
"watch": "encore dev --watch", | |||
"build": "encore production --progress" | |||
}, | |||
"dependencies": {} | |||
"dependencies": { | |||
"adminlte": "^2.4.1" | |||
} | |||
} |
@@ -8,16 +8,32 @@ use App\Entity\Site\Page; | |||
use App\Entity\User\GroupUser; | |||
use App\Entity\User\User; | |||
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets; | |||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |||
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem; | |||
use Lc\SovBundle\Controller\Admin\DashboardController as LcDashboardController; | |||
class DashboardController extends LcDashboardController | |||
{ | |||
public function configureAssets(): Assets | |||
public function configureMenuItems(): iterable | |||
{ | |||
$submenuUser = [ | |||
MenuItem::linkToCrud('Utilisateurs', '', User::class), | |||
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class), | |||
]; | |||
yield MenuItem::linkToDashboard('Tableau de bord', 'circle'); | |||
yield MenuItem::subMenu('Utilisateurs', 'user')->setSubItems($submenuUser); | |||
yield MenuItem::linkToCrud('Pages', 'copy', Page::class); | |||
yield MenuItem::linkToCrud('TVA', 'circle', TaxRate::class); | |||
/* | |||
MenuItem::section('Blog'), | |||
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class), | |||
MenuItem::linkToCrud('Blog Posts', 'fa fa-file-text', BlogPost::class), | |||
return parent::configureAssets(); // TODO: Change the autogenerated stub | |||
MenuItem::section('Users'), | |||
MenuItem::linkToCrud('Comments', 'fa fa-comment', Comment::class), | |||
MenuItem::linkToCrud('Users', 'fa fa-user', User::class),*/ | |||
} | |||
/*public function configureMenuItems(): iterable | |||
@@ -111,26 +127,4 @@ class DashboardController extends LcDashboardController | |||
yield MenuItem::linkToCrud('Statuts de commande', 'fas fa-shopping-basket', OrderStatus::class)->setPermission('ROLE_SUPER_ADMIN'); | |||
*/ | |||
public function configureMenuItems(): iterable | |||
{ | |||
$submenuUser = [ | |||
MenuItem::linkToCrud('Utilisateurs', '', User::class), | |||
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class), | |||
]; | |||
yield MenuItem::linkToDashboard('Tableau de bord', 'home'); | |||
yield MenuItem::subMenu('Utilisateurs', 'users')->setSubItems($submenuUser); | |||
yield MenuItem::linkToCrud('Pages', 'tags', Page::class); | |||
yield MenuItem::linkToCrud('TVA', 'user', TaxRate::class); | |||
/* | |||
MenuItem::section('Blog'), | |||
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class), | |||
MenuItem::linkToCrud('Blog Posts', 'fa fa-file-text', BlogPost::class), | |||
MenuItem::section('Users'), | |||
MenuItem::linkToCrud('Comments', 'fa fa-comment', Comment::class), | |||
MenuItem::linkToCrud('Users', 'fa fa-user', User::class),*/ | |||
} | |||
} |
@@ -19,12 +19,6 @@ class PageCrudController extends AbstractCrudController | |||
return Page::class; | |||
} | |||
public function configureAssets(Assets $assets): Assets | |||
{ | |||
$assets->addWebpackEncoreEntry('tabler') ; | |||
return parent::configureAssets($assets); // TODO: Change the autogenerated stub | |||
} | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
return [ |
@@ -17,12 +17,18 @@ Encore | |||
//.setManifestKeyPrefix('build/') | |||
.enableSassLoader() | |||
.addAliases({ | |||
'adminlte': path.resolve(__dirname, './node_modules/admin-lte/dist/js/adminlte.min.js'), | |||
'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery'), | |||
'adminlte-js': path.resolve(__dirname, 'node_modules/admin-lte/dist/js/adminlte.min.js'), | |||
'adminlte-css': path.resolve(__dirname, 'node_modules/admin-lte/dist/css/adminlte.min.css'), | |||
'fontawesome-css': path.resolve(__dirname, 'node_modules/admin-lte/plugins/fontawesome-free/css/all.css'), | |||
/*'adminlte': path.resolve(__dirname, './node_modules/admin-lte/dist/js/adminlte.min.js'), | |||
'adminltePlugin': path.resolve(__dirname, './node_modules/admin-lte/plugins/'), | |||
'admin-lte-css': path.resolve(__dirname, './node_modules/admin-lte/dist/css/adminlte.css'), | |||
'core-js': path.resolve(__dirname, './node_modules/core-js'), | |||
'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery'), | |||
'select2': path.join(__dirname, 'node_modules/select2/dist/js/select2.js'), | |||
'select2-css': path.join(__dirname, 'node_modules/select2/dist/css/select2.min.css'), | |||
'select2-css': path.join(__dirname, 'node_modules/select2/dist/css/select2.min.css'),*/ | |||
//'select2-bootstrap-theme': path.join(__dirname, 'node_modules/select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme.min.css') | |||
}) | |||
@@ -34,8 +40,8 @@ Encore | |||
*/ | |||
//.addEntry('backend-common', './assets/apps/backend/common/app.common.js') | |||
//.addEntry('jquery', './node_modules/jquery/dist/jquery.slim.js') | |||
.addEntry('common', './Lc/SovBundle/Resources/assets/apps/common/app.common.js') | |||
.addEntry('tabler', './Lc/SovBundle/Resources/assets/apps/tabler/app.tabler.js') | |||
.addEntry('backend-common', './Lc/SovBundle/Resources/assets/apps/backend-common/app.common.js') | |||
//.addEntry('tabler', './Lc/SovBundle/Resources/assets/apps/tabler/app.tabler.js') | |||
//.addEntry('easyadmin', './vendor/easycorp/easyadmin-bundle/assets/js/app.js') | |||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) |