Commit 6626bc5dc467fac0e880486f8bb28a3496256a79
1 parent
6d0b17cd
Exists in
master
[Redmine #4235]
Removendo atributo permissoes no autor da justificativa.
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoController.js
@@ -253,9 +253,9 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -253,9 +253,9 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
253 | 253 | ||
254 | if ($scope.contrato.id && $scope.contrato.ctrtEnvolvidos){ | 254 | if ($scope.contrato.id && $scope.contrato.ctrtEnvolvidos){ |
255 | angular.forEach($scope.contrato.ctrtEnvolvidos, function(envolvido){ | 255 | angular.forEach($scope.contrato.ctrtEnvolvidos, function(envolvido){ |
256 | - if (envolvido.justificativas.length === 0){ | 256 | + if (envolvido.justificativas){ |
257 | angular.forEach(envolvido.justificativas, function(justificativa){ | 257 | angular.forEach(envolvido.justificativas, function(justificativa){ |
258 | - delete justificativa.autor; | 258 | + delete justificativa.autor.permissoes; |
259 | delete justificativa.dataCriacao; | 259 | delete justificativa.dataCriacao; |
260 | }); | 260 | }); |
261 | } | 261 | } |
@@ -1418,7 +1418,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | @@ -1418,7 +1418,7 @@ citApp.controller('ContratoController', ['$scope', '$filter', 'FileUploader', 'C | ||
1418 | } | 1418 | } |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | - $scope.contratoEnvolvidoTemp = {}; | 1421 | + $scope.contratoEnvolvidoTemp = {justificativas : []}; |
1422 | $scope.justificativaTemp = {}; | 1422 | $scope.justificativaTemp = {}; |
1423 | $scope.hasAlteracaoEnvolvido = false; | 1423 | $scope.hasAlteracaoEnvolvido = false; |
1424 | if (continuarEditando) { | 1424 | if (continuarEditando) { |