crud style, history table

This commit is contained in:
ty kayn 2019-06-12 14:52:58 +02:00
parent 892f52e49a
commit bb7f8680fc
9 changed files with 120 additions and 70 deletions

View File

@ -1,5 +1,4 @@
<footer class="big-footer text-center navbar-inverse navbar-footer ">
<div class="container">
<sub class="footer-note text-center">
{% trans %}global.made_by{% endtrans %} Tykayn /
<a href="http://www.cipherbliss.com">
@ -11,5 +10,4 @@
contact
</a>
</sub>
</div>
</footer>

View File

@ -82,10 +82,14 @@
<i class="fa fa-envelope-open-o"></i>
contactez-moi pour tout renseignement:
<a href="mailto:contact@cipherbliss.com"> par email</a>
, Telegram @tykayn, ou sur Mastodon
<a href="https://mamot.fr/@tykayn">
, Telegram
<a href="https://t.me/tykayn">
@tykayn
</a>
, ou sur Mastodon
<a href="https://mastodon.cipherbliss.com/@tykayn">
<img src="https://en.gravatar.com/userimage/53061325/811d383aa2ebb8d2d83baab7da5f4a7b.jpeg"
alt="avatar Mastodon" width="50" height="50"> @tykayn@mamot.fr
alt="avatar Mastodon" width="50" height="50"> @tykayn
</a>
</div>

View File

@ -1,7 +1,7 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="row heading-of-list">
<div class="col-xs-6">
<h1>Festivals</h1></div>
<div class="col-xs-6">
@ -62,7 +62,9 @@
<td>{{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}</td>
<td>
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
<span class="badge badge-success">
Actuel
</span>
{% else %}
<a class="btn btn-success" href="{{ path('set_active_festival', { 'id': festival.id }) }}">
choisir comme actuel

View File

@ -14,7 +14,7 @@
<h2>
<i class="fa fa-users"></i>
<span class="chiffre key-figure">
{{ allSellings |length }}
{{ allSellings }}
</span>
Clients
</h2>
@ -34,7 +34,7 @@
<i class="fa fa-shopping-cart"></i>
<span class="chiffre key-figure">
{% if allSellings %}
{{ (chiffreAffaires / (allSellings |length))|round }}
{{ (chiffreAffaires / (allSellings))|round }}
{% else %}
?
{% endif %}
@ -72,53 +72,65 @@
</div>
</div>
<div id="last-sellings">
<hr>
<div id="last-sellings">
<div class="row">
<div class="col-xs-12">
<div class="table">
<div class="row-fluid">
<div class="col-xs-12">
<h2>
{{ recentSells |length }} Dernières ventes
</h2>
<div class="table">
<div class="row">
<div class="col-xs-3">
date
</div>
<div class="col-xs-3">
commentaire
</div>
<div class="col-xs-3">
produits
</div>
<div class="col-xs-3">
montant
</div>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<td>date</td>
<td>commentaire</td>
<td>produits</td>
<td>montant</td>
<td>Actions</td>
</tr>
</thead>
<tbody>
{% for vente in recentSells %}
<div class="row">
<div class="col-xs-3">
{{ vente.date |date('Y-m-d H:i:s') }}
</div>
<div class="col-xs-3">
{{ vente.comment }}
</div>
<div class="col-xs-3">
{{ vente.productsSold |length }}
</div>
<div class="col-xs-3">
<tr>
<td> {{ vente.date |date('Y-m-d H:i:s') }}</td>
<td>{{ vente.comment }}</td>
<td class="text-right">{{ vente.productsSold |length }}</td>
<td class="text-right">
{{ vente.amount }}
</td>
<td>
<a href="{{ path('sellrecord_delete',{id: vente.id }) }}"
class="btn btn-warning pull-right">
<i class="fa fa-trash"></i>
</a>
</td>
</tr> {% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% include ':logged:history-script.html.twig' %}
</div>
{% endblock %}

View File

@ -1,17 +1,20 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="row heading-of-list">
<div class="col-xs-6">
<h1>Produits</h1></div>
<div class="col-xs-6">
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
<span class="alert alert-info pull-right">
<span class="hint alert alert-info pull-right">
astuce: Utilisez
<strong>
<a href="{{ path('import') }}">
l'import de masse
</a>
</strong>
pour créer plusieurs produits et catégories à la fois
</span>
</div>
@ -27,6 +30,7 @@
<th>Image</th>
<th>Price</th>
<th>Stocks</th>
<th>Vendus</th>
<th>Comment</th>
<th>Actions</th>
</tr>
@ -54,6 +58,7 @@
<td>{{ product.image }}</td>
<td>{{ product.price }}</td>
<td>{{ product.stockCount }}</td>
<td>{{ product.productsSold | length }}</td>
<td>{{ product.comment }}</td>
<td>
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">

View File

@ -1,7 +1,7 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="row heading-of-list">
<div class="col-xs-6">
<h1>Catégorie de produit</h1></div>
<div class="col-xs-6">

View File

@ -1,7 +1,16 @@
{% extends 'base.html.twig' %}
{% block body %}
<h1>Sellrecords list</h1>
<div class="row heading-of-list">
<div class="col-xs-6">
<h1>Enregistrements de ventes</h1>
</div>
<div class="col-xs-6">
<a class="btn btn-primary" href="{{ path('sellrecord_new') }}">Nouvel enregistrement</a>
</div>
</div>
<table class="table-responsive table-striped table table-bordered table-light">
<thead>

View File

@ -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;
}

View File

@ -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,
]);
}