Order history
Small fixes
This commit is contained in:
miroman-afk
2022-04-12 01:43:05 +03:00
parent 85fd6af04f
commit 53dfb77d7a
9 changed files with 286 additions and 70 deletions

View File

@@ -21,8 +21,8 @@
})
.controller('DashboardCtrl', DashboardCtrl);
DashboardCtrl.inject = ['$scope', 'smartRequest', '$interval', '$location'];
function DashboardCtrl($scope, smartRequest, $interval, $location) {
DashboardCtrl.inject = ['$scope', 'smartRequest', '$interval', '$location', 'Notification'];
function DashboardCtrl($scope, smartRequest, $interval, $location, Notification) {
$(document).ready(function() {
if (moment(moment().format('YYYY-MM-DD')).isAfter('2021-12-25')) {
if (moment(moment().format('YYYY-MM-DD')).isBefore('2022-01-10')) {
@@ -105,7 +105,7 @@
$scope.deleted_sum = 0;
$scope.discounts = 0;
$scope.discounts_sum = 0;
$scope.bill = 0;
$scope.personals = [];
$scope.dishes = [];
@@ -335,6 +335,13 @@
task: 'online',
terminal: $scope.terminalId,
}, function(data) {
$('#preload-modal').modal();
setTimeout(function() {
Notification.success('Данные синхронизируются. Обновите страницу через 5 минут.');
$('#preload-modal').modal('toggle');
}, 5000);
});
}
});
@@ -728,6 +735,7 @@
$scope.order = data;
smartRequest.get('v1/orderhistory?order_id=' + order.number, function (actions) {
$scope.actions = actions;
console.log(actions);
});
$('#items-total').modal('toggle');
});