caisse-bliss/app/Resources/views/logged/caisse-main.html.twig
2018-04-05 17:01:36 +02:00

124 lines
3.4 KiB
Twig

<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>
<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 )">
{{ p.name }}
<span class="badge">
{{ p.price }}
</span>
</button>
</div>
</div>
<div class="sellings col-xs-5">
<div class="current-selling">
<form action="#">
Festival: {{activeFestival.name}}
<input type="text" ng-model="activeFestival.commentaire">
<hr>
{{activeSelling.length}} produits
<ul>
<li ng-repeat="p in activeSelling track by $index">
<div class="row">
<div class="col-xs-6">
<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>
</div>
</div>
<div class="col-xs-6 text-right">
<strong>
<input type="number" ng-model="p.price"> €
</strong>
</div>
</div>
</li>
</ul>
<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>
{% endverbatim %}
<div class="row">
<div class="col">
<button class="btn btn-primary btn-block" id="validate_selling" ng-click="sendForm()">
<i class="fa fa-check"></i>
Valider
</button>
</div>
<div class="col">
<button class="btn btn-default" id="pause_selling" ng-click="pauseSelling()">
<i class="fa fa-clock"></i>
Pause
</button>
</div>
</div>
</form>
<hr>
</div>
<div class="selling-on-hold">
<h4>
Ventes en pause
</h4>
{% verbatim %}
<ul>
<li ng-repeat="list in pausedSellings track by $index" ng-click="setBackPausedSelling(list, $index)">
{{ $index }}) {{ list.products.length }} produits,
<strong>
{{ sumOfList(list) }}€
</strong>
</li>
</ul>
{% endverbatim %}
<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>
</div>