From ff118f64a69bbf8de5063d5845d26ed6acc99280 Mon Sep 17 00:00:00 2001 From: Kayn Ty Date: Thu, 24 May 2018 15:48:49 +0200 Subject: [PATCH] astuce texte --- .../views/logged/angular/listing-products.html.twig | 4 +++- app/Resources/views/product/index.html.twig | 8 ++++++++ assets/css/pages/_dashboard.scss | 2 +- assets/js/parts/caisseCtrl.js | 0 assets/js/parts/main.js | 8 ++++++-- src/AppBundle/Controller/FestivalController.php | 1 + 6 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 assets/js/parts/caisseCtrl.js diff --git a/app/Resources/views/logged/angular/listing-products.html.twig b/app/Resources/views/logged/angular/listing-products.html.twig index 0574578e..4eacaaab 100755 --- a/app/Resources/views/logged/angular/listing-products.html.twig +++ b/app/Resources/views/logged/angular/listing-products.html.twig @@ -1,6 +1,7 @@ {% verbatim %} +
-
+

{{ c.name }} @@ -26,5 +27,6 @@ +

{% endverbatim %} diff --git a/app/Resources/views/product/index.html.twig b/app/Resources/views/product/index.html.twig index c0e992d3..5575ac08 100755 --- a/app/Resources/views/product/index.html.twig +++ b/app/Resources/views/product/index.html.twig @@ -5,7 +5,15 @@

Produits

+ Nouveau produit + + astuce: Utilisez + + l'import de masse + + pour créer plusieurs produits et catégories à la fois +
diff --git a/assets/css/pages/_dashboard.scss b/assets/css/pages/_dashboard.scss index 9c0eb42c..a5f5daa9 100755 --- a/assets/css/pages/_dashboard.scss +++ b/assets/css/pages/_dashboard.scss @@ -3,7 +3,7 @@ display: inline-block; margin-right: 1rem; margin-bottom: 1rem; - width: 50%; + width: 100%; } .product-button { width: 80%; diff --git a/assets/js/parts/caisseCtrl.js b/assets/js/parts/caisseCtrl.js new file mode 100644 index 00000000..e69de29b diff --git a/assets/js/parts/main.js b/assets/js/parts/main.js index fe3500fc..7f8e9913 100755 --- a/assets/js/parts/main.js +++ b/assets/js/parts/main.js @@ -1,6 +1,5 @@ // require('../../../node_modules/canvasjs/dist/canvasjs.3'); - var $ = require('jquery'); // JS is equivalent to the normal "bootstrap" package // no need to set this to a variable, just require it @@ -15,6 +14,7 @@ $(document).ready(function () { console.log('hello console for main.js'); var stuff = ['initialstuff']; + angular .module('caisse', []) .controller('CaisseCtrl', ['$scope', '$http', function ($scope, $http, stuff) { @@ -137,6 +137,10 @@ angular }); }; + /** + * sell one product, assuming the client has the right amount of money + * @param product + */ $scope.expressSell = function (product) { $scope.addProduct(product); $scope.sendForm(); @@ -144,7 +148,7 @@ angular $scope.recentId = 0; $scope.logger = function (stuff) { console.log('logger', stuff); - } + }; $scope.sendForm = function () { console.log('$scope.sellingComment', this.sellingComment); let lesParams = { diff --git a/src/AppBundle/Controller/FestivalController.php b/src/AppBundle/Controller/FestivalController.php index 232d5cfe..cb983a21 100755 --- a/src/AppBundle/Controller/FestivalController.php +++ b/src/AppBundle/Controller/FestivalController.php @@ -46,6 +46,7 @@ class FestivalController extends Controller { if ( $form->isSubmitted() && $form->isValid() ) { $em = $this->getDoctrine()->getManager(); $em->persist( $festival ); + $em->persist( $this->getUser() ); $em->flush(); return $this->redirectToRoute( 'festival_show', [ 'id' => $festival->getId() ] );