From 0d0b005d097e2ec4db2c8acdd4e33423eadc8d63 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Wed, 17 Jul 2024 10:52:18 +0200 Subject: [PATCH] reset order id on order close --- .../Scripts/blades/operation-detail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/operation-detail.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/operation-detail.js index b03ec1db..0c0a117d 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/operation-detail.js +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/operation-detail.js @@ -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'; @@ -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"); };