From bb7f8680fc6442dcceafb280e826d410fc2acc33 Mon Sep 17 00:00:00 2001 From: ty kayn Date: Wed, 12 Jun 2019 14:52:58 +0200 Subject: [PATCH] crud style, history table --- app/Resources/views/default/footer.html.twig | 2 - .../views/default/main-screen.html.twig | 14 ++- app/Resources/views/festival/index.html.twig | 4 +- app/Resources/views/logged/history.html.twig | 100 ++++++++++-------- app/Resources/views/product/index.html.twig | 9 +- .../views/productcategory/index.html.twig | 2 +- .../views/sellrecord/index.html.twig | 11 +- assets/css/pages/global.scss | 46 +++++--- .../Controller/DefaultController.php | 2 +- 9 files changed, 120 insertions(+), 70 deletions(-) diff --git a/app/Resources/views/default/footer.html.twig b/app/Resources/views/default/footer.html.twig index cb8a254a..44a21139 100755 --- a/app/Resources/views/default/footer.html.twig +++ b/app/Resources/views/default/footer.html.twig @@ -1,5 +1,4 @@ diff --git a/app/Resources/views/default/main-screen.html.twig b/app/Resources/views/default/main-screen.html.twig index b70904d6..7025004b 100755 --- a/app/Resources/views/default/main-screen.html.twig +++ b/app/Resources/views/default/main-screen.html.twig @@ -26,8 +26,8 @@
@@ -82,10 +82,14 @@ contactez-moi pour tout renseignement: par email - , Telegram @tykayn, ou sur Mastodon - + , Telegram + + @tykayn + + , ou sur Mastodon + avatar Mastodon @tykayn@mamot.fr + alt="avatar Mastodon" width="50" height="50"> @tykayn
diff --git a/app/Resources/views/festival/index.html.twig b/app/Resources/views/festival/index.html.twig index cc981f36..df538898 100755 --- a/app/Resources/views/festival/index.html.twig +++ b/app/Resources/views/festival/index.html.twig @@ -1,7 +1,7 @@ {% extends 'base.html.twig' %} {% block body %} -
+ -
-

- {{ recentSells |length }} Dernières ventes -

-
-
-
- date -
-
- commentaire -
-
- produits -
-
- montant -
-
-
- {% for vente in recentSells %} +
-
-
- {{ vente.date |date('Y-m-d H:i:s') }} -
-
- {{ vente.comment }} -
-
- {{ vente.productsSold |length }} -
-
+
+
+
- {{ vente.amount }} - - - + +
+
+
+

+ {{ recentSells |length }} Dernières ventes +

+
+
+ + + + + + + + + + + + + {% for vente in recentSells %} + + + + + + + + + + + {% endfor %} + +
datecommentaireproduitsmontantActions
{{ vente.date |date('Y-m-d H:i:s') }}{{ vente.comment }}{{ vente.productsSold |length }} + {{ vente.amount }} + + + + +
+ + +
+
+
- {% endfor %} -
+ + {% include ':logged:history-script.html.twig' %} - {% include ':logged:history-script.html.twig' %} - +
{% endblock %} diff --git a/app/Resources/views/product/index.html.twig b/app/Resources/views/product/index.html.twig index 5575ac08..98ffe6b4 100755 --- a/app/Resources/views/product/index.html.twig +++ b/app/Resources/views/product/index.html.twig @@ -1,17 +1,20 @@ {% extends 'base.html.twig' %} {% block body %} -
+

Produits

Nouveau produit - + astuce: Utilisez + + l'import de masse + pour créer plusieurs produits et catégories à la fois
@@ -27,6 +30,7 @@ Image Price Stocks + Vendus Comment Actions @@ -54,6 +58,7 @@ {{ product.image }} {{ product.price }} {{ product.stockCount }} + {{ product.productsSold | length }} {{ product.comment }} diff --git a/app/Resources/views/productcategory/index.html.twig b/app/Resources/views/productcategory/index.html.twig index 71c42653..0a7b23d5 100755 --- a/app/Resources/views/productcategory/index.html.twig +++ b/app/Resources/views/productcategory/index.html.twig @@ -1,7 +1,7 @@ {% extends 'base.html.twig' %} {% block body %} -
+

Catégorie de produit

diff --git a/app/Resources/views/sellrecord/index.html.twig b/app/Resources/views/sellrecord/index.html.twig index 408d399f..bb55f89c 100755 --- a/app/Resources/views/sellrecord/index.html.twig +++ b/app/Resources/views/sellrecord/index.html.twig @@ -1,7 +1,16 @@ {% extends 'base.html.twig' %} {% block body %} -

Sellrecords list

+
+ + diff --git a/assets/css/pages/global.scss b/assets/css/pages/global.scss index 12e3fc1a..13592679 100755 --- a/assets/css/pages/global.scss +++ b/assets/css/pages/global.scss @@ -64,6 +64,9 @@ body { height: 4em; padding: 1em; box-sizing: border-box; + position: absolute; + width: 100%; + bottom: 0; } thead { @@ -122,22 +125,11 @@ label { .previsionnel { font-size: 1rem; - //.config { - // font-size: 1.5rem; - //} - //thead { - // font-size: 1.5rem; - //} + label { min-width: 220px; } - //.exepanse-table { - // font-size: 1.5rem; - //} - //.examples-depenses { - // font-size: 1.5rem; - //} .big-number { font-size: 1.85rem; color: #2B2d42; @@ -222,6 +214,20 @@ input { font-weight: 800; } +tr { + &.bg-success { + td { + background: greenyellow; + } + } +} +.table { + > div{ + &:hover{ + background: #ccc; + } + } +} .table > thead > tr > td, table td { padding: 0.5em; @@ -257,12 +263,26 @@ table td { .container { min-height: 100vh; } + + table { + margin-top: 2em; + } } -#menu_button{ +#menu_button { z-index: 10; position: absolute; right: 1em; top: -2px; font-size: 1rem; } + +.heading-of-list { + a { + margin-top: 1em; + } +} + +.hint { + margin-top: 1em; +} diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php index a8ac3797..3e15cc2f 100755 --- a/src/AppBundle/Controller/DefaultController.php +++ b/src/AppBundle/Controller/DefaultController.php @@ -377,7 +377,7 @@ class DefaultController extends Controller 'statisticsSoldProducts' => $statisticsSoldProducts, 'chiffreAffaires' => $chiffreAffaires, 'recentSells' => $mySellings, - 'allSellings' => $allSellingList, + 'allSellings' => count($mySellings), 'base_dir' => realpath($this->getParameter('kernel.project_dir')) . DIRECTORY_SEPARATOR, ]); }