From c24c019dca2fd67f814fd2ba198aea5d7003a431 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Tue, 11 Jun 2024 17:37:22 +0200 Subject: [PATCH] fix sonar warning --- .../Scripts/blades/quote-detail.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/VirtoCommerce.QuoteModule.Web/Scripts/blades/quote-detail.js b/src/VirtoCommerce.QuoteModule.Web/Scripts/blades/quote-detail.js index 872c94ee..91dfaaa1 100644 --- a/src/VirtoCommerce.QuoteModule.Web/Scripts/blades/quote-detail.js +++ b/src/VirtoCommerce.QuoteModule.Web/Scripts/blades/quote-detail.js @@ -3,6 +3,9 @@ angular.module('virtoCommerce.quoteModule') 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'platformWebApp.dialogService', 'platformWebApp.metaFormsService', 'virtoCommerce.quoteModule.quotes', 'virtoCommerce.customerModule.members', function ($scope, bladeNavigationService, settings, dialogService, metaFormsService, quotes, members) { + + const QuoteProposalSentStatus = 'Proposal sent'; + var blade = $scope.blade; var onHoldCommand = { @@ -156,7 +159,7 @@ angular.module('virtoCommerce.quoteModule') message: "quotes.dialogs.proposal-submit-with-warning.message", callback: function (ok) { if (ok) { - blade.currentEntity.status = 'Proposal sent'; + blade.currentEntity.status = QuoteProposalSentStatus; saveChanges(); } } @@ -170,7 +173,7 @@ angular.module('virtoCommerce.quoteModule') message: "quotes.dialogs.proposal-submit.message", callback: function (ok) { if (ok) { - blade.currentEntity.status = 'Proposal sent'; + blade.currentEntity.status = QuoteProposalSentStatus; saveChanges(); } } @@ -179,7 +182,7 @@ angular.module('virtoCommerce.quoteModule') } }, canExecuteMethod: function () { - return blade.origEntity && blade.origEntity.status !== 'Proposal sent'; + return blade.origEntity && blade.origEntity.status !== QuoteProposalSentStatus; }, permission: blade.updatePermission },