Skip to content

Commit

Permalink
reset order id on order close
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegoO committed Jul 17, 2024
1 parent cc69026 commit 0d0b005
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module('virtoCommerce.orderModule')
.controller('virtoCommerce.orderModule.operationDetailController', ['$scope', 'platformWebApp.dialogService', 'platformWebApp.bladeNavigationService', 'virtoCommerce.orderModule.order_res_customerOrders', 'platformWebApp.objCompareService', '$timeout', 'focus', '$rootScope',
function ($scope,dialogService, bladeNavigationService, customerOrders, objCompareService, $timeout, focus, $rootScope) {
.controller('virtoCommerce.orderModule.operationDetailController', ['$scope', '$location', 'platformWebApp.dialogService', 'platformWebApp.bladeNavigationService', 'virtoCommerce.orderModule.order_res_customerOrders', 'platformWebApp.objCompareService', '$timeout', 'focus', '$rootScope',
function ($scope, $location, dialogService, bladeNavigationService, customerOrders, objCompareService, $timeout, focus, $rootScope) {
var blade = $scope.blade;
blade.updatePermission = 'order:update';

Expand Down Expand Up @@ -275,6 +275,10 @@ angular.module('virtoCommerce.orderModule')
}

blade.onClose = function (closeCallback) {
if (blade.currentEntity.operationType === "CustomerOrder") {
$location.search({ orderId: null });
}

bladeNavigationService.showConfirmationIfNeeded(isDirty(), canSave(), blade, $scope.saveChanges, closeCallback, "orders.dialogs.operation-save.title", "orders.dialogs.operation-save.message");
};

Expand Down

0 comments on commit 0d0b005

Please sign in to comment.