Skip to content

Commit

Permalink
fix sonar warning
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegoO committed Jun 11, 2024
1 parent 0b89f77 commit c24c019
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -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
},
Expand Down

0 comments on commit c24c019

Please sign in to comment.