mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
display recent sellings of current festival
This commit is contained in:
parent
20611e96c2
commit
66ca3bdf31
5 changed files with 46 additions and 20 deletions
|
@ -56,7 +56,7 @@ angular
|
|||
*/
|
||||
$scope.setRightAmountPaid = function () {
|
||||
// debugger;
|
||||
$scope.paidAmount += $scope.sumOfList($scope.activeSelling);
|
||||
$scope.paidAmount = $scope.sumOfList($scope.activeSelling);
|
||||
}
|
||||
/**
|
||||
* deduplicate the active selling items in the view,
|
||||
|
@ -290,11 +290,15 @@ angular
|
|||
$scope.countProductsSoldForActiveFestival = rep.data.activeFestival.sold;
|
||||
$scope.showTemporaryMessage();
|
||||
$scope.clearCurrentSelling();
|
||||
console.log(rep);
|
||||
$scope.sellingComment = '';
|
||||
// Focus sur le champ de commentaire pour la prochaine vente
|
||||
document.querySelector('#sellingComment').focus();
|
||||
|
||||
|
||||
if (!rep.success) {
|
||||
// if not successful, bind errors to error variables
|
||||
$scope.errors = rep.errors;
|
||||
}
|
||||
|
||||
}, function (rep) {
|
||||
console.log('nope! ', rep.data);
|
||||
$scope.showTemporaryErrorMessage();
|
||||
|
@ -304,12 +308,16 @@ angular
|
|||
|
||||
$scope.sellingOk = false;
|
||||
$scope.sellingError = false;
|
||||
$scope.tempMessage = {};
|
||||
$scope.tempMessage;
|
||||
$scope.showTemporaryMessage = function () {
|
||||
|
||||
$scope.sellingOk = true;
|
||||
$timeout.cancel($scope.tempMessage);
|
||||
$scope.tempMessage = $timeout(function () {
|
||||
|
||||
if ($scope.tempMessage) {
|
||||
$timeout.cancel($scope.tempMessage);
|
||||
}
|
||||
// $scope.tempMessage =
|
||||
$timeout(function () {
|
||||
console.log('hide message');
|
||||
$scope.sellingOk = false;
|
||||
}, 2000)
|
||||
|
@ -326,8 +334,11 @@ angular
|
|||
return;
|
||||
}
|
||||
$scope.sellingError = true;
|
||||
$timeout.cancel($scope.tempMessage);
|
||||
$scope.tempMessage = $timeout(function () {
|
||||
if ($scope.tempMessage) {
|
||||
$timeout.cancel($scope.tempMessage);
|
||||
}
|
||||
// $scope.tempMessage =
|
||||
$timeout(function () {
|
||||
console.log('hide message');
|
||||
$scope.sellingError = false;
|
||||
}, 2000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue