3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-06-01 21:11:46 +00:00
coope/gestion/templates/gestion/manage.html

233 lines
7.3 KiB
HTML
Raw Permalink Normal View History

2018-10-05 22:03:02 +00:00
{% extends "base.html" %}
{% load static %}
2019-06-09 23:01:52 +00:00
{%block entete%}Gestion de la Coopé Technopôle Metz{%endblock%}
2018-10-05 22:03:02 +00:00
{% block navbar %}
<ul>
2018-12-02 18:26:33 +00:00
{% if perms.gestion.add_consumptionhistory %}<li><a href="#first">Commande</a></li>{% endif %}
{% if perms.gestion.add_reload %}<li><a href="#second">Rechargement Client</a></li>{% endif %}
{% if perms.gestion.add_refund %}<li><a href="#third">Remboursement client</a><li>{% endif %}
2018-10-05 22:03:02 +00:00
</ul>
{% endblock %}
{% block content %}
2019-01-06 04:18:31 +00:00
{% if floating_buttons %}
<div class="alt_payment_buttons">
{% for pm in pay_buttons %}
<button class="button small pay_button" data-payment="{{pm.pk}}"><i class="fa fa-{{pm.icon}}"></i></button><br>
{% endfor %}
</div>
{% endif %}
2018-10-05 22:03:02 +00:00
<a class="up_button" href="#intro">
UP
</a>
<style>
2019-01-06 04:18:31 +00:00
.alt_payment_buttons{
display:block;
background-color:white;
position:fixed;
right:0;
padding-right: 1em;
top:50%;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.alt_payment_buttons button{
min-width: 0 !important;
background-color: white !important;
}
2018-10-05 22:03:02 +00:00
.up_button{
display:block;
background-color:white;
position:fixed;
border-radius:100%;
width:50px;
height:50px;
color:black;
text-align:center;
line-height:50px;
right:1em;
2019-01-06 04:18:31 +00:00
bottom : 1em;
2018-10-05 22:03:02 +00:00
}
</style>
2018-12-02 18:26:33 +00:00
{% if perms.gestion.add_consumptionhistory %}
2019-09-23 10:44:32 +00:00
<section id="first" class="main">
2018-10-05 22:03:02 +00:00
<div class="spotlight">
<div class="content">
<header class="major">
<h2>Transaction</h2>
</header>
<div class="row uniform">
<div class="12u$">
{{gestion_form}}
</div>
</div>
<div class="row uniform">
<h3>Récapitulatif</h3>
</div>
<div class="row uniform">
<div class="12u$">
<table id="sumUpTable">
<thead>
<tr>
<th>Solde</th>
<th>Montant total de la commande</th>
<th>Solde après la commande</th>
<th>Payer</th>
</tr>
</thead>
<tbody>
<tr>
<td id="balance">0€</td>
<td id="totalAmount">0€</td>
<td id="totalAfter">0€</td>
2019-09-22 13:32:40 +00:00
<td>{% for pm in pay_buttons %}<button class="btn small pay_button" data-payment="{{pm.pk}}"><i class="fa fa-{{pm.icon}}"></i> {{pm.name}}</button> {% endfor %} <a class="button small" href="" tooltip="lol"><i class="fa fa-times"></i> Annuler</a></td>
2018-10-05 22:03:02 +00:00
</tr>
</tbody>
</table>
</div>
</div>
<div class="row uniform">
<h3>Produits</h3>
</div>
<div class="row uniform">
<div class="12u$">
<table id="productTable" type="input" name="tableau" class="alt">
<thead>
<tr>
<th>Nom Produit</th>
<th>Prix Unitaire</th>
<th>Quantité</th>
<th>Sous-total</th>
</tr>
</thead>
<tbody id="items">
</tbody>
</table>
</div>
</div>
<div class="row uniform">
<div class="12u$">
<div class="boutonProduit">
<table>
<tbody class="actions" id="bouton Produit">
2019-01-22 19:27:18 +00:00
<tr class="cotisation-hidden" style="text-align:center; font-weight:bold;"><td colspan="4">Cotisations</td></tr>
{% for cotisation in cotisations %}
2019-06-23 14:43:23 +00:00
{% if forloop.counter0|divisibleby:3 %}
2019-01-22 19:27:18 +00:00
<tr class="cotisation-hidden" style="text-align:center">
{% endif %}
<td class="cotisation-hidden"><button class="cotisation" target="{{cotisation.pk}}">Cotisation {{cotisation.duration}} jours ({{cotisation.amount}} €)</button></td>
2019-06-23 14:43:23 +00:00
{% if forloop.counter|divisibleby:3 %}
2019-01-22 19:27:18 +00:00
</tr>
{% endif %}
{% endfor %}
2019-06-23 14:43:23 +00:00
{% if not cotisations|divisibleby:3 %}
2019-01-22 19:27:18 +00:00
</tr>
{% endif %}
2019-09-22 13:32:40 +00:00
<tr style="text-align:center; font-weight:bold;">
<td colspan="1">Rechargements</td>
<td>
<div class="dropdown">
<button onclick="dropdown('myDropdown1')" class="dropbtn small">Rechargement 1€</button>
<div id="myDropdown1" class="dropdown-content">
{% for pm in pay_buttons %}{% if not pm.affect_balance%}<a class="reload" data-payment="{{pm.pk}}" data-payment-name="{{pm.name}}" target="1"><i class="fa fa-{{pm.icon}}"></i> {{pm.name}}</a> {% endif %}{% endfor %}
</div>
</div>
</td>
<td>
<div class="dropdown">
<button onclick="dropdown('myDropdown2')" class="dropbtn small" target="myDropdown2">Rechargement 10€</button>
<div id="myDropdown2" class="dropdown-content">
{% for pm in pay_buttons %}{% if not pm.affect_balance%}<a class="reload" data-payment="{{pm.pk}}" data-payment-name="{{pm.name}}" target="10"><i class="fa fa-{{pm.icon}}"></i> {{pm.name}}</a> {% endif %}{% endfor %}
</div>
</div>
</td>
</tr>
2018-10-05 22:03:02 +00:00
<tr style="text-align:center; font-weight:bold;"><td colspan="4">Bières pression</td></tr>
2018-11-22 21:52:15 +00:00
{% for product in bieresPression %}
2019-06-23 14:43:23 +00:00
{% if forloop.counter0|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
<tr style="text-align:center">
{% endif %}
2019-06-09 23:26:54 +00:00
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
2019-06-23 14:43:23 +00:00
{% if forloop.counter|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
{% endfor %}
2019-06-23 14:43:23 +00:00
{% if not bieresPression|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
2019-05-03 19:09:32 +00:00
{% for category in categories %}
2019-05-06 06:41:34 +00:00
{% if category.active_products.count > 0 %}
2019-05-03 19:09:32 +00:00
<tr style="text-align:center; font-weight:bold;"><td colspan="4">{{category}}</td></tr>
{% for product in category.active_products %}
2019-06-23 14:43:23 +00:00
{% if forloop.counter0|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
<tr style="text-align:center">
2019-05-06 06:41:34 +00:00
{% endif %}
2019-06-09 23:26:54 +00:00
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
2019-06-23 14:43:23 +00:00
{% if forloop.counter|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
{% endfor %}
2019-06-23 14:43:23 +00:00
{% if not category.active_products|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
2019-05-06 07:40:40 +00:00
{% endif %}
2018-10-05 22:03:02 +00:00
{% endfor %}
{% if menus %}
<tr style="text-align:center; font-weight:bold;"><td colspan="4">Menus</td></tr>
2018-11-22 21:52:15 +00:00
{% for product in menus %}
2019-06-23 14:43:23 +00:00
{% if forloop.counter0|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
<tr style="text-align:center">
{% endif %}
2019-06-09 23:26:54 +00:00
<td><button class="menu {% if product.adherent_required %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
2019-06-23 14:43:23 +00:00
{% if forloop.counter|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
{% endfor %}
2019-06-23 14:43:23 +00:00
{% if not menus|divisibleby:3 %}
2018-10-05 22:03:02 +00:00
</tr>
{% endif %}
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
2018-12-02 18:26:33 +00:00
{% endif %}
{% if perms.gestion.add_reload %}
2018-10-05 22:03:02 +00:00
<section id="second" class="main">
<header class="major">
<h2>Rechargement client</h2>
</header>
<form method="post" action="{% url 'gestion:reload' %}">
{% csrf_token %}
{{reload_form}}
<br>
2019-01-17 22:16:43 +00:00
<button type="submit"><i class="fa fa-hand-holding-usd"></i> Recharger</button>
2018-10-05 22:03:02 +00:00
</form>
</section>
{% endif %}
{% if perms.gestion.can_refund %}
<section id="third" class="main">
<header class="major">
<h2>Remboursement client</h2>
</header>
<form method="post" action="{% url 'gestion:refund' %}">
{% csrf_token %}
{{refund_form}}
<br>
2019-01-17 22:16:43 +00:00
<button type="submit"><i class="fa fa-file-invoice-dollar"></i> Rembourser</button>
2018-10-05 22:03:02 +00:00
</form>
</section>
{% endif %}
{{gestion_form.media}}
2018-11-22 21:52:15 +00:00
{{reload_form.media}}
{{refund_form.media}}
2018-10-05 22:03:02 +00:00
<script src="{% static 'manage.js' %}"></script>
{%endblock%}