split templates on dashboard
This commit is contained in:
parent
5bb843de16
commit
22817ec553
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
<div class="new-display">
|
<div class="new-display">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<button class="btn btn-warning btn-remove-all marged-v" ng-click="removeAll()" ng-disable="!CurrentSellingTotal()">
|
<button class="btn btn-warning btn-remove-all marged-v" ng-click="removeAll()" ng-disable="!CurrentSellingTotal()">
|
||||||
<i class="fa fa-trash"></i> enlever tout
|
<i class="fa fa-trash"></i> enlever tout
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="category-listing one-category col-xs-12 col-sm-4 " ng-repeat="c in categories"
|
<div class="category-listing one-category col-xs-12 col-sm-4 " ng-repeat="c in categories"
|
||||||
ng-if="! c.hidden">
|
ng-if="! c.hidden">
|
||||||
|
|
||||||
<h2 ng-class="{'hidden':c.hidden}">
|
<h2 ng-class="{'hidden':c.hidden}" class="title">
|
||||||
{{ c.name }}
|
{{ c.name }}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="product-listing" >
|
<div class="product-listing" >
|
||||||
|
|
|
@ -4,13 +4,16 @@
|
||||||
|
|
||||||
<!--caisse IHM-->
|
<!--caisse IHM-->
|
||||||
<div id="load_ok">
|
<div id="load_ok">
|
||||||
|
{% verbatim %}
|
||||||
|
( {{sellingComment}} )
|
||||||
|
{% endverbatim %}
|
||||||
<div id="listing-products" class="listing-products col-xs-12 col-md-8">
|
<div id="listing-products" class="listing-products col-xs-12 col-md-8">
|
||||||
{% include 'logged/angular/messages.html.twig' %}
|
{% include 'logged/angular/messages.html.twig' %}
|
||||||
{% include 'logged/angular/listing-products.html.twig' %}
|
{% include 'logged/angular/listing-products.html.twig' %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="sellings" class="sellings col-xs-12 col-md-4">
|
<div id="sellings" class="sellings col-xs-12 col-md-4">
|
||||||
|
|
||||||
<div class="list-sell" ng-class="{'bg-success text-success': sellingOk }">
|
<div class="list-sell" ng-class="{'bg-success text-success': sellingOk }">
|
||||||
|
|
||||||
{% include 'logged/angular/validate-button.html.twig' %}
|
{% include 'logged/angular/validate-button.html.twig' %}
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
<div id="infos_current">
|
<div class="caisse-main-box">
|
||||||
<h2>
|
|
||||||
|
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="not_loaded" ng-if="!initLoadDone">
|
<div id="not_loaded" ng-if="!initLoadDone">
|
||||||
<div class="well text-center">
|
<div class="well text-center">
|
||||||
<i class="fa fa-refresh fa-spin fa-3x"></i> Chargement en cours de vos produits
|
<i class="fa fa-refresh fa-spin fa-3x"></i> Chargement en cours de vos produits
|
||||||
|
@ -13,6 +8,4 @@
|
||||||
</div>
|
</div>
|
||||||
{% endverbatim %}
|
{% endverbatim %}
|
||||||
{% include 'logged/angular/loaded-caisse.html.twig' %}
|
{% include 'logged/angular/loaded-caisse.html.twig' %}
|
||||||
{% verbatim %}
|
</div>
|
||||||
|
|
||||||
{% endverbatim %}
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
{% verbatim %}
|
||||||
|
<!-- client actuel infos-->
|
||||||
|
<div id="client-now" class="client-now padded">
|
||||||
|
<i class="fa fa-user"></i>
|
||||||
|
|
||||||
|
<label for="sellingComment">
|
||||||
|
|
||||||
|
Client actuel: {{ activeSelling.length }} produit<span ng-if="activeSelling.length!=1">s</span>
|
||||||
|
</label>
|
||||||
|
<button type="button" class="deleter pull-right" ng-click="sellingComment = ''">
|
||||||
|
<i class="fa fa-times"></i>
|
||||||
|
</button>
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
aria-label="Note about the client"
|
||||||
|
id="sellingComment"
|
||||||
|
aria-describedby="selling-comment"
|
||||||
|
ng-model="sellingComment"
|
||||||
|
ng-model-options="{ updateOn: 'keyup' , allowInvalid: true}"
|
||||||
|
name="sellingComment"
|
||||||
|
autofocus="autofocus"
|
||||||
|
placeholder="nom ou commentaire">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endverbatim %}
|
|
@ -1,131 +1,41 @@
|
||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
<div id="caisse-now" class="tab-pane fade in active">
|
<div id="caisse-now" class=""
|
||||||
<div class="caisse-main row-fluid"
|
ng-app="caisse"
|
||||||
ng-app="caisse"
|
ng-controller="CaisseCtrl as MainCtrl">
|
||||||
ng-controller="CaisseCtrl as MainCtrl"
|
<div class="caisse-main row-fluid" >
|
||||||
>
|
|
||||||
<!--états de sauvegarde-->
|
<div class="col-xs-12 col-sm-6">
|
||||||
<div class="selling-ok alert-success alert block" ng-if="sellingOk" ng-click="sellingOk = false">
|
<!-- ligne d'informations-->
|
||||||
<i class="fa fa-save"></i>
|
|
||||||
Sauvegardé! WOHOOOOOO +{{recentSellings[recentSellings.length -1].amount}} € {{sellingComment}}
|
|
||||||
</div>
|
|
||||||
<div class="selling-ok alert-error alert block" ng-if="sellingError" ng-click="sellingError = false">
|
|
||||||
<i class="fa fa-warning"></i>
|
|
||||||
Problème de sauvegarde (pas de réseau ?)
|
|
||||||
</div>
|
|
||||||
<!-- options-->
|
|
||||||
<div class="row marged-v" ng-if="simpleDisplay">
|
|
||||||
<button class="btn btn-success" ng-click="toggleSimpleDisplay()">
|
|
||||||
<i class="fa fa-bars"></i> Affichage simple <i class="fa fa-check-circle"></i>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="row marged-v" ng-if="! simpleDisplay">
|
|
||||||
<div class="col-xs-12 col-md-6" id="main_options">
|
|
||||||
<button class="btn btn-disabled" ng-click="toggleSimpleDisplay()">
|
|
||||||
<i class="fa fa-bars"></i> Affichage simple
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
title="la vente express vous permet d'enregistrer une vente pour un seul article sans remplir le formulaire de détail"
|
|
||||||
class="btn"
|
|
||||||
ng-class="{'btn-success': show_config.expressSelling, 'btn-disabled':! show_config.expressSelling}"
|
|
||||||
ng-click="show_config.expressSelling = !show_config.expressSelling">
|
|
||||||
<i class="fa fa-shopping-cart"></i>
|
|
||||||
vente express
|
|
||||||
<span ng-if=show_config.show_config.expressSelling>
|
|
||||||
<i class="fa fa-check-circle"></i></span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
title="montrer le nombre d'objets restants dans les stocks"
|
|
||||||
class="btn"
|
|
||||||
ng-class="{'btn-success': show_config.stock_count, 'btn-disabled':!show_config.stock_count}"
|
|
||||||
ng-click="show_config.stock_count = !show_config.stock_count">
|
|
||||||
<i class="fa fa-shopping-cart"></i>
|
|
||||||
stocks
|
|
||||||
<span ng-if=show_config.stock_count>
|
|
||||||
<i class="fa fa-check-circle"></i></span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
title="montrer le nombre d'objets restants dans les stocks"
|
|
||||||
class="btn"
|
|
||||||
ng-class="{'btn-success': show_config.sold, 'btn-disabled':!show_config.sold}"
|
|
||||||
ng-click="show_config.sold = !show_config.sold">
|
|
||||||
<i class="fa fa-shopping-cart"></i>
|
|
||||||
vendus
|
|
||||||
<span ng-if=show_config.sold>
|
|
||||||
<i class="fa fa-check-circle"></i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
<br>
|
|
||||||
<div id="festival-current_info">
|
|
||||||
{% endverbatim %}
|
{% endverbatim %}
|
||||||
<a class="btn " href="{{ path('festival_index') }}">
|
{% include 'logged/listing-options.html.twig' %}
|
||||||
|
|
||||||
<i class="fa fa-th-large"></i>
|
|
||||||
Festival
|
|
||||||
</a>:
|
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
<input type="text" ng-model="activeFestival.name" placeholder="nom du festival">
|
{% endverbatim %}
|
||||||
<input class="pull-right" type="text" ng-model="activeFestival.commentaire" placeholder="commentaire">
|
{% include 'logged/festival-infos.html.twig' %}
|
||||||
<span class="badge" title="fond de caisse + chiffre d'affaire. veillez à vider votre fond de caisse ailleurs lorsqu'il devient trop important, par exemple au dela de 200€" ng-class="{'badge-warning': activeFestival.fondDeCaisseAvant + activeFestival.chiffreAffaire > 200}">
|
{% verbatim %}
|
||||||
<i class="fa fa-archive"></i>
|
</div>
|
||||||
{{ activeFestival.fondDeCaisseAvant + activeFestival.chiffreAffaire}} €
|
<div class="col-xs-12 col-sm-6">
|
||||||
</span>
|
{% endverbatim %}
|
||||||
<span class="badge badge-success">
|
{% include 'logged/customer.html.twig' %}
|
||||||
CA {{ activeFestival.chiffreAffaire }} €
|
{% verbatim %}
|
||||||
<span ng-if="sellingOk">
|
|
||||||
<i class="fa fa-check-circle-o"></i>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span class="badge badge-success">{{ activeFestival.clientsCount }} <i class="fa fa-user"></i></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--états de sauvegarde-->
|
||||||
|
<div class="selling-ok alert-success alert block" ng-if="sellingOk" ng-click="sellingOk = false">
|
||||||
|
<i class="fa fa-save"></i>
|
||||||
|
Sauvegardé! WOHOOOOOO +{{recentSellings[recentSellings.length -1].amount}} €
|
||||||
|
</div>
|
||||||
|
<div class="selling-ok alert-error alert block" ng-if="sellingError" ng-click="sellingError = false">
|
||||||
|
<i class="fa fa-warning"></i>
|
||||||
|
Problème de sauvegarde (pas de réseau ?)
|
||||||
|
</div>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% include 'logged/caisse-main.html.twig' %}
|
||||||
|
{% verbatim %}
|
||||||
|
{% endverbatim %}
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<div id="client-now" class="client-now padded">
|
|
||||||
<i class="fa fa-user"></i>
|
|
||||||
<form action="#">
|
|
||||||
|
|
||||||
<label for="sellingComment">
|
|
||||||
|
|
||||||
Client actuel: {{ activeSelling.length }} produit<span ng-if="activeSelling.length!=1">s</span>
|
|
||||||
</label>
|
|
||||||
<button type="button" class="deleter pull-right" ng-click="sellingComment = ''">
|
|
||||||
<i class="fa fa-times"></i>
|
|
||||||
</button>
|
|
||||||
<input type="text" class="form-control" aria-label="Recipient's username"
|
|
||||||
id="sellingComment" aria-describedby="basic-addon2" ng-model="activeFestival.productComment" name="sellingComment" placeholder="nom ou commentaire">
|
|
||||||
( {{sellingComment}} )
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endverbatim %}
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
{% include 'logged/caisse-main.html.twig' %}
|
|
||||||
</div>
|
|
||||||
<div id="categories" class="tab-pane fade">
|
|
||||||
<h2>Catégories</h2>
|
|
||||||
</div>
|
|
||||||
<div id="products" class="tab-pane fade">
|
|
||||||
<h2>Produits</h2>
|
|
||||||
</div>
|
|
||||||
<div id="history" class="tab-pane fade">
|
|
||||||
<h2>Historique</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{#</div>#}
|
|
||||||
{#</div>#}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<div id="festival-current_info">
|
||||||
|
<a class="btn " href=" {{ path('festival_index') }}">
|
||||||
|
<i class="fa fa-th-large"></i>
|
||||||
|
Festival:
|
||||||
|
|
||||||
|
</a>
|
||||||
|
{% verbatim %}
|
||||||
|
<input type="text" ng-model="activeFestival.name" placeholder="nom du festival">
|
||||||
|
<input class="pull-right" type="text" ng-model="activeFestival.commentaire" placeholder="commentaire">
|
||||||
|
<span class="badge" title="fond de caisse + chiffre d'affaire. veillez à vider votre fond de caisse ailleurs lorsqu'il devient trop important, par exemple au dela de 200€" ng-class="{'badge-warning': activeFestival.fondDeCaisseAvant + activeFestival.chiffreAffaire > 200}">
|
||||||
|
<i class="fa fa-archive"></i>
|
||||||
|
{{ activeFestival.fondDeCaisseAvant + activeFestival.chiffreAffaire}} €
|
||||||
|
</span>
|
||||||
|
<span class="badge badge-success">
|
||||||
|
CA {{ activeFestival.chiffreAffaire }} €
|
||||||
|
<span ng-if="sellingOk">
|
||||||
|
<i class="fa fa-check-circle-o"></i>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="badge badge-success">
|
||||||
|
{{ activeFestival.clientsCount }} <i class="fa fa-user"></i>
|
||||||
|
</span>
|
||||||
|
{% endverbatim %}
|
||||||
|
</div>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div id="festival-listing-options">
|
||||||
|
{% verbatim %}
|
||||||
|
<!-- options-->
|
||||||
|
<div class="row marged-v" ng-if="simpleDisplay">
|
||||||
|
<button class="btn btn-success" ng-click="toggleSimpleDisplay()">
|
||||||
|
<i class="fa fa-bars"></i> Affichage simple <i class="fa fa-check-circle"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="row marged-v" ng-if="! simpleDisplay">
|
||||||
|
<div class="col-xs-12 col-md-6" id="main_options">
|
||||||
|
<button class="btn btn-disabled" ng-click="toggleSimpleDisplay()">
|
||||||
|
<i class="fa fa-bars"></i> Affichage simple
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
title="la vente express vous permet d'enregistrer une vente pour un seul article sans remplir le formulaire de détail"
|
||||||
|
class="btn"
|
||||||
|
ng-class="{'btn-success': show_config.expressSelling, 'btn-disabled':! show_config.expressSelling}"
|
||||||
|
ng-click="show_config.expressSelling = !show_config.expressSelling">
|
||||||
|
<i class="fa fa-shopping-cart"></i>
|
||||||
|
vente express
|
||||||
|
<span ng-if=show_config.show_config.expressSelling>
|
||||||
|
<i class="fa fa-check-circle"></i></span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
title="montrer le nombre d'objets restants dans les stocks"
|
||||||
|
class="btn"
|
||||||
|
ng-class="{'btn-success': show_config.stock_count, 'btn-disabled':!show_config.stock_count}"
|
||||||
|
ng-click="show_config.stock_count = !show_config.stock_count">
|
||||||
|
<i class="fa fa-shopping-cart"></i>
|
||||||
|
stocks
|
||||||
|
<span ng-if=show_config.stock_count>
|
||||||
|
<i class="fa fa-check-circle"></i></span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
title="montrer le nombre d'objets restants dans les stocks"
|
||||||
|
class="btn"
|
||||||
|
ng-class="{'btn-success': show_config.sold, 'btn-disabled':!show_config.sold}"
|
||||||
|
ng-click="show_config.sold = !show_config.sold">
|
||||||
|
<i class="fa fa-shopping-cart"></i>
|
||||||
|
vendus
|
||||||
|
<span ng-if=show_config.sold>
|
||||||
|
<i class="fa fa-check-circle"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
{% endverbatim %}
|
||||||
|
</div>
|
|
@ -1,4 +1,5 @@
|
||||||
#caisse-now {
|
#caisse-now {
|
||||||
|
border: solid 3px green;
|
||||||
.product-box {
|
.product-box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
|
|
|
@ -87,7 +87,7 @@ angular
|
||||||
});
|
});
|
||||||
$scope.activeSellingFiltered = soldObjectsIdsCount;
|
$scope.activeSellingFiltered = soldObjectsIdsCount;
|
||||||
$scope.setRightAmountPaid();
|
$scope.setRightAmountPaid();
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the sum of products prices
|
* get the sum of products prices
|
||||||
|
@ -193,7 +193,7 @@ angular
|
||||||
|
|
||||||
$scope.clearSellingComment = function () {
|
$scope.clearSellingComment = function () {
|
||||||
console.log(' $scope.sellingComment', $scope.sellingComment);
|
console.log(' $scope.sellingComment', $scope.sellingComment);
|
||||||
$scope.sellingComment = '';
|
// $scope.sellingComment = '';
|
||||||
// document.querySelector('.client-now input').focus();
|
// document.querySelector('.client-now input').focus();
|
||||||
document.querySelector('.client-now input').select();
|
document.querySelector('.client-now input').select();
|
||||||
};
|
};
|
||||||
|
@ -250,16 +250,16 @@ angular
|
||||||
};
|
};
|
||||||
$scope.recentId = 0;
|
$scope.recentId = 0;
|
||||||
$scope.logger = function (stuff) {
|
$scope.logger = function (stuff) {
|
||||||
console.log('logger', stuff);
|
console.log('logger #####', stuff);
|
||||||
};
|
};
|
||||||
$scope.sendForm = function () {
|
$scope.sendForm = function () {
|
||||||
|
let sellingComment = $scope.sellingComment;
|
||||||
|
$scope.sellingComment = sellingComment;
|
||||||
|
console.log('########### SEND FORM');
|
||||||
console.log('$scope.sellingComment', $scope.sellingComment);
|
console.log('$scope.sellingComment', $scope.sellingComment);
|
||||||
console.log('$rootScope.sellingComment', $rootScope.sellingComment);
|
|
||||||
console.log('$scope.sellingComment done');
|
|
||||||
console.log("$scope.activeSelling", $scope.activeSelling);
|
|
||||||
let lesParams = {
|
let lesParams = {
|
||||||
paidByClient : $scope.paidAmount,
|
paidByClient : $scope.paidAmount,
|
||||||
sellingComment: $scope.activeFestival.productComment,
|
sellingComment: $scope.sellingComment,
|
||||||
activeSelling : $scope.activeSelling,
|
activeSelling : $scope.activeSelling,
|
||||||
activeFestival: $scope.activeFestival
|
activeFestival: $scope.activeFestival
|
||||||
};
|
};
|
||||||
|
@ -271,8 +271,6 @@ angular
|
||||||
angular
|
angular
|
||||||
.copy($scope.activeSelling)
|
.copy($scope.activeSelling)
|
||||||
});
|
});
|
||||||
console.log('lesParams sellingComment', lesParams.sellingComment);
|
|
||||||
console.log('$scope.recentSellings', $scope.recentSellings);
|
|
||||||
$scope.lesParams = lesParams;
|
$scope.lesParams = lesParams;
|
||||||
$http({
|
$http({
|
||||||
method : 'POST',
|
method : 'POST',
|
||||||
|
@ -283,7 +281,7 @@ angular
|
||||||
data : lesParams // pass in data as strings
|
data : lesParams // pass in data as strings
|
||||||
}).then(function (rep) {
|
}).then(function (rep) {
|
||||||
|
|
||||||
|
console.log('########### OK form',rep);
|
||||||
// if successful, bind success message to message
|
// if successful, bind success message to message
|
||||||
$scope.successMessage = rep.data.message;
|
$scope.successMessage = rep.data.message;
|
||||||
$scope.activeFestival.chiffreAffaire = rep.data.newChiffreAffaire;
|
$scope.activeFestival.chiffreAffaire = rep.data.newChiffreAffaire;
|
||||||
|
|
Loading…
Reference in New Issue