+
- Welcome to
- Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}
+ Caisse
-
-
test ajax
+
+ Votre caisse mobile en ligne
+
+
+
+
+
Gratuit
+
Gérez votre comptabilité de stand en ligne sans dépenser un rond. Plus besoin de transporter un
+ inventaire et des feuilles de calcul faites à l'arrache.
+
+
+
+
Flexible
+
Modifiez vos produits à la volée, soyez plusieurs à gérer la caisse si vous le souhaitez, changez de
+ responsable en cours de journée.
+
+
+
+
Portable
+
Fait pour être utilisé sur les marchés et les salons. Votre gestion des stocks n'en sera que
+ simplifiée.
+
+
+
+
diff --git a/app/Resources/views/logged/caisse-main.html.twig b/app/Resources/views/logged/caisse-main.html.twig
new file mode 100644
index 00000000..33530c7c
--- /dev/null
+++ b/app/Resources/views/logged/caisse-main.html.twig
@@ -0,0 +1,59 @@
+
+
+ {% for c in categories %}
+ {{ c.title }}
+ {% for p in c.products %}
+ {{ p.title }}
+ {% endfor %}
+ {% endfor %}
+
+
+
+
+
+ Ventes en pause
+
+
+
+
+
+
+
+ Ventes récentes
+
+
+
+
+
+
diff --git a/app/Resources/views/logged/dashboard.html.twig b/app/Resources/views/logged/dashboard.html.twig
new file mode 100644
index 00000000..7dd3c9f0
--- /dev/null
+++ b/app/Resources/views/logged/dashboard.html.twig
@@ -0,0 +1,27 @@
+{% extends 'base.html.twig' %}
+{% trans_default_domain 'FOSUserBundle' %}
+{% block body %}
+
+
+
+
+
Caisse
+ {% include 'logged/caisse-main.html.twig' %}
+
+
+
Catégories
+
+
+
Produits
+
+
+
Historique
+
+
+
+{% endblock %}
diff --git a/templates/product/index.html.twig b/app/Resources/views/product/index.html.twig
similarity index 100%
rename from templates/product/index.html.twig
rename to app/Resources/views/product/index.html.twig
diff --git a/templates/product/test.html.twig b/app/Resources/views/product/test.html.twig
similarity index 100%
rename from templates/product/test.html.twig
rename to app/Resources/views/product/test.html.twig
diff --git a/app/config/security.yml b/app/config/security.yml
index c98045b1..7c6b4c3e 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -30,6 +30,7 @@ security:
#form_login: ~
secured_area:
anonymous: ~
+ logout_on_user_change: true
oauth:
resource_owners:
facebook: "/login/check-facebook"
diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php
index dc1c1a96..9bf1ab36 100644
--- a/src/AppBundle/Controller/DefaultController.php
+++ b/src/AppBundle/Controller/DefaultController.php
@@ -25,22 +25,25 @@ class DefaultController extends Controller {
}
/**
- * @Route("/test-ajax-request", name="test_ajax")
+ * @Route("/dashboard", name="dashboard")
*/
- public function testAjaxAction( Request $request ) {
- $req = $request->request;
- var_dump( $request->getMethod() );
- var_dump( $request->isXmlHttpRequest() );
- if ( $request->isXmlHttpRequest() ) {
- var_dump( $request->get( 'data' ) );
- }
- $recieved = $request->request->get( 'data' );
-// var_dump( $request->request );
- $json = [
- 'test' => 'it works',
- 'recieved' => $recieved,
- ];
+ public function dashboardAction( Request $request ) {
+ $m = $this->getDoctrine()->getManager();
+ $currentUser = $this->getUser();
+ $categRepo = $m->getRepository( 'AppBundle:ProductCategory' );
+ $categories = $categRepo->findAll();
+ $csrfToken = $this->tokenManager
+ ? $this->tokenManager->getToken( 'authenticate' )->getValue()
+ : null;
- return new JsonResponse( $json );
+ // replace this example code with whatever you need
+ return $this->render( 'logged/dashboard.html.twig',
+ [
+ 'categories' => $categories,
+ 'currentUser' => $currentUser,
+ 'csrf_token' => $csrfToken,
+
+ 'base_dir' => realpath( $this->getParameter( 'kernel.project_dir' ) ) . DIRECTORY_SEPARATOR,
+ ] );
}
}
diff --git a/src/AppBundle/Entity/Product.php b/src/AppBundle/Entity/Product.php
new file mode 100644
index 00000000..89ccaf3e
--- /dev/null
+++ b/src/AppBundle/Entity/Product.php
@@ -0,0 +1,132 @@
+id;
+ }
+
+ /**
+ * @param mixed $id
+ */
+ public function setId( $id ) {
+ $this->id = $id;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ * @param mixed $name
+ */
+ public function setName( $name ) {
+ $this->name = $name;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getPrice() {
+ return $this->price;
+ }
+
+ /**
+ * @param mixed $price
+ */
+ public function setPrice( $price ) {
+ $this->price = $price;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getCategory() {
+ return $this->category;
+ }
+
+ /**
+ * @param ProductCategory $category
+ */
+ 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;
+
+ return $this;
+ }
+
+ /**
+ * 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;
+ }
+}
diff --git a/src/Entity/Product.php b/src/AppBundle/Entity/Product.php~
old mode 100755
new mode 100644
similarity index 97%
rename from src/Entity/Product.php
rename to src/AppBundle/Entity/Product.php~
index e0c3fe79..7387d6a3
--- a/src/Entity/Product.php
+++ b/src/AppBundle/Entity/Product.php~
@@ -1,6 +1,6 @@
products;
+ }
+
+ /**
+ * @param mixed $products
+ */
+ public function setProducts( $products ) {
+ $this->products = $products;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getId() {
+ return $this->id;
+ }
+
+ /**
+ * @param mixed $id
+ */
+ public function setId( $id ) {
+ $this->id = $id;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ * @param mixed $name
+ */
+ public function setName( $name ) {
+ $this->name = $name;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->products = new \Doctrine\Common\Collections\ArrayCollection();
+ }
+
+ /**
+ * Add product
+ *
+ * @param \AppBundle\Entity\Product $product
+ *
+ * @return ProductCategory
+ */
+ 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 );
+ }
+}
diff --git a/src/Entity/ProductCategory.php b/src/AppBundle/Entity/ProductCategory.php~
old mode 100755
new mode 100644
similarity index 97%
rename from src/Entity/ProductCategory.php
rename to src/AppBundle/Entity/ProductCategory.php~
index 963badb8..b7e3dcac
--- a/src/Entity/ProductCategory.php
+++ b/src/AppBundle/Entity/ProductCategory.php~
@@ -1,8 +1,9 @@
id;
+ }
+
+ /**
+ * @param mixed $id
+ */
+ public function setId( $id ) {
+ $this->id = $id;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getProducts() {
+ return $this->products;
+ }
+
+ /**
+ * @param mixed $products
+ */
+ public function setProducts( $products ) {
+ $this->products = $products;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getDate() {
+ return $this->date;
+ }
+
+ /**
+ * @param mixed $date
+ */
+ public function setDate( $date ) {
+ $this->date = $date;
+ }
+
+}
diff --git a/src/AppBundle/Entity/Stuff.php b/src/AppBundle/Entity/Stuff.php
new file mode 100644
index 00000000..3ac9bf39
--- /dev/null
+++ b/src/AppBundle/Entity/Stuff.php
@@ -0,0 +1,65 @@
+id;
+ }
+
+ /**
+ * Set truc
+ *
+ * @param string $truc
+ *
+ * @return Stuff
+ */
+ public function setTruc($truc)
+ {
+ $this->truc = $truc;
+
+ return $this;
+ }
+
+ /**
+ * Get truc
+ *
+ * @return string
+ */
+ public function getTruc()
+ {
+ return $this->truc;
+ }
+}
diff --git a/src/AppBundle/Entity/Stuff.php~ b/src/AppBundle/Entity/Stuff.php~
new file mode 100644
index 00000000..7d67b4ec
--- /dev/null
+++ b/src/AppBundle/Entity/Stuff.php~
@@ -0,0 +1,66 @@
+id;
+ }
+
+ /**
+ * Set truc
+ *
+ * @param string $truc
+ *
+ * @return Stuff
+ */
+ public function setTruc($truc)
+ {
+ $this->truc = $truc;
+
+ return $this;
+ }
+
+ /**
+ * Get truc
+ *
+ * @return string
+ */
+ public function getTruc()
+ {
+ return $this->truc;
+ }
+}
+
diff --git a/src/AppBundle/Entity/User.php b/src/AppBundle/Entity/User.php
index 27ffe1b1..bf42a330 100644
--- a/src/AppBundle/Entity/User.php
+++ b/src/AppBundle/Entity/User.php
@@ -21,6 +21,12 @@ class User extends BaseUser {
*/
protected $id;
+ /**
+ * @ORM\Column(name="google_id", type="string", length=255, nullable=true)
+ */
+ private $googleId;
+
+ private $googleAccessToken;
/**
* Get id
@@ -30,5 +36,28 @@ class User extends BaseUser {
public function getId() {
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;
+ }
+}
diff --git a/src/AppBundle/Entity/User.php~ b/src/AppBundle/Entity/User.php~
new file mode 100644
index 00000000..0e2fb4c2
--- /dev/null
+++ b/src/AppBundle/Entity/User.php~
@@ -0,0 +1,39 @@
+id;
+ }
+}
diff --git a/src/AppBundle/Repository/ProductCategoryRepository.php b/src/AppBundle/Repository/ProductCategoryRepository.php
new file mode 100644
index 00000000..c2a7deab
--- /dev/null
+++ b/src/AppBundle/Repository/ProductCategoryRepository.php
@@ -0,0 +1,12 @@
+id = $id;
- }
-
- public function getId(): UserIdInterface
- {
- return $this->id;
- }
-}
diff --git a/templates/base.html.twig b/templates/base.html.twig
deleted file mode 100755
index f32d4c0a..00000000
--- a/templates/base.html.twig
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
{% block title %}Fiche de compte dynamique{% endblock %}
- {% block stylesheets %}
-
- {% endblock %}
-
-
-{% block body %}
-
- Votre caisse mobile en ligne
-
-{% endblock %}
-{% block javascripts %}
-
-{% endblock %}
-
-
diff --git a/templates/pdf/content.html.twig b/templates/pdf/content.html.twig
deleted file mode 100755
index 87ca951c..00000000
--- a/templates/pdf/content.html.twig
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- le contenu
-
Page 1
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci dicta dolores eligendi facilis in inventore
- libero, maiores modi, natus nesciunt nostrum quae quas quasi sit unde vel veniam veritatis voluptas!
-
-
-
Page 2
-
etur adipisicing elit. Alias autem beatae dolorum impedit incidunt iusto necessitatibus, nulla perspiciatis
- placeat repellat, suscipit vel! Aspernatur commodi consequuntur delectus dolore doloribus eaque exercitationem
- incidunt inventore ipsum libero molestiae nesciunt non nostrum nulla, numquam porro, possimus quia quibusdam
- ratione recusandae sed sunt totam veniam.
-
-
diff --git a/templates/pdf/footer.html.twig b/templates/pdf/footer.html.twig
deleted file mode 100755
index 28d89a82..00000000
--- a/templates/pdf/footer.html.twig
+++ /dev/null
@@ -1 +0,0 @@
-footer tadam
diff --git a/templates/pdf/header.html.twig b/templates/pdf/header.html.twig
deleted file mode 100755
index 44f607ad..00000000
--- a/templates/pdf/header.html.twig
+++ /dev/null
@@ -1 +0,0 @@
-header hopla
diff --git a/templates/pdf/table-of-contents.xml.twig b/templates/pdf/table-of-contents.xml.twig
deleted file mode 100755
index 4adc209d..00000000
--- a/templates/pdf/table-of-contents.xml.twig
+++ /dev/null
@@ -1 +0,0 @@
-