diff --git a/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.controller.js b/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.controller.js index a945e930a..6493b04a5 100644 --- a/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.controller.js +++ b/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.controller.js @@ -41,6 +41,7 @@ angular.module('managerApp').controller('TelecomTelephonyAliasConfigurationLines this.copyContactCenterSolution = angular.copy(ccs); [this.queue] = queues; + this.copyQueue = angular.copy(this.queue); this.enums = enums; this.selectedCaller = _.find( @@ -96,7 +97,9 @@ angular.module('managerApp').controller('TelecomTelephonyAliasConfigurationLines } hasChanged() { - return this.canUpdateContactCenterSolution() || this.canUpdateAgentsList(); + return this.canUpdateContactCenterSolution() + || this.canUpdateAgentsList() + || this.canUpdateQueue(); } canUpdateContactCenterSolution() { @@ -107,6 +110,10 @@ angular.module('managerApp').controller('TelecomTelephonyAliasConfigurationLines return !_.isEqual(this.agents, this.copyAgents); } + canUpdateQueue() { + return !_.isEqual(this.queue, this.copyQueue); + } + deleteLineOpenModal(line) { this.$uibModal.open({ templateUrl: 'app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/delete/telecom-telephony-alias-configuration-lines-delete.html', @@ -198,8 +205,16 @@ angular.module('managerApp').controller('TelecomTelephonyAliasConfigurationLines ) : angular.noop(), agentsList: this.canUpdateAgentsList() ? this.updateAgentsList() : angular.noop(), + queue: this.canUpdateQueue() + ? this.tucVoipServiceAlias.updateContactCenterSolutionNumberQueue( + this.serviceInfos, + this.queue, + ) : angular.noop(), }).then(() => { this.OvhApiTelephony.EasyHunting().Hunting().v6().resetCache(); + this.OvhApiTelephony.EasyHunting().Hunting().Queue() + .v6() + .resetCache(); this.OvhApiTelephony.EasyHunting().Hunting().Queue().Agent() .v6() .resetAllCache(); diff --git a/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.html b/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.html index fad2612e3..74044248b 100644 --- a/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.html +++ b/client/app/telecom/telephony/alias/configuration/feature/contactCenterSolution/lines/telecom-telephony-alias-configuration-lines.html @@ -106,8 +106,8 @@