Commit 6e1638763aee2089c09bf3d6dbd29280563e1ed4
1 parent
0f7afd6e
Exists in
master
[Redmine Atendimento #4269]Alteração penalidade - ocorrências
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/EventoPenalidadeController.js
... | ... | @@ -49,23 +49,23 @@ citApp.controller('EventoPenalidadeController', ['$scope', '$filter', '$timeout' |
49 | 49 | RegistroOcorrenciaRepository.findAllOcorrenciasPorContrato($scope.contrato.id).then(function(result) { |
50 | 50 | $timeout(function (){ |
51 | 51 | $scope.listaOcorrenciasFixa = result; |
52 | - | |
53 | - removerOcorrenciasExistentes(); | |
54 | - | |
55 | 52 | $scope.listaOcorrencias = angular.copy($scope.listaOcorrenciasFixa); |
53 | + | |
54 | + removerOcorrenciasExistentes(); | |
55 | + | |
56 | 56 | }); |
57 | 57 | }); |
58 | 58 | |
59 | 59 | function removerOcorrenciasExistentes() { |
60 | 60 | for(var i = $scope.eventoPenalidade.ocorrencias.length - 1; i >= 0; i--) { |
61 | - for (var j = $scope.listaOcorrenciasFixa.length -1; j >= 0; j--) { | |
62 | - if ($scope.listaOcorrenciasFixa[j].id === $scope.eventoPenalidade.ocorrencias[i].registroOcorrencia.id) { | |
63 | - $scope.listaOcorrenciasFixa.splice(j, 1); | |
61 | + for (var j = $scope.listaOcorrencias.length -1; j >= 0; j--) { | |
62 | + if ($scope.listaOcorrencias[j].id === $scope.eventoPenalidade.ocorrencias[i].registroOcorrencia.id) { | |
63 | + $scope.listaOcorrencias.splice(j, 1); | |
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
67 | 67 | }; |
68 | - | |
68 | + | |
69 | 69 | $scope.addRegistroOcorrencia = function(){ |
70 | 70 | |
71 | 71 | if($scope.eventoPenalidade.registroOcorrencia){ | ... | ... |