diff --git a/app/Resources/views/logged/dashboard.html.twig b/app/Resources/views/logged/dashboard.html.twig
index 2628967f..f2c7a992 100755
--- a/app/Resources/views/logged/dashboard.html.twig
+++ b/app/Resources/views/logged/dashboard.html.twig
@@ -40,12 +40,13 @@
-
+
{% verbatim %}
+
Client actuel:
-
{% verbatim %}
+
+
+
+
+ Sauvegardé!
+
+
+
+ Problème de sauvegarde (pas de réseau ?)
+
+ {% endverbatim %}
+
-
- {% include 'logged/caisse-main.html.twig' %}
-
+
+ {% include 'logged/caisse-main.html.twig' %}
+
@@ -79,8 +91,9 @@
Historique
-
-
+
+
+
{##}
{##}
diff --git a/assets/css/pages/_dashboard.scss b/assets/css/pages/_dashboard.scss
index 6ea57109..a52d06d9 100755
--- a/assets/css/pages/_dashboard.scss
+++ b/assets/css/pages/_dashboard.scss
@@ -86,12 +86,27 @@
height: 70vh;
overflow: auto;
}
-.sellings{
- .remove-item{
+
+.sellings {
+ .remove-item {
margin-left: 1em;
}
}
-#not_loaded{
+
+#not_loaded {
width: 100%;
height: 75vh;
}
+
+.selling-ok {
+ position: fixed;
+ bottom: 0;
+ left: 2em;
+ z-index: 10;
+}
+
+.block{
+ display: block;
+ width: calc(100% - 2em);
+ text-align:center;
+}
diff --git a/assets/js/parts/main.js b/assets/js/parts/main.js
index 4ca00aca..f9e88155 100755
--- a/assets/js/parts/main.js
+++ b/assets/js/parts/main.js
@@ -10,7 +10,7 @@ require('bootstrap-sass');
$(document).ready(function () {
$('[data-toggle="popover"]').popover();
- $('#menu_button').on('click', function(){
+ $('#menu_button').on('click', function () {
$('#menu-dashboard').toggleClass('shown');
})
});
@@ -87,7 +87,6 @@ angular
}
});
$scope.activeSellingFiltered = soldObjectsIdsCount;
-
}
/**
@@ -283,22 +282,40 @@ angular
}
}, function (rep) {
console.log('nope! ', rep.data);
+ $scope.showTemporaryErrorMessage();
})
;
};
$scope.sellingOk = false;
+ $scope.sellingError = false;
$scope.tempMessage = {};
$scope.showTemporaryMessage = function () {
+ console.log('show message');
if ($scope.sellingOk) {
+ $scope.sellingOk = false;
return;
}
$scope.sellingOk = true;
$timeout.cancel($scope.tempMessage);
$scope.tempMessage = $timeout(function () {
+ console.log('hide message');
$scope.sellingOk = false;
}, 2000)
};
+ $scope.showTemporaryErrorMessage = function () {
+ console.log('show message');
+ if ($scope.sellingError) {
+ $scope.sellingError = false;
+ return;
+ }
+ $scope.sellingError = true;
+ $timeout.cancel($scope.tempMessage);
+ $scope.tempMessage = $timeout(function () {
+ console.log('hide message');
+ $scope.sellingError = false;
+ }, 2000)
+ };
$scope.init = (function () {
$scope.fetchProductsFromDB();
})();