Commit 54efb26a1e8522768d53fe5092bea9e7df3701e3
Exists in
master
Merge branch 'master' of http://ferramentasgo.centralit.com.br:8080/scm/git/cit-grp-contratos
Showing
1 changed file
with
12 additions
and
10 deletions
Show diff stats
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/TermoReferenciaController.js
| ... | ... | @@ -235,7 +235,7 @@ citApp.controller('TermoReferenciaController', ['$scope', |
| 235 | 235 | $scope.editPenalidade = false; |
| 236 | 236 | $scope.editSancao = false; |
| 237 | 237 | $scope.step = 0; |
| 238 | - | |
| 238 | + | |
| 239 | 239 | $timeout(function(){ |
| 240 | 240 | $scope.termoReferenciaForm.$submitted = false; |
| 241 | 241 | $scope.termoReferenciaForm.equipeContratacaoForm.$submitted = false; |
| ... | ... | @@ -274,7 +274,7 @@ citApp.controller('TermoReferenciaController', ['$scope', |
| 274 | 274 | }; |
| 275 | 275 | |
| 276 | 276 | $scope.openModalDetalhamentoSolucao = function() { |
| 277 | - | |
| 277 | + $scope.edicao = false; | |
| 278 | 278 | $scope.termoReferenciaDetalhamentoSolucao = {}; |
| 279 | 279 | $scope.editDetalhamento = true; |
| 280 | 280 | // $scope.atualizaListaEtBensServicos(); |
| ... | ... | @@ -363,13 +363,15 @@ citApp.controller('TermoReferenciaController', ['$scope', |
| 363 | 363 | } |
| 364 | 364 | $scope.setLoadingSalva(true); |
| 365 | 365 | var isDuplicado = false; |
| 366 | - angular.forEach($scope.termoReferencia.detalhamentosSolucoes, function (item, idx) { | |
| 367 | - if (item.bemServicoSolucao.id === detalhe.bemServicoSolucao.id) { | |
| 368 | - isDuplicado = true; | |
| 369 | - $scope.showAlert('error', $translate.instant('CONTRATOS.VALIDACAO.BENS_E_SERVICOS_JA_ADD'), " ", false); | |
| 370 | - return; | |
| 371 | - } | |
| 372 | - }); | |
| 366 | + if(!$scope.edicao){ | |
| 367 | + angular.forEach($scope.termoReferencia.detalhamentosSolucoes, function (item, idx) { | |
| 368 | + if (item.bemServicoSolucao.id === detalhe.bemServicoSolucao.id) { | |
| 369 | + isDuplicado = true; | |
| 370 | + $scope.showAlert('error', $translate.instant('CONTRATOS.VALIDACAO.BENS_E_SERVICOS_JA_ADD'), " ", false); | |
| 371 | + return; | |
| 372 | + } | |
| 373 | + }); | |
| 374 | + } | |
| 373 | 375 | |
| 374 | 376 | if (!isDuplicado) { |
| 375 | 377 | |
| ... | ... | @@ -724,7 +726,7 @@ citApp.controller('TermoReferenciaController', ['$scope', |
| 724 | 726 | $scope.abrirDetalhamentoSolucao = function(edit) { |
| 725 | 727 | |
| 726 | 728 | $scope.termoReferenciaDetalhamentoSolucao = clone($scope.getDetalhamentoSolucaoChecked()); |
| 727 | - | |
| 729 | + $scope.edicao = true; | |
| 728 | 730 | $scope.editDetalhamento = edit; |
| 729 | 731 | |
| 730 | 732 | if(!edit && !$scope.termoReferenciaDetalhamentoSolucao) {//DetalhamentoSolucao | ... | ... |