From 8e4f494035972cedd6819b246af75a896fc2ad69 Mon Sep 17 00:00:00 2001 From: Kayn Ty Date: Tue, 17 Apr 2018 12:10:21 +0200 Subject: [PATCH] add debug for record --- .gitignore | 0 README.md | 0 app/.htaccess | 0 app/AppCache.php | 0 app/AppKernel.php | 0 .../FOSUserBundle/views/layout.html.twig | 0 .../Controller/ConnectController.php | 0 .../views/Connect/login.html.twig | 0 .../HWIOAuthBundle/views/layout.html.twig | 0 app/Resources/views/base.html.twig | 0 app/Resources/views/default/footer.html.twig | 0 app/Resources/views/default/header.html.twig | 0 app/Resources/views/default/index.html.twig | 0 .../views/default/login-choices.html.twig | 0 .../views/default/main-screen.html.twig | 0 app/Resources/views/festival/edit.html.twig | 0 app/Resources/views/festival/index.html.twig | 0 app/Resources/views/festival/new.html.twig | 0 app/Resources/views/festival/show.html.twig | 0 .../views/logged/angular/current.html.twig | 13 +- .../logged/angular/listing-products.html.twig | 4 + .../logged/angular/loaded-caisse.html.twig | 0 .../views/logged/angular/messages.html.twig | 0 .../views/logged/angular/paused.html.twig | 0 .../views/logged/angular/recent.html.twig | 0 .../views/logged/caisse-main.html.twig | 0 .../views/logged/dashboard.html.twig | 0 app/Resources/views/product/edit.html.twig | 0 app/Resources/views/product/new.html.twig | 0 app/Resources/views/product/show.html.twig | 0 .../views/productcategory/edit.html.twig | 0 .../views/productcategory/index.html.twig | 0 .../views/productcategory/new.html.twig | 0 .../views/productcategory/show.html.twig | 0 app/Resources/views/sellrecord/edit.html.twig | 0 .../views/sellrecord/index.html.twig | 0 app/Resources/views/sellrecord/new.html.twig | 0 app/Resources/views/sellrecord/show.html.twig | 0 app/config/config.yml | 0 app/config/config_dev.yml | 0 app/config/config_prod.yml | 0 app/config/config_test.yml | 0 app/config/parameters.yml.dist | 0 app/config/routing.yml | 0 app/config/routing_dev.yml | 0 app/config/security.yml | 0 app/config/services.yml | 0 assets/css/app.scss | 0 assets/css/pages/demo.scss | 0 assets/css/pages/global.scss | 1 + assets/css/pages/libs.scss | 0 assets/css/pages/responsive.scss | 0 assets/css/pages/special.scss | 0 assets/css/split/custom_vars.scss | 0 assets/css/split/formulaires.scss | 0 assets/js/app.js | 0 assets/js/parts/main.js | 13 +- composer.json | 0 composer.lock | 0 install.sh | 0 package.json | 0 phpunit.xml.dist | 0 src/.htaccess | 0 src/AppBundle/AppBundle.php | 0 .../Controller/DefaultController.php | 27 +-- .../Controller/FestivalController.php | 0 .../Controller/ProductCategoryController.php | 0 .../Controller/ProductController.php | 0 .../Controller/SellRecordController.php | 0 src/AppBundle/Entity/Festival.php | 32 ++- src/AppBundle/Entity/Festival.php~ | 150 +++++++++++++ src/AppBundle/Entity/Product.php | 0 src/AppBundle/Entity/Product.php~ | 98 +++++---- src/AppBundle/Entity/ProductCategory.php | 24 +++ src/AppBundle/Entity/ProductCategory.php~ | 47 ++++ src/AppBundle/Entity/ProductSold.php | 85 +++++--- src/AppBundle/Entity/ProductSold.php~ | 112 ++++++++++ src/AppBundle/Entity/SellRecord.php | 30 ++- src/AppBundle/Entity/SellRecord.php~ | 158 +++++++++++++- src/AppBundle/Entity/Stuff.php | 0 src/AppBundle/Entity/Stuff.php~ | 0 src/AppBundle/Entity/User.php | 82 +++++++ src/AppBundle/Entity/User.php~ | 202 +++++++++++++++++- src/AppBundle/Form/FestivalType.php | 0 src/AppBundle/Form/ProductCategoryType.php | 0 src/AppBundle/Form/ProductType.php | 0 src/AppBundle/Form/SellRecordType.php | 0 .../Repository/FestivalRepository.php | 0 .../Repository/ProductCategoryRepository.php | 0 .../Repository/ProductRepository.php | 0 .../Repository/SellRecordRepository.php | 0 src/AppBundle/Repository/StuffRepository.php | 0 src/AppBundle/Repository/UserRepository.php | 0 .../Controller/FestivalControllerTest.php | 0 .../ProductCategoryControllerTest.php | 0 .../Controller/ProductControllerTest.php | 0 .../Controller/SellRecordControllerTest.php | 0 src/AppBundle/Traits/Commentable.php | 0 src/AppBundle/Traits/Sellable.php | 0 src/Entity/User/User.php | 0 .../Controller/DefaultControllerTest.php | 0 var/SymfonyRequirements.php | 0 var/logs/.gitkeep | 0 web/.htaccess | 0 web/app.php | 0 web/app_dev.php | 0 web/apple-touch-icon.png | Bin web/bg.jpg | Bin web/config.php | 0 web/favicon.ico | Bin web/robots.txt | 0 webpack.config.js | 0 yarn.lock | 0 113 files changed, 977 insertions(+), 101 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 README.md mode change 100644 => 100755 app/.htaccess mode change 100644 => 100755 app/AppCache.php mode change 100644 => 100755 app/AppKernel.php mode change 100644 => 100755 app/Resources/FOSUserBundle/views/layout.html.twig mode change 100644 => 100755 app/Resources/HWIOAuthBundle/Controller/ConnectController.php mode change 100644 => 100755 app/Resources/HWIOAuthBundle/views/Connect/login.html.twig mode change 100644 => 100755 app/Resources/HWIOAuthBundle/views/layout.html.twig mode change 100644 => 100755 app/Resources/views/base.html.twig mode change 100644 => 100755 app/Resources/views/default/footer.html.twig mode change 100644 => 100755 app/Resources/views/default/header.html.twig mode change 100644 => 100755 app/Resources/views/default/index.html.twig mode change 100644 => 100755 app/Resources/views/default/login-choices.html.twig mode change 100644 => 100755 app/Resources/views/default/main-screen.html.twig mode change 100644 => 100755 app/Resources/views/festival/edit.html.twig mode change 100644 => 100755 app/Resources/views/festival/index.html.twig mode change 100644 => 100755 app/Resources/views/festival/new.html.twig mode change 100644 => 100755 app/Resources/views/festival/show.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/current.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/listing-products.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/loaded-caisse.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/messages.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/paused.html.twig mode change 100644 => 100755 app/Resources/views/logged/angular/recent.html.twig mode change 100644 => 100755 app/Resources/views/logged/caisse-main.html.twig mode change 100644 => 100755 app/Resources/views/logged/dashboard.html.twig mode change 100644 => 100755 app/Resources/views/product/edit.html.twig mode change 100644 => 100755 app/Resources/views/product/new.html.twig mode change 100644 => 100755 app/Resources/views/product/show.html.twig mode change 100644 => 100755 app/Resources/views/productcategory/edit.html.twig mode change 100644 => 100755 app/Resources/views/productcategory/index.html.twig mode change 100644 => 100755 app/Resources/views/productcategory/new.html.twig mode change 100644 => 100755 app/Resources/views/productcategory/show.html.twig mode change 100644 => 100755 app/Resources/views/sellrecord/edit.html.twig mode change 100644 => 100755 app/Resources/views/sellrecord/index.html.twig mode change 100644 => 100755 app/Resources/views/sellrecord/new.html.twig mode change 100644 => 100755 app/Resources/views/sellrecord/show.html.twig mode change 100644 => 100755 app/config/config.yml mode change 100644 => 100755 app/config/config_dev.yml mode change 100644 => 100755 app/config/config_prod.yml mode change 100644 => 100755 app/config/config_test.yml mode change 100644 => 100755 app/config/parameters.yml.dist mode change 100644 => 100755 app/config/routing.yml mode change 100644 => 100755 app/config/routing_dev.yml mode change 100644 => 100755 app/config/security.yml mode change 100644 => 100755 app/config/services.yml mode change 100644 => 100755 assets/css/app.scss mode change 100644 => 100755 assets/css/pages/demo.scss mode change 100644 => 100755 assets/css/pages/global.scss mode change 100644 => 100755 assets/css/pages/libs.scss mode change 100644 => 100755 assets/css/pages/responsive.scss mode change 100644 => 100755 assets/css/pages/special.scss mode change 100644 => 100755 assets/css/split/custom_vars.scss mode change 100644 => 100755 assets/css/split/formulaires.scss mode change 100644 => 100755 assets/js/app.js mode change 100644 => 100755 assets/js/parts/main.js mode change 100644 => 100755 composer.json mode change 100644 => 100755 composer.lock mode change 100644 => 100755 install.sh mode change 100644 => 100755 package.json mode change 100644 => 100755 phpunit.xml.dist mode change 100644 => 100755 src/.htaccess mode change 100644 => 100755 src/AppBundle/AppBundle.php mode change 100644 => 100755 src/AppBundle/Controller/DefaultController.php mode change 100644 => 100755 src/AppBundle/Controller/FestivalController.php mode change 100644 => 100755 src/AppBundle/Controller/ProductCategoryController.php mode change 100644 => 100755 src/AppBundle/Controller/ProductController.php mode change 100644 => 100755 src/AppBundle/Controller/SellRecordController.php mode change 100644 => 100755 src/AppBundle/Entity/Festival.php create mode 100755 src/AppBundle/Entity/Festival.php~ mode change 100644 => 100755 src/AppBundle/Entity/Product.php mode change 100644 => 100755 src/AppBundle/Entity/Product.php~ mode change 100644 => 100755 src/AppBundle/Entity/ProductCategory.php mode change 100644 => 100755 src/AppBundle/Entity/ProductCategory.php~ mode change 100644 => 100755 src/AppBundle/Entity/ProductSold.php create mode 100755 src/AppBundle/Entity/ProductSold.php~ mode change 100644 => 100755 src/AppBundle/Entity/SellRecord.php mode change 100644 => 100755 src/AppBundle/Entity/SellRecord.php~ mode change 100644 => 100755 src/AppBundle/Entity/Stuff.php mode change 100644 => 100755 src/AppBundle/Entity/Stuff.php~ mode change 100644 => 100755 src/AppBundle/Entity/User.php mode change 100644 => 100755 src/AppBundle/Entity/User.php~ mode change 100644 => 100755 src/AppBundle/Form/FestivalType.php mode change 100644 => 100755 src/AppBundle/Form/ProductCategoryType.php mode change 100644 => 100755 src/AppBundle/Form/ProductType.php mode change 100644 => 100755 src/AppBundle/Form/SellRecordType.php mode change 100644 => 100755 src/AppBundle/Repository/FestivalRepository.php mode change 100644 => 100755 src/AppBundle/Repository/ProductCategoryRepository.php mode change 100644 => 100755 src/AppBundle/Repository/ProductRepository.php mode change 100644 => 100755 src/AppBundle/Repository/SellRecordRepository.php mode change 100644 => 100755 src/AppBundle/Repository/StuffRepository.php mode change 100644 => 100755 src/AppBundle/Repository/UserRepository.php mode change 100644 => 100755 src/AppBundle/Tests/Controller/FestivalControllerTest.php mode change 100644 => 100755 src/AppBundle/Tests/Controller/ProductCategoryControllerTest.php mode change 100644 => 100755 src/AppBundle/Tests/Controller/ProductControllerTest.php mode change 100644 => 100755 src/AppBundle/Tests/Controller/SellRecordControllerTest.php mode change 100644 => 100755 src/AppBundle/Traits/Commentable.php mode change 100644 => 100755 src/AppBundle/Traits/Sellable.php mode change 100644 => 100755 src/Entity/User/User.php mode change 100644 => 100755 tests/AppBundle/Controller/DefaultControllerTest.php mode change 100644 => 100755 var/SymfonyRequirements.php mode change 100644 => 100755 var/logs/.gitkeep mode change 100644 => 100755 web/.htaccess mode change 100644 => 100755 web/app.php mode change 100644 => 100755 web/app_dev.php mode change 100644 => 100755 web/apple-touch-icon.png mode change 100644 => 100755 web/bg.jpg mode change 100644 => 100755 web/config.php mode change 100644 => 100755 web/favicon.ico mode change 100644 => 100755 web/robots.txt mode change 100644 => 100755 webpack.config.js mode change 100644 => 100755 yarn.lock diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/.htaccess b/app/.htaccess old mode 100644 new mode 100755 diff --git a/app/AppCache.php b/app/AppCache.php old mode 100644 new mode 100755 diff --git a/app/AppKernel.php b/app/AppKernel.php old mode 100644 new mode 100755 diff --git a/app/Resources/FOSUserBundle/views/layout.html.twig b/app/Resources/FOSUserBundle/views/layout.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/HWIOAuthBundle/Controller/ConnectController.php b/app/Resources/HWIOAuthBundle/Controller/ConnectController.php old mode 100644 new mode 100755 diff --git a/app/Resources/HWIOAuthBundle/views/Connect/login.html.twig b/app/Resources/HWIOAuthBundle/views/Connect/login.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/HWIOAuthBundle/views/layout.html.twig b/app/Resources/HWIOAuthBundle/views/layout.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/default/footer.html.twig b/app/Resources/views/default/footer.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/default/header.html.twig b/app/Resources/views/default/header.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/default/login-choices.html.twig b/app/Resources/views/default/login-choices.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/default/main-screen.html.twig b/app/Resources/views/default/main-screen.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/festival/edit.html.twig b/app/Resources/views/festival/edit.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/festival/index.html.twig b/app/Resources/views/festival/index.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/festival/new.html.twig b/app/Resources/views/festival/new.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/festival/show.html.twig b/app/Resources/views/festival/show.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/angular/current.html.twig b/app/Resources/views/logged/angular/current.html.twig old mode 100644 new mode 100755 index 545b7cfd..cdf5d195 --- a/app/Resources/views/logged/angular/current.html.twig +++ b/app/Resources/views/logged/angular/current.html.twig @@ -1,5 +1,16 @@ {% verbatim %}
+
+ +
+
+{{lesParams|json}}
+
+
Festival: @@ -7,7 +18,7 @@
Client actuel: {{ activeSelling.length }} produits - +
    diff --git a/app/Resources/views/logged/angular/listing-products.html.twig b/app/Resources/views/logged/angular/listing-products.html.twig old mode 100644 new mode 100755 index 7836d644..86a11113 --- a/app/Resources/views/logged/angular/listing-products.html.twig +++ b/app/Resources/views/logged/angular/listing-products.html.twig @@ -10,6 +10,10 @@ {{ p.price }} + + c + {{ c.id }} +
{% endverbatim %} diff --git a/app/Resources/views/logged/angular/loaded-caisse.html.twig b/app/Resources/views/logged/angular/loaded-caisse.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/angular/messages.html.twig b/app/Resources/views/logged/angular/messages.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/angular/paused.html.twig b/app/Resources/views/logged/angular/paused.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/angular/recent.html.twig b/app/Resources/views/logged/angular/recent.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/caisse-main.html.twig b/app/Resources/views/logged/caisse-main.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/logged/dashboard.html.twig b/app/Resources/views/logged/dashboard.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/product/edit.html.twig b/app/Resources/views/product/edit.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/product/new.html.twig b/app/Resources/views/product/new.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/product/show.html.twig b/app/Resources/views/product/show.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/productcategory/edit.html.twig b/app/Resources/views/productcategory/edit.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/productcategory/index.html.twig b/app/Resources/views/productcategory/index.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/productcategory/new.html.twig b/app/Resources/views/productcategory/new.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/productcategory/show.html.twig b/app/Resources/views/productcategory/show.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/sellrecord/edit.html.twig b/app/Resources/views/sellrecord/edit.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/sellrecord/index.html.twig b/app/Resources/views/sellrecord/index.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/sellrecord/new.html.twig b/app/Resources/views/sellrecord/new.html.twig old mode 100644 new mode 100755 diff --git a/app/Resources/views/sellrecord/show.html.twig b/app/Resources/views/sellrecord/show.html.twig old mode 100644 new mode 100755 diff --git a/app/config/config.yml b/app/config/config.yml old mode 100644 new mode 100755 diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml old mode 100644 new mode 100755 diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml old mode 100644 new mode 100755 diff --git a/app/config/config_test.yml b/app/config/config_test.yml old mode 100644 new mode 100755 diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist old mode 100644 new mode 100755 diff --git a/app/config/routing.yml b/app/config/routing.yml old mode 100644 new mode 100755 diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml old mode 100644 new mode 100755 diff --git a/app/config/security.yml b/app/config/security.yml old mode 100644 new mode 100755 diff --git a/app/config/services.yml b/app/config/services.yml old mode 100644 new mode 100755 diff --git a/assets/css/app.scss b/assets/css/app.scss old mode 100644 new mode 100755 diff --git a/assets/css/pages/demo.scss b/assets/css/pages/demo.scss old mode 100644 new mode 100755 diff --git a/assets/css/pages/global.scss b/assets/css/pages/global.scss old mode 100644 new mode 100755 index 407957e0..c24db39f --- a/assets/css/pages/global.scss +++ b/assets/css/pages/global.scss @@ -11,4 +11,5 @@ height: 100vh; position: fixed; overflow: hidden; + z-index: -1; } diff --git a/assets/css/pages/libs.scss b/assets/css/pages/libs.scss old mode 100644 new mode 100755 diff --git a/assets/css/pages/responsive.scss b/assets/css/pages/responsive.scss old mode 100644 new mode 100755 diff --git a/assets/css/pages/special.scss b/assets/css/pages/special.scss old mode 100644 new mode 100755 diff --git a/assets/css/split/custom_vars.scss b/assets/css/split/custom_vars.scss old mode 100644 new mode 100755 diff --git a/assets/css/split/formulaires.scss b/assets/css/split/formulaires.scss old mode 100644 new mode 100755 diff --git a/assets/js/app.js b/assets/js/app.js old mode 100644 new mode 100755 diff --git a/assets/js/parts/main.js b/assets/js/parts/main.js old mode 100644 new mode 100755 index a9e067c1..c6c10293 --- a/assets/js/parts/main.js +++ b/assets/js/parts/main.js @@ -5,15 +5,17 @@ angular .controller('CaisseCtrl', ['$scope', '$http', function ($scope, $http, stuff) { $scope.productsFromDB = []; // loaded products $scope.categories = []; // product categories - $scope.commentaire = []; // comment about the client or the current selling + $scope.sellingComment = "sellingComment"; // comment about the client or the current selling $scope.initLoadDone = false; // becames true after first init of product loading $scope.recentSellings = []; + $scope.lesParams = {}; + $scope.paidAmount = 20; $scope.pausedSelling = []; $scope.activeSelling = []; // list of products to sell $scope.activeFestival = { // an event where selling take place name : "le festival", dateCreation: new Date(), - commentaire : "" + commentaire : "le com de festival" }; /** * get the sum of products prices @@ -54,6 +56,7 @@ angular $scope.categories = rep.data.categories; $scope.recentSellings = rep.data.history; $scope.initLoadDone = true; + $scope.addProduct($scope.categories[0].products[0]) }, (err) => { console.log(err); $scope.initLoadDone = true; @@ -69,16 +72,17 @@ angular }; $scope.clearCurrentSelling = function () { $scope.paidAmount = 0; - $scope.commentaire = ""; + $scope.sellingComment = ""; $scope.activeSelling = []; }; $scope.sendForm = function () { let lesParams = { paidByClient : $scope.paidAmount, - sellingComment: $scope.commentaire, + sellingComment: $scope.sellingComment, activeSelling : $scope.activeSelling, activeFestival: $scope.activeFestival }; + $scope.lesParams = lesParams; $http({ method : 'POST', url : 'add-selling', @@ -87,6 +91,7 @@ angular }, data : lesParams // pass in data as strings }).then(function (rep) { + $scope.clearCurrentSelling(); console.log(rep); if (!rep.success) { // if not successful, bind errors to error variables diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock old mode 100644 new mode 100755 diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/phpunit.xml.dist b/phpunit.xml.dist old mode 100644 new mode 100755 diff --git a/src/.htaccess b/src/.htaccess old mode 100644 new mode 100755 diff --git a/src/AppBundle/AppBundle.php b/src/AppBundle/AppBundle.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php old mode 100644 new mode 100755 index 67505b19..bf318304 --- a/src/AppBundle/Controller/DefaultController.php +++ b/src/AppBundle/Controller/DefaultController.php @@ -120,11 +120,7 @@ class DefaultController extends Controller { * @return JsonResponse */ public function addSellingAction( Request $request ) { -// var_dump( $request->request ); -// die(); - $json = json_decode( $request->getContent(), true ); -// var_dump( $json ); -// die(); + $json = json_decode( $request->getContent(), true ); $currentUser = $this->getUser(); $m = $this->getDoctrine()->getManager(); $newSellRecord = new SellRecord(); @@ -141,24 +137,29 @@ class DefaultController extends Controller { $productsModelsByID[ $product->getId() ] = $product; } + $sumAmount = 0; foreach ( $json[ 'activeSelling' ] as $record ) { - var_dump( $categoriesByID[ $record[ 'category' ] ] ); + var_dump( $record[ 'category' ] ); + var_dump( $categoriesByID[ $record[ 'category' ] ]->getName() ); + $productModel = $productsModelsByID[ $record[ 'id' ] ]; $newProductSold = new ProductSold(); -// $newProductSold->setCategory( $categoriesByID[ $record[ 'category' ] ] ); +// $newProductSold->setCategory( $productModel->getCategory() ); +// $newProductSold->setCategory( 1 ); $newProductSold->setName( $record[ 'name' ] ); $newProductSold->setPrice( $record[ 'price' ] ); - $newProductSold->setProduct( $productsModelsByID[ $record[ 'id' ] ] ); - $newProductSold->setUser( $currentUser ); + $sumAmount += $record[ 'price' ]; +// $newProductSold->setProduct( $productsModelsByID[ $record[ 'id' ] ] ); + $newProductSold->setUser( $currentUser->getId() ); $newProductSold->setSellRecords( $newSellRecord ); // link selling record with user, festival - $currentUser->addProductsSold( $newProductSold ); +// $currentUser->addProductsSold( $newProductSold ); // persist all $m->persist( $newProductSold ); } - $newSellRecord->setPaidByClient( 0 ); - $newSellRecord->setAmount( 42 ); +// $newSellRecord->setPaidByClient( 0 ); + $newSellRecord->setAmount( $sumAmount ); $newSellRecord->setDate( new \DateTime() ); -// $newSellRecord->setPaidByClient( $json[ 'paidByClient' ] ); + $newSellRecord->setPaidByClient( $json[ 'paidByClient' ] ); $currentUser->addSellRecords( $newSellRecord ); diff --git a/src/AppBundle/Controller/FestivalController.php b/src/AppBundle/Controller/FestivalController.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Controller/ProductCategoryController.php b/src/AppBundle/Controller/ProductCategoryController.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Controller/ProductController.php b/src/AppBundle/Controller/ProductController.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Controller/SellRecordController.php b/src/AppBundle/Controller/SellRecordController.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Entity/Festival.php b/src/AppBundle/Entity/Festival.php old mode 100644 new mode 100755 index c15a7832..4e69058a --- a/src/AppBundle/Entity/Festival.php +++ b/src/AppBundle/Entity/Festival.php @@ -116,5 +116,35 @@ class Festival { public function getSellRecords() { return $this->sellRecords; } -} + /** + * Constructor + */ + public function __construct() + { + $this->sellRecords = new \Doctrine\Common\Collections\ArrayCollection(); + } + /** + * Add sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + * + * @return Festival + */ + public function addSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords[] = $sellRecord; + + return $this; + } + + /** + * Remove sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + */ + public function removeSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords->removeElement($sellRecord); + } +} diff --git a/src/AppBundle/Entity/Festival.php~ b/src/AppBundle/Entity/Festival.php~ new file mode 100755 index 00000000..4e69058a --- /dev/null +++ b/src/AppBundle/Entity/Festival.php~ @@ -0,0 +1,150 @@ +id; + } + + /** + * Set name + * + * @param string $name + * + * @return Festival + */ + public function setName( $name ) { + $this->name = $name; + + return $this; + } + + /** + * Get name + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Set dateCreation + * + * @param \DateTime $dateCreation + * + * @return Festival + */ + public function setDateCreation( $dateCreation ) { + $this->dateCreation = $dateCreation; + + return $this; + } + + /** + * Get dateCreation + * + * @return \DateTime + */ + public function getDateCreation() { + return $this->dateCreation; + } + + /** + * Set sellRecords + * + * @param \stdClass $sellRecords + * + * @return Festival + */ + public function setSellRecords( $sellRecords ) { + $this->sellRecords = $sellRecords; + + return $this; + } + + /** + * Get sellRecords + * + * @return \stdClass + */ + public function getSellRecords() { + return $this->sellRecords; + } + /** + * Constructor + */ + public function __construct() + { + $this->sellRecords = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Add sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + * + * @return Festival + */ + public function addSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords[] = $sellRecord; + + return $this; + } + + /** + * Remove sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + */ + public function removeSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords->removeElement($sellRecord); + } +} diff --git a/src/AppBundle/Entity/Product.php b/src/AppBundle/Entity/Product.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Entity/Product.php~ b/src/AppBundle/Entity/Product.php~ old mode 100644 new mode 100755 index 89ccaf3e..652ea05e --- a/src/AppBundle/Entity/Product.php~ +++ b/src/AppBundle/Entity/Product.php~ @@ -2,6 +2,8 @@ namespace AppBundle\Entity; +use AppBundle\Traits\Commentable; +use AppBundle\Traits\Sellable; use Doctrine\ORM\Mapping as ORM; /** @@ -20,18 +22,51 @@ class Product { */ private $name; + /** - * @ORM\Column(type="decimal", scale=2, nullable=true) + * @ORM\Column(type="string", length=256) */ - private $price; + private $image; + /** * @ORM\ManyToOne(targetEntity="ProductCategory", inversedBy="products") */ private $category; /** - * @ORM\OneToMany(targetEntity="SellRecord", mappedBy="products") + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="products") */ - private $sellRecords; + private $user; + + use Sellable; + use Commentable; + + /** + * @return mixed + */ + public function getImage() { + return $this->image; + } + + /** + * @param mixed $image + */ + public function setImage( $image ) { + $this->image = $image; + } + + /** + * @return mixed + */ + public function getUser() { + return $this->user; + } + + /** + * @param mixed $user + */ + public function setUser( $user ) { + $this->user = $user; + } /** * @return mixed @@ -88,45 +123,24 @@ class Product { public function setCategory( ProductCategory $category ) { $this->category = $category; } - /** - * Constructor - */ - public function __construct() - { - $this->sellRecords = new \Doctrine\Common\Collections\ArrayCollection(); - } - /** - * Add sellRecord - * - * @param \AppBundle\Entity\SellRecord $sellRecord - * - * @return Product - */ - public function addSellRecord(\AppBundle\Entity\SellRecord $sellRecord) - { - $this->sellRecords[] = $sellRecord; + /** + * Constructor + */ + public function __construct() { + $this->sellRecords = new \Doctrine\Common\Collections\ArrayCollection(); + } - return $this; - } + /** + * Add sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + * + * @return Product + */ + public function addSellRecord( \AppBundle\Entity\SellRecord $sellRecord ) { + $this->sellRecords[] = $sellRecord; - /** - * Remove sellRecord - * - * @param \AppBundle\Entity\SellRecord $sellRecord - */ - public function removeSellRecord(\AppBundle\Entity\SellRecord $sellRecord) - { - $this->sellRecords->removeElement($sellRecord); - } - - /** - * Get sellRecords - * - * @return \Doctrine\Common\Collections\Collection - */ - public function getSellRecords() - { - return $this->sellRecords; - } + return $this; + } } diff --git a/src/AppBundle/Entity/ProductCategory.php b/src/AppBundle/Entity/ProductCategory.php old mode 100644 new mode 100755 index 4100d8f4..1ad83588 --- a/src/AppBundle/Entity/ProductCategory.php +++ b/src/AppBundle/Entity/ProductCategory.php @@ -118,4 +118,28 @@ class ProductCategory { public function removeProduct( \AppBundle\Entity\Product $product ) { $this->products->removeElement( $product ); } + + /** + * Add user + * + * @param \AppBundle\Entity\User $user + * + * @return ProductCategory + */ + public function addUser(\AppBundle\Entity\User $user) + { + $this->users[] = $user; + + return $this; + } + + /** + * Remove user + * + * @param \AppBundle\Entity\User $user + */ + public function removeUser(\AppBundle\Entity\User $user) + { + $this->users->removeElement($user); + } } diff --git a/src/AppBundle/Entity/ProductCategory.php~ b/src/AppBundle/Entity/ProductCategory.php~ old mode 100644 new mode 100755 index f3deb0d2..1ad83588 --- a/src/AppBundle/Entity/ProductCategory.php~ +++ b/src/AppBundle/Entity/ProductCategory.php~ @@ -25,6 +25,29 @@ class ProductCategory { */ private $products; + /** + * @ORM\ManyToMany(targetEntity="AppBundle\Entity\User", mappedBy="categories") + */ + private $users; + + public function __toString() { + return $this->getName() . ' (' . count( $this->getProducts() ) . ' produits)'; + } + + /** + * @return mixed + */ + public function getUsers() { + return $this->users; + } + + /** + * @param mixed $users + */ + public function setUsers( $users ) { + $this->users = $users; + } + /** * @return mixed */ @@ -95,4 +118,28 @@ class ProductCategory { public function removeProduct( \AppBundle\Entity\Product $product ) { $this->products->removeElement( $product ); } + + /** + * Add user + * + * @param \AppBundle\Entity\User $user + * + * @return ProductCategory + */ + public function addUser(\AppBundle\Entity\User $user) + { + $this->users[] = $user; + + return $this; + } + + /** + * Remove user + * + * @param \AppBundle\Entity\User $user + */ + public function removeUser(\AppBundle\Entity\User $user) + { + $this->users->removeElement($user); + } } diff --git a/src/AppBundle/Entity/ProductSold.php b/src/AppBundle/Entity/ProductSold.php old mode 100644 new mode 100755 index a459f086..5788de6f --- a/src/AppBundle/Entity/ProductSold.php +++ b/src/AppBundle/Entity/ProductSold.php @@ -8,6 +8,13 @@ use Doctrine\ORM\Mapping as ORM; * @ORM\Entity(repositoryClass="AppBundle\Repository\ProductRepository") */ class ProductSold extends Product { + /** + * @ORM\Id + * @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + /** * the stack of products for one client at one time @@ -21,6 +28,7 @@ class ProductSold extends Product { */ private $user; + /** * references the product from whom this line is inspired * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Product", inversedBy="productsSold") @@ -34,29 +42,15 @@ class ProductSold extends Product { /** * @return mixed */ - public function getCategory() { - return $this->category; + public function getId() { + return $this->id; } /** - * @param mixed $category + * @param mixed $id */ - public function setCategory( $category ) { - $this->category = $category; - } - - /** - * @return mixed - */ - public function getSellRecords() { - return $this->sellRecords; - } - - /** - * @param mixed $sellRecords - */ - public function setSellRecords( $sellRecords ) { - $this->sellRecords = $sellRecords; + public function setId( $id ) { + $this->id = $id; } /** @@ -76,15 +70,58 @@ class ProductSold extends Product { /** * @return mixed */ - public function getProduct() { - return $this->product; + public function getCategory() { + return $this->category; } /** - * @param mixed $product + * @param mixed $category */ - public function setProduct( $product ) { - $this->product = $product; + public function setCategory( ProductCategory $category ) { + $this->category = $category; } + /** + * Set sellRecords + * + * @param \AppBundle\Entity\SellRecord $sellRecords + * + * @return ProductSold + */ + public function setSellRecords( SellRecord $sellRecords = null ) { + $this->sellRecords = $sellRecords; + + return $this; + } + + /** + * Get sellRecords + * + * @return \AppBundle\Entity\SellRecord + */ + public function getSellRecords() { + return $this->sellRecords; + } + + /** + * Set product + * + * @param \AppBundle\Entity\Product $product + * + * @return ProductSold + */ + public function setProduct( Product $product = null ) { + $this->product = $product; + + return $this; + } + + /** + * Get product + * + * @return \AppBundle\Entity\Product + */ + public function getProduct() { + return $this->product; + } } diff --git a/src/AppBundle/Entity/ProductSold.php~ b/src/AppBundle/Entity/ProductSold.php~ new file mode 100755 index 00000000..474df410 --- /dev/null +++ b/src/AppBundle/Entity/ProductSold.php~ @@ -0,0 +1,112 @@ +user; + } + + /** + * @param mixed $user + */ + public function setUser( $user ) { + $this->user = $user; + } + + /** + * @return mixed + */ + public function getCategory() { + return $this->category; + } + + /** + * @param mixed $category + */ + public function setCategory( $category ) { + $this->category = $category; + } + + /** + * Set sellRecords + * + * @param \AppBundle\Entity\SellRecord $sellRecords + * + * @return ProductSold + */ + public function setSellRecords( \AppBundle\Entity\SellRecord $sellRecords = null ) { + $this->sellRecords = $sellRecords; + + return $this; + } + + /** + * Get sellRecords + * + * @return \AppBundle\Entity\SellRecord + */ + public function getSellRecords() { + return $this->sellRecords; + } + + /** + * Set product + * + * @param \AppBundle\Entity\Product $product + * + * @return ProductSold + */ + public function setProduct( \AppBundle\Entity\Product $product = null ) { + $this->product = $product; + + return $this; + } + + /** + * Get product + * + * @return \AppBundle\Entity\Product + */ + public function getProduct() { + return $this->product; + } +} diff --git a/src/AppBundle/Entity/SellRecord.php b/src/AppBundle/Entity/SellRecord.php old mode 100644 new mode 100755 index 166681d7..09347ab4 --- a/src/AppBundle/Entity/SellRecord.php +++ b/src/AppBundle/Entity/SellRecord.php @@ -14,7 +14,7 @@ class SellRecord { /** * @ORM\Id * @ORM\GeneratedValue - * @ORM\Column(name="id") + * @ORM\Column(type="integer") */ private $id; /** @@ -181,4 +181,32 @@ class SellRecord { $this->date = $date; } + /** + * Constructor + */ + public function __construct() { + $this->productsSold = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Add productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + * + * @return SellRecord + */ + public function addProductsSold( \AppBundle\Entity\ProductSold $productsSold ) { + $this->productsSold[] = $productsSold; + + return $this; + } + + /** + * Remove productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + */ + public function removeProductsSold( \AppBundle\Entity\ProductSold $productsSold ) { + $this->productsSold->removeElement( $productsSold ); + } } diff --git a/src/AppBundle/Entity/SellRecord.php~ b/src/AppBundle/Entity/SellRecord.php~ old mode 100644 new mode 100755 index fe09da75..09347ab4 --- a/src/AppBundle/Entity/SellRecord.php~ +++ b/src/AppBundle/Entity/SellRecord.php~ @@ -2,26 +2,142 @@ namespace AppBundle\Entity; +use AppBundle\Traits\Commentable; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="AppBundle\Repository\SellRecordRepository") */ class SellRecord { - /** - * @ORM\ManyToOne(targetEntity="Product", inversedBy="sellRecords") - */ - private $products; - + use Commentable; /** * @ORM\Id * @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + /** + * liste des produits de la vente + * @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="sellRecords") + */ + private $productsSold; + + + /** + * creation date * @ORM\Column(type="datetime") */ private $date; + /** + * total + * @ORM\Column(type="decimal", scale=2, nullable=false) + */ private $amount; + /** + * amount paid by client + * @ORM\Column(type="decimal", scale=2, nullable=true) + */ + private $paidByClient; + + /** + * @var + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Festival",inversedBy="sellRecords") + */ + private $festival; + + /** + * owner of the selling account + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="sellRecords") + */ + private $user; + + + /** + * @return mixed + */ + public function getPaidByClient() { + return $this->paidByClient; + } + + /** + * @param mixed $paidByClient + */ + public function setPaidByClient( $paidByClient ) { + $this->paidByClient = $paidByClient; + } + + /** + * @return mixed + */ + public function getComment() { + return $this->comment; + } + + /** + * @param mixed $comment + */ + public function setComment( $comment ) { + $this->comment = $comment; + } + + /** + * @return mixed + */ + public function getProductsSold() { + return $this->productsSold; + } + + /** + * @param mixed $productsSold + */ + public function setProductsSold( $productsSold ) { + $this->productsSold = $productsSold; + } + + /** + * @return mixed + */ + public function getFestival() { + return $this->festival; + } + + /** + * @param mixed $festival + */ + public function setFestival( $festival ) { + $this->festival = $festival; + } + + + /** + * @return mixed + */ + public function getUser() { + return $this->user; + } + + /** + * @param mixed $user + */ + public function setUser( $user ) { + $this->user = $user; + } + + /** + * @return mixed + */ + public function getAmount() { + return $this->amount; + } + + /** + * @param mixed $amount + */ + public function setAmount( $amount ) { + $this->amount = $amount; + } /** * @return mixed @@ -59,10 +175,38 @@ class SellRecord { } /** - * @param mixed $date + * @param \DateTime $date */ - public function setDate( $date ) { + public function setDate( \DateTime $date ) { $this->date = $date; } + /** + * Constructor + */ + public function __construct() { + $this->productsSold = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Add productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + * + * @return SellRecord + */ + public function addProductsSold( \AppBundle\Entity\ProductSold $productsSold ) { + $this->productsSold[] = $productsSold; + + return $this; + } + + /** + * Remove productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + */ + public function removeProductsSold( \AppBundle\Entity\ProductSold $productsSold ) { + $this->productsSold->removeElement( $productsSold ); + } } diff --git a/src/AppBundle/Entity/Stuff.php b/src/AppBundle/Entity/Stuff.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Entity/Stuff.php~ b/src/AppBundle/Entity/Stuff.php~ old mode 100644 new mode 100755 diff --git a/src/AppBundle/Entity/User.php b/src/AppBundle/Entity/User.php old mode 100644 new mode 100755 index ba27724c..cbd88690 --- a/src/AppBundle/Entity/User.php +++ b/src/AppBundle/Entity/User.php @@ -164,4 +164,86 @@ class User extends BaseUser { public function getGoogleId() { return $this->googleId; } + + /** + * Add product + * + * @param \AppBundle\Entity\Product $product + * + * @return User + */ + public function addProduct(\AppBundle\Entity\Product $product) + { + $this->products[] = $product; + + return $this; + } + + /** + * Remove product + * + * @param \AppBundle\Entity\Product $product + */ + public function removeProduct(\AppBundle\Entity\Product $product) + { + $this->products->removeElement($product); + } + + /** + * Remove productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + */ + public function removeProductsSold(\AppBundle\Entity\ProductSold $productsSold) + { + $this->productsSold->removeElement($productsSold); + } + + /** + * Add category + * + * @param \AppBundle\Entity\ProductCategory $category + * + * @return User + */ + public function addCategory(\AppBundle\Entity\ProductCategory $category) + { + $this->categories[] = $category; + + return $this; + } + + /** + * Remove category + * + * @param \AppBundle\Entity\ProductCategory $category + */ + public function removeCategory(\AppBundle\Entity\ProductCategory $category) + { + $this->categories->removeElement($category); + } + + /** + * Add sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + * + * @return User + */ + public function addSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords[] = $sellRecord; + + return $this; + } + + /** + * Remove sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + */ + public function removeSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords->removeElement($sellRecord); + } } diff --git a/src/AppBundle/Entity/User.php~ b/src/AppBundle/Entity/User.php~ old mode 100644 new mode 100755 index bf42a330..cbd88690 --- a/src/AppBundle/Entity/User.php~ +++ b/src/AppBundle/Entity/User.php~ @@ -28,6 +28,112 @@ class User extends BaseUser { private $googleAccessToken; + /** + * templates products + * @ORM\OneToMany(targetEntity="AppBundle\Entity\Product", mappedBy="user") + */ + private $products; + + /** + * variabilised products sold + * @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="user") + */ + private $productsSold; + + /** + * @ORM\ManyToMany(targetEntity="AppBundle\Entity\ProductCategory", inversedBy="users") + */ + private $categories; + + /** + * @return mixed + */ + public function getProductsSold() { + return $this->productsSold; + } + + /** + * @return mixed + */ + public function addProductsSold( $product ) { + return $this->productsSold[] = $product; + } + + /** + * @param mixed $productsSold + */ + public function setProductsSold( $productsSold ) { + $this->productsSold = $productsSold; + } + + /** + * @ORM\OneToMany(targetEntity="AppBundle\Entity\SellRecord", mappedBy="user") + */ + private $sellRecords; + + /** + * @return mixed + */ + public function getSellRecords() { + return $this->sellRecords; + } + + /** + * @param mixed $sellRecords + */ + public function setSellRecords( $sellRecords ) { + $this->sellRecords = $sellRecords; + } + + /** + * @param mixed $sellRecords + */ + public function addSellRecords( $sellRecords ) { + $this->sellRecords[] = $sellRecords; + } + + /** + * @return mixed + */ + public function getGoogleAccessToken() { + return $this->googleAccessToken; + } + + /** + * @param mixed $googleAccessToken + */ + public function setGoogleAccessToken( $googleAccessToken ) { + $this->googleAccessToken = $googleAccessToken; + } + + /** + * @return mixed + */ + public function getProducts() { + return $this->products; + } + + /** + * @param mixed $products + */ + public function setProducts( $products ) { + $this->products = $products; + } + + /** + * @return mixed + */ + public function getCategories() { + return $this->categories; + } + + /** + * @param mixed $categories + */ + public function setCategories( $categories ) { + $this->categories = $categories; + } + /** * Get id * @@ -37,27 +143,107 @@ class User extends BaseUser { return $this->id; } + /** + * Set googleId + * + * @param string $googleId + * + * @return User + */ + public function setGoogleId( $googleId ) { + $this->googleId = $googleId; + + return $this; + } + + /** + * Get googleId + * + * @return string + */ + public function getGoogleId() { + return $this->googleId; + } + /** - * Set googleId + * Add product * - * @param string $googleId + * @param \AppBundle\Entity\Product $product * * @return User */ - public function setGoogleId($googleId) + public function addProduct(\AppBundle\Entity\Product $product) { - $this->googleId = $googleId; + $this->products[] = $product; return $this; } /** - * Get googleId + * Remove product * - * @return string + * @param \AppBundle\Entity\Product $product */ - public function getGoogleId() + public function removeProduct(\AppBundle\Entity\Product $product) { - return $this->googleId; + $this->products->removeElement($product); + } + + /** + * Remove productsSold + * + * @param \AppBundle\Entity\ProductSold $productsSold + */ + public function removeProductsSold(\AppBundle\Entity\ProductSold $productsSold) + { + $this->productsSold->removeElement($productsSold); + } + + /** + * Add category + * + * @param \AppBundle\Entity\ProductCategory $category + * + * @return User + */ + public function addCategory(\AppBundle\Entity\ProductCategory $category) + { + $this->categories[] = $category; + + return $this; + } + + /** + * Remove category + * + * @param \AppBundle\Entity\ProductCategory $category + */ + public function removeCategory(\AppBundle\Entity\ProductCategory $category) + { + $this->categories->removeElement($category); + } + + /** + * Add sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + * + * @return User + */ + public function addSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords[] = $sellRecord; + + return $this; + } + + /** + * Remove sellRecord + * + * @param \AppBundle\Entity\SellRecord $sellRecord + */ + public function removeSellRecord(\AppBundle\Entity\SellRecord $sellRecord) + { + $this->sellRecords->removeElement($sellRecord); } } diff --git a/src/AppBundle/Form/FestivalType.php b/src/AppBundle/Form/FestivalType.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Form/ProductCategoryType.php b/src/AppBundle/Form/ProductCategoryType.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Form/ProductType.php b/src/AppBundle/Form/ProductType.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Form/SellRecordType.php b/src/AppBundle/Form/SellRecordType.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/FestivalRepository.php b/src/AppBundle/Repository/FestivalRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/ProductCategoryRepository.php b/src/AppBundle/Repository/ProductCategoryRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/ProductRepository.php b/src/AppBundle/Repository/ProductRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/SellRecordRepository.php b/src/AppBundle/Repository/SellRecordRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/StuffRepository.php b/src/AppBundle/Repository/StuffRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Repository/UserRepository.php b/src/AppBundle/Repository/UserRepository.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Tests/Controller/FestivalControllerTest.php b/src/AppBundle/Tests/Controller/FestivalControllerTest.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Tests/Controller/ProductCategoryControllerTest.php b/src/AppBundle/Tests/Controller/ProductCategoryControllerTest.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Tests/Controller/ProductControllerTest.php b/src/AppBundle/Tests/Controller/ProductControllerTest.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Tests/Controller/SellRecordControllerTest.php b/src/AppBundle/Tests/Controller/SellRecordControllerTest.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Traits/Commentable.php b/src/AppBundle/Traits/Commentable.php old mode 100644 new mode 100755 diff --git a/src/AppBundle/Traits/Sellable.php b/src/AppBundle/Traits/Sellable.php old mode 100644 new mode 100755 diff --git a/src/Entity/User/User.php b/src/Entity/User/User.php old mode 100644 new mode 100755 diff --git a/tests/AppBundle/Controller/DefaultControllerTest.php b/tests/AppBundle/Controller/DefaultControllerTest.php old mode 100644 new mode 100755 diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php old mode 100644 new mode 100755 diff --git a/var/logs/.gitkeep b/var/logs/.gitkeep old mode 100644 new mode 100755 diff --git a/web/.htaccess b/web/.htaccess old mode 100644 new mode 100755 diff --git a/web/app.php b/web/app.php old mode 100644 new mode 100755 diff --git a/web/app_dev.php b/web/app_dev.php old mode 100644 new mode 100755 diff --git a/web/apple-touch-icon.png b/web/apple-touch-icon.png old mode 100644 new mode 100755 diff --git a/web/bg.jpg b/web/bg.jpg old mode 100644 new mode 100755 diff --git a/web/config.php b/web/config.php old mode 100644 new mode 100755 diff --git a/web/favicon.ico b/web/favicon.ico old mode 100644 new mode 100755 diff --git a/web/robots.txt b/web/robots.txt old mode 100644 new mode 100755 diff --git a/webpack.config.js b/webpack.config.js old mode 100644 new mode 100755 diff --git a/yarn.lock b/yarn.lock old mode 100644 new mode 100755