2018-04-05 14:21:32 +02:00
|
|
|
<div class="caisse-main row"
|
|
|
|
ng-app="caisse"
|
|
|
|
ng-controller="CaisseCtrl"
|
|
|
|
>
|
|
|
|
{% verbatim %}
|
|
|
|
<div class="alert">
|
|
|
|
test stuff: {{ stuff[0] }}.
|
|
|
|
<br>compte: {{ stuff.length }}.
|
|
|
|
</div>
|
|
|
|
<div class="well">
|
|
|
|
{{productsFromDB.length}}
|
|
|
|
</div>
|
2018-04-05 16:40:40 +02:00
|
|
|
|
|
|
|
<div class="listing-products col-xs-7">
|
|
|
|
<div class="category-listing" ng-repeat="c in categories">
|
|
|
|
<h2>
|
|
|
|
{{ c.name }}
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<button ng-repeat="p in c.products track by p.id"
|
|
|
|
class="btn btn-default"
|
|
|
|
ng-click="addProduct( p )">
|
2018-04-04 18:37:20 +02:00
|
|
|
{{ p.name }}
|
2018-04-05 16:40:40 +02:00
|
|
|
<span class="badge">
|
|
|
|
{{ p.price }}
|
|
|
|
</span>
|
|
|
|
|
2018-04-04 18:37:20 +02:00
|
|
|
</button>
|
2018-04-04 17:42:27 +02:00
|
|
|
</div>
|
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
</div>
|
|
|
|
<div class="sellings col-xs-5">
|
|
|
|
<div class="current-selling">
|
|
|
|
<form action="#">
|
2018-04-05 17:01:36 +02:00
|
|
|
Festival: {{activeFestival.name}}
|
|
|
|
<input type="text" ng-model="activeFestival.commentaire">
|
|
|
|
<hr>
|
|
|
|
{{activeSelling.length}} produits
|
2018-04-05 16:40:40 +02:00
|
|
|
<ul>
|
|
|
|
<li ng-repeat="p in activeSelling track by $index">
|
2018-04-05 14:21:32 +02:00
|
|
|
<div class="row">
|
2018-04-05 16:40:40 +02:00
|
|
|
<div class="col-xs-6">
|
2018-04-05 17:01:36 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" ng-model="p.name">
|
|
|
|
<div class="btn btn-warning input-group-addon" ng-click="activeSelling.splice($index,1)">
|
|
|
|
<i class="fa fa-trash"></i>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
</div>
|
2018-04-05 14:21:32 +02:00
|
|
|
</div>
|
2018-04-05 16:40:40 +02:00
|
|
|
<div class="col-xs-6 text-right">
|
|
|
|
<strong>
|
|
|
|
<input type="number" ng-model="p.price"> €
|
|
|
|
</strong>
|
2018-04-05 14:21:32 +02:00
|
|
|
</div>
|
2018-04-04 17:42:27 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
</li>
|
2018-04-05 14:21:32 +02:00
|
|
|
</ul>
|
2018-04-05 17:01:36 +02:00
|
|
|
<div class="text-right">
|
|
|
|
<h3 >Total: <strong>{{CurrentSellingTotal()}}€</strong></h3>
|
|
|
|
<input type="number" id="paid_amount" ng-model="paidAmount">
|
|
|
|
<h3>Rendu: {{ CurrentSellingTotal() - paidAmount }}€</h3>
|
|
|
|
</div>
|
2018-04-05 14:21:32 +02:00
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
{% endverbatim %}
|
|
|
|
<div class="row">
|
2018-04-05 17:01:36 +02:00
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
<div class="col">
|
2018-04-05 17:01:36 +02:00
|
|
|
<button class="btn btn-primary btn-block" id="validate_selling" ng-click="sendForm()">
|
|
|
|
<i class="fa fa-check"></i>
|
|
|
|
Valider
|
2018-04-05 16:40:40 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
2018-04-05 17:01:36 +02:00
|
|
|
<button class="btn btn-default" id="pause_selling" ng-click="pauseSelling()">
|
|
|
|
<i class="fa fa-clock"></i>
|
|
|
|
Pause
|
2018-04-05 16:40:40 +02:00
|
|
|
</button>
|
2018-04-04 17:42:27 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
|
|
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
<div class="selling-on-hold">
|
|
|
|
<h4>
|
|
|
|
Ventes en pause
|
|
|
|
</h4>
|
2018-04-05 17:01:36 +02:00
|
|
|
{% verbatim %}
|
2018-04-05 16:40:40 +02:00
|
|
|
<ul>
|
2018-04-05 17:01:36 +02:00
|
|
|
<li ng-repeat="list in pausedSellings track by $index" ng-click="setBackPausedSelling(list, $index)">
|
|
|
|
{{ $index }}) {{ list.products.length }} produits,
|
|
|
|
<strong>
|
|
|
|
{{ sumOfList(list) }}€
|
|
|
|
</strong>
|
|
|
|
</li>
|
2018-04-05 16:40:40 +02:00
|
|
|
</ul>
|
2018-04-05 17:01:36 +02:00
|
|
|
{% endverbatim %}
|
2018-04-05 16:40:40 +02:00
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
<div class="selling-history">
|
|
|
|
<h4>
|
|
|
|
Ventes récentes
|
|
|
|
</h4>
|
|
|
|
{% if recentSells %}
|
|
|
|
<ul>
|
|
|
|
{% for s in recentSells %}
|
|
|
|
<li>{{ s.date|date('Y/m/d H:i:s') }} {{ s.amount }}€</li>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
{% else %}
|
|
|
|
aucune
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-04-04 17:42:27 +02:00
|
|
|
</div>
|