v.2.15
Discounts block update
This commit is contained in:
@@ -392,7 +392,7 @@
|
||||
$scope.deleted_sum = Math.roundNG(data.sum, -2);
|
||||
});
|
||||
|
||||
smartRequest.get('dashboard/online/discount', function (data) {
|
||||
smartRequest.get('v1/onlinediscount', function (data) {
|
||||
$scope.discounts = Math.roundNG(data.count, -2);
|
||||
$scope.discounts_sum = Math.roundNG(data.sum, -2);
|
||||
$scope.tot_disc_sum = Math.roundNG(data.total_sum, -2);
|
||||
@@ -555,7 +555,7 @@
|
||||
$scope.deleted_sum = Math.roundNG(data.sum, -2);
|
||||
});
|
||||
|
||||
smartRequest.get('dashboard/online/discount', function (data) {
|
||||
smartRequest.get('v1/onlinediscount', function (data) {
|
||||
$scope.discounts = Math.roundNG(data.count, -2);
|
||||
$scope.discounts_sum = Math.roundNG(data.sum, -2);
|
||||
$scope.tot_disc_sum = Math.roundNG(data.total_sum, -2);
|
||||
@@ -715,6 +715,13 @@
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getMoreDiscount = function () {
|
||||
smartRequest.get('v1/morediscount/', function (data) {
|
||||
$scope.moreData = data;
|
||||
$('#get-more-discount').modal();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getItems = function (modal, order) {
|
||||
$('#get-more-' + modal).modal('toggle');
|
||||
smartRequest.get('dashboard/' + modal + '/items?order=' + order.number, function (data) {
|
||||
@@ -723,6 +730,14 @@
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getItemsDiscount = function (order) {
|
||||
$('#get-more-discount').modal('toggle');
|
||||
smartRequest.get('v1/discountitems?order=' + order.number, function (data) {
|
||||
$scope.order = data;
|
||||
$('#items-discount').modal('toggle');
|
||||
});
|
||||
};
|
||||
|
||||
$scope.returnModal = function (name) {
|
||||
$('#items-' + name).on('hidden.bs.modal', function (event) {
|
||||
$('#get-more-' + name).modal('show');
|
||||
@@ -735,7 +750,6 @@
|
||||
$scope.order = data;
|
||||
smartRequest.get('v1/orderhistory?order_id=' + order.number, function (actions) {
|
||||
$scope.actions = actions;
|
||||
console.log(actions);
|
||||
});
|
||||
$('#items-total').modal('toggle');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user