mass import ok, liens entre série et festival CRUD ok

This commit is contained in:
Tykayn 2025-02-26 17:14:37 +01:00 committed by tykayn
parent e973573fd7
commit b79fc2ac9f
8 changed files with 152 additions and 79 deletions

View file

@ -110,26 +110,29 @@
<tr>
<td> {{ vente.id }}</td>
<td> {{ vente.date |date('Y-m-d H:i:s') }}</td>
<td>{{ vente.comment }}</td>
<td>
{# {{ vente.comment }} #}
</td>
<td class="text-right">
{% if vente.productsSold |length >1 %}
{% if vente.products |length >1 %}
<strong>
{{ vente.productsSold |length }}
{{ vente.products |length }}
</strong> produits
{% else %}
{% if vente.productsSold and vente.productsSold.0 is defined %}
{% if vente.products and vente.products.0 is defined %}
{{ vente.productsSold.0.name }}
{{ vente.products.0.name }}
{% endif %}
{% endif %}
</td>
<td class="text-right">
{{ vente.amount }}
{{ vente.sum }}
</td>
<td>
<a href="{{ path('sellrecord_delete',{id: vente.id }) }}"
<a href="{{ path('app_selling_delete',{id: vente.id }) }}"
class="btn btn-warning pull-right">
<i class="fa fa-trash"></i>
</a>

View file

@ -1,5 +1,5 @@
<div id="mass-register">
<form action="{{ path('mass_create') }}" method="post">
<form action="{{ path('mass_create') }}" method="POST">
<div class="row">
<div class="col-xs-12 col-sm-6">
@ -35,9 +35,14 @@ catégorie: dessin à la demande
nom de catégorie existe déjà, le produit sera associé avec celle-ci.
</label>
<textarea style="width: 100%;" name="produits" id="produits" cols="30" rows="10"
value="catégorie: livre
les moutaines;5€
la laine des moutons;6€
star wars spécial noël;7€
catégorie: poster
super bannière A2;10€"
placeholder="catégorie et produits">
catégorie: livre
mon livre ; 5€
</textarea>
<input class="btn btn-primary btn-block" type="submit" value="créer en masse">
</div>

View file

@ -11,6 +11,7 @@
<th>Id</th>
<th>Name</th>
<th>DateCreation</th>
<th>Nombre de festivals</th>
<th>actions</th>
</tr>
</thead>
@ -20,6 +21,7 @@
<td>{{ serie_festival.id }}</td>
<td>{{ serie_festival.name }}</td>
<td>{{ serie_festival.dateCreation ? serie_festival.dateCreation|date('Y-m-d') : '' }}</td>
<td>{{ serie_festival.festivals|length }}</td>
<td>
<a href="{{ path('app_serie_festival_show', {'id': serie_festival.id}) }}">show</a>
<a href="{{ path('app_serie_festival_edit', {'id': serie_festival.id}) }}">edit</a>
@ -27,7 +29,7 @@
</tr>
{% else %}
<tr>
<td colspan="4">no records found</td>
<td colspan="5">Aucun enregistrement trouvé</td>
</tr>
{% endfor %}
</tbody>