Commit 771c1e887c03b3e1c822fe02a68ca0bcfd6b5073
1 parent
2c5b9a1d
Exists in
master
Redmine #285 Implementando reabertura de processo
Showing
15 changed files
with
237 additions
and
95 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/model/Processo.java
| ... | ... | @@ -94,7 +94,7 @@ public class Processo extends PersistentObjectUnidade { |
| 94 | 94 | private Calendar dataConclusao; |
| 95 | 95 | |
| 96 | 96 | /** Atributo nup. */ |
| 97 | - @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.ProcessoAutoCompleteView.class }) | |
| 97 | + @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.ProcessoAutoCompleteView.class, ViewsEcm.ReabrirProcessoListView.class }) | |
| 98 | 98 | private String nup; |
| 99 | 99 | |
| 100 | 100 | /** Atributo nome. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/ReabrirProcesso.java
| ... | ... | @@ -9,6 +9,7 @@ import javax.persistence.ManyToOne; |
| 9 | 9 | |
| 10 | 10 | import br.com.centralit.api.framework.json.ViewsEcm; |
| 11 | 11 | import br.com.centralit.framework.json.Views; |
| 12 | +import br.com.centralit.framework.model.Dominio; | |
| 12 | 13 | import br.com.centralit.framework.model.Unidade; |
| 13 | 14 | import br.com.centralit.framework.model.Usuario; |
| 14 | 15 | import br.com.centralit.framework.model.arquitetura.PersistentObjectAudit; |
| ... | ... | @@ -63,14 +64,14 @@ public class ReabrirProcesso extends PersistentObjectUnidade { |
| 63 | 64 | @JsonView({ ViewsEcm.ReabrirProcessoListView.class }) |
| 64 | 65 | private String justificativa; |
| 65 | 66 | |
| 66 | - /** Atributo solicitante. */ | |
| 67 | - @ManyToOne(fetch = FetchType.LAZY, optional = true) | |
| 68 | - @JsonView({ ViewsEcm.ReabrirProcessoListView.class }) | |
| 69 | - private Usuario usuarioSolicitante; | |
| 70 | - | |
| 71 | 67 | @ManyToOne(fetch = FetchType.LAZY, optional = true) |
| 72 | 68 | @JsonView({ ViewsEcm.ReabrirProcessoListView.class }) |
| 73 | 69 | private Processo processo; |
| 70 | + | |
| 71 | + /** Atributo status. */ | |
| 72 | + @ManyToOne(fetch = FetchType.LAZY) | |
| 73 | + @JsonView({ ViewsEcm.ReabrirProcessoListView.class }) | |
| 74 | + private Dominio status; | |
| 74 | 75 | |
| 75 | 76 | |
| 76 | 77 | /** |
| ... | ... | @@ -114,25 +115,6 @@ public class ReabrirProcesso extends PersistentObjectUnidade { |
| 114 | 115 | this.justificativa = justificativa; |
| 115 | 116 | } |
| 116 | 117 | |
| 117 | - /** | |
| 118 | - * Retorna o valor do atributo <code>usuarioSolicitante</code> | |
| 119 | - * | |
| 120 | - * @return <code>Usuario</code> | |
| 121 | - */ | |
| 122 | - public Usuario getUsuarioSolicitante() { | |
| 123 | - | |
| 124 | - return usuarioSolicitante; | |
| 125 | - } | |
| 126 | - | |
| 127 | - /** | |
| 128 | - * Define o valor do atributo <code>usuarioSolicitante</code>. | |
| 129 | - * | |
| 130 | - * @param usuarioSolicitante | |
| 131 | - */ | |
| 132 | - public void setUsuarioSolicitante(Usuario usuarioSolicitante) { | |
| 133 | - | |
| 134 | - this.usuarioSolicitante = usuarioSolicitante; | |
| 135 | - } | |
| 136 | 118 | |
| 137 | 119 | /** |
| 138 | 120 | * Retorna o valor do atributo <code>processo</code> |
| ... | ... | @@ -154,4 +136,26 @@ public class ReabrirProcesso extends PersistentObjectUnidade { |
| 154 | 136 | this.processo = processo; |
| 155 | 137 | } |
| 156 | 138 | |
| 139 | + | |
| 140 | + /** | |
| 141 | + * Retorna o valor do atributo <code>status</code> | |
| 142 | + * | |
| 143 | + * @return <code>Dominio</code> | |
| 144 | + */ | |
| 145 | + public Dominio getStatus() { | |
| 146 | + | |
| 147 | + return status; | |
| 148 | + } | |
| 149 | + | |
| 150 | + | |
| 151 | + /** | |
| 152 | + * Define o valor do atributo <code>status</code>. | |
| 153 | + * | |
| 154 | + * @param status | |
| 155 | + */ | |
| 156 | + public void setStatus(Dominio status) { | |
| 157 | + | |
| 158 | + this.status = status; | |
| 159 | + } | |
| 160 | + | |
| 157 | 161 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/InicializarEcmServiceImpl.java
| ... | ... | @@ -238,7 +238,6 @@ public class InicializarEcmServiceImpl extends UtilStartup { |
| 238 | 238 | menuGerenciarProcessoListUnidade.setIncludes(this.gerarArquivosMenu(menuGerenciarProcessoListUnidade, this.CIT_ECM_WEB_ANGULAR, "GerenciarProcessoListUnidade", true, false, false)); |
| 239 | 239 | this.menuService.mergeIfNotExist(menuGerenciarProcessoListUnidade); |
| 240 | 240 | |
| 241 | - // Submenu cabeçalho | |
| 242 | 241 | Pagina pgReabrirProcesso = new Pagina("Reabrir Processo", "/cit-ecm-web/html/reabrirProcesso/reabrirProcesso.html"); |
| 243 | 242 | pgReabrirProcesso = this.paginaService.saveIfNotExist(pgReabrirProcesso); |
| 244 | 243 | |
| ... | ... | @@ -246,6 +245,13 @@ public class InicializarEcmServiceImpl extends UtilStartup { |
| 246 | 245 | menuReabrirProcesso.setIncludes(this.gerarArquivosMenu(menuReabrirProcesso, this.CIT_ECM_WEB_ANGULAR, "ReabrirProcesso", true, true, true)); |
| 247 | 246 | this.menuService.mergeIfNotExist(menuReabrirProcesso); |
| 248 | 247 | |
| 248 | + Pagina pgSolicitarReaberturaProcesso = new Pagina("Solicitar Reabertura de Processo", "/cit-ecm-web/html/reabrirProcesso/reabrirProcessoEdit.html"); | |
| 249 | + pgSolicitarReaberturaProcesso = this.paginaService.saveIfNotExist(pgSolicitarReaberturaProcesso); | |
| 250 | + | |
| 251 | + Menu menuSolicitarReaberturaProcesso = new Menu("Reabrir Processo", pgSolicitarReaberturaProcesso, menuProcesso, 2, 8, null, null, null, null, modulo, "REABRIR_PROCESSO"); | |
| 252 | +/* menuSolicitarReaberturaProcesso.setIncludes(this.gerarArquivosMenu(menuSolicitarReaberturaProcesso, this.CIT_ECM_WEB_ANGULAR, "ReabrirProcesso", true, true, true)); | |
| 253 | + this.menuService.mergeIfNotExist(menuSolicitarReaberturaProcesso);*/ | |
| 254 | + | |
| 249 | 255 | } |
| 250 | 256 | |
| 251 | 257 | private void iniciarMenuCadastroBasico(Modulo modulo) { | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ReabrirProcessoServiceImpl.java
| ... | ... | @@ -84,36 +84,43 @@ public class ReabrirProcessoServiceImpl extends GenericServiceImpl<ReabrirProces |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | @Override |
| 87 | - public ReabrirProcesso save(ReabrirProcesso reabrirProcesso) { | |
| 87 | + public ReabrirProcesso save(ReabrirProcesso reabrirProcesso) { | |
| 88 | + | |
| 89 | + reabrirProcesso.setStatus(this.dominioService.findByChaveAndCodigo("statusSolicitaoProcesso", 1L)); | |
| 90 | + | |
| 91 | + reabrirProcesso = super.save(reabrirProcesso); | |
| 92 | + | |
| 93 | + return reabrirProcesso; | |
| 94 | + } | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + @Override | |
| 99 | + public ReabrirProcesso merge(ReabrirProcesso reabrirProcesso) { | |
| 100 | + | |
| 101 | + if(reabrirProcesso.getStatus().getCodigo().equals(2L)){ | |
| 102 | + this.reopenProcessIntance(reabrirProcesso); | |
| 103 | + } | |
| 104 | + | |
| 105 | + return super.merge(reabrirProcesso); | |
| 106 | + } | |
| 107 | + | |
| 108 | + private void reopenProcessIntance(ReabrirProcesso reabrirProcesso){ | |
| 88 | 109 | |
| 89 | 110 | final Unidade unidade = this.unidadeService.getReference(reabrirProcesso.getUnidade().getId()); |
| 90 | 111 | |
| 91 | 112 | final Processo processo = this.processoService.getReference(reabrirProcesso.getProcesso().getId()); |
| 92 | 113 | |
| 93 | - UnidadeProcesso unidadeProcesso = this.unidadeProcessoService.getUnidadeProcessByIdUnidade(unidade.getId()); | |
| 94 | - | |
| 95 | 114 | |
| 96 | - if(unidadeProcesso != null){ | |
| 97 | - | |
| 98 | - unidadeProcesso = unidadeProcessoService.getReference(unidadeProcesso.getId()); | |
| 99 | - | |
| 100 | - unidadeProcesso.setConcluido(false); | |
| 101 | - | |
| 102 | - } | |
| 103 | - | |
| 104 | 115 | final List<EnvironmentVariable> variaveis = new ArrayList<EnvironmentVariable>(); |
| 105 | 116 | |
| 106 | - reabrirProcesso.setIdProcessInstance(processo.getIdProcessInstance()); | |
| 107 | - | |
| 108 | 117 | processo.setStatus(this.dominioService.findByChaveAndCodigo("statusProcesso", 1L)); |
| 109 | 118 | |
| 110 | - processo.getTemporalidade().setDataFimTemporalidade(null); | |
| 111 | 119 | |
| 112 | 120 | variaveis.add(new EnvironmentVariable("grupoPadrao", VariableTypeEnum.TEXT, unidade.getGrupo().getSigla(), false)); |
| 113 | 121 | |
| 114 | 122 | reopenProcessInstance(processo.getIdProcessInstance(), variaveis); |
| 115 | - | |
| 116 | - return super.save(reabrirProcesso); | |
| 123 | + | |
| 117 | 124 | } |
| 118 | 125 | |
| 119 | 126 | } | ... | ... |
cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
| ... | ... | @@ -199,6 +199,11 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen |
| 199 | 199 | |
| 200 | 200 | list.add(new Dominio("statusProcesso", "Em Andamento", "EMANDAMENTO", 1L, Boolean.FALSE)); |
| 201 | 201 | list.add(new Dominio("statusProcesso", "Finalizado", "FINALIZADO", 2L, Boolean.FALSE)); |
| 202 | + | |
| 203 | + list.add(new Dominio("statusSolicitaoProcesso", "Solicitação em Aberto", "EMABERTO", 1L, Boolean.FALSE)); | |
| 204 | + list.add(new Dominio("statusSolicitaoProcesso", "Aprovada", "APROVADA", 2L, Boolean.FALSE)); | |
| 205 | + list.add(new Dominio("statusSolicitaoProcesso", "Rejeitada", "REJEITADA", 3L, Boolean.FALSE)); | |
| 206 | + | |
| 202 | 207 | |
| 203 | 208 | this.dominioService.saveListIfNotExist(list); |
| 204 | 209 | |
| ... | ... | @@ -380,7 +385,9 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen |
| 380 | 385 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.RENUNCIAR_CREDENCIAL", "Renunciar credencial", dominio, modulo)); |
| 381 | 386 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.APROVAR", "Aprovar", dominio, modulo)); |
| 382 | 387 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.AVANCAR_FLUXO", "Avançar no Fluxo", dominio, modulo)); |
| 383 | - internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.JUSTIFICATIVA_CANCELAMENTO", "Justificativa Cancelado", dominio, modulo)); | |
| 388 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.JUSTIFICATIVA_CANCELAMENTO", "Justificativa Cancelado", dominio, modulo)); | |
| 389 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DADOS_REABERTURA", "Dados da Reabertura", dominio, modulo)); | |
| 390 | + | |
| 384 | 391 | } |
| 385 | 392 | |
| 386 | 393 | /** | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ProcessoController.js
| ... | ... | @@ -130,8 +130,7 @@ citApp.controller('ProcessoController', ['$scope', 'ProcessoRepository', 'Domini |
| 130 | 130 | }); |
| 131 | 131 | |
| 132 | 132 | }; |
| 133 | - | |
| 134 | - | |
| 133 | + | |
| 135 | 134 | |
| 136 | 135 | $scope.removerPropriedades = function(){ |
| 137 | 136 | delete $scope.processo.nivelAcesso.nivelAcessoDescricao; | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ReabrirProcessoController.js
| 1 | 1 | 'use strict'; |
| 2 | 2 | |
| 3 | -citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoRepository','PessoaRepository', 'ProcessoRepository','UnidadeRepository','$filter', '$translate', '$timeout', function ReabrirProcessoController($scope, ReabrirProcessoRepository,PessoaRepository, ProcessoRepository, UnidadeRepository, $filter, $translate, $timeout) { | |
| 3 | +citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoRepository', 'ProcessoRepository', 'DominioRepository','$filter', '$translate', '$timeout', | |
| 4 | + function ReabrirProcessoController($scope, ReabrirProcessoRepository, ProcessoRepository, DominioRepository, $filter, $translate, $timeout) { | |
| 4 | 5 | $scope.reabrirProcesso = {}; |
| 5 | 6 | |
| 6 | 7 | // Limpa formulário para novo cadastro |
| ... | ... | @@ -29,8 +30,10 @@ citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoReposi |
| 29 | 30 | $scope.$modalConfirmInstance.dismiss('cancel'); |
| 30 | 31 | $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); |
| 31 | 32 | angular.element('#searchReabrirProcesso').scope().fetchResult(); |
| 32 | - | |
| 33 | + | |
| 33 | 34 | $scope.resetForm(); |
| 35 | + | |
| 36 | + $scope.edit = false; | |
| 34 | 37 | }); |
| 35 | 38 | } |
| 36 | 39 | }); |
| ... | ... | @@ -41,7 +44,7 @@ citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoReposi |
| 41 | 44 | $scope.reabrirProcessoForm.$submitted = true; |
| 42 | 45 | |
| 43 | 46 | //verifica se o formulario está valido para salvar |
| 44 | - if($scope.reabrirProcessoForm.$valid && $scope.reabrirProcesso.texto != ""){ | |
| 47 | + if($scope.reabrirProcessoForm.$valid){ | |
| 45 | 48 | |
| 46 | 49 | $scope.setLoadingSalva(true); |
| 47 | 50 | |
| ... | ... | @@ -73,6 +76,11 @@ citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoReposi |
| 73 | 76 | }); |
| 74 | 77 | }; |
| 75 | 78 | |
| 79 | + | |
| 80 | + DominioRepository.findAllDominio('statusSolicitaoProcesso').then(function(result) { | |
| 81 | + $scope.statusList = result; | |
| 82 | + }); | |
| 83 | + | |
| 76 | 84 | |
| 77 | 85 | // Consulta entidade e mostra no formulario |
| 78 | 86 | $scope.getReabrirProcesso = function(reabrirProcesso, edit){ | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ReabrirProcessoListController.js
| 1 | 1 | 'use strict'; |
| 2 | 2 | |
| 3 | 3 | citApp.controller('ReabrirProcessoListController', ['$scope', 'ReabrirProcessoRepository', '$translate', '$timeout', function ReabrirProcessoListController($scope, ReabrirProcessoRepository, $translate, $timeout) { |
| 4 | - $scope.$showAdvancedFilters = false; | |
| 4 | + $scope.$showAdvancedFilters = false; | |
| 5 | 5 | |
| 6 | 6 | $scope.resetForm = function() { |
| 7 | - angular.element("#editSolicitacaoReaberturaProcesso").scope().resetForm(); | |
| 7 | + angular.element("#editReabrirProcesso").scope().resetForm(); | |
| 8 | 8 | }; |
| 9 | 9 | |
| 10 | 10 | |
| 11 | - $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.protocolo' } , {title : $translate.instant('ECM.LABEL.SOLICITANTE'), value : 'usuarioSolicitante' } , | |
| 12 | - {title : $translate.instant('ECM.LABEL.SITUACAO'), value : 'situacaoReabertura' }]; | |
| 11 | + $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.nup'}, | |
| 12 | + {title : $translate.instant('ECM.LABEL.JUSTIFICATIVA'), value : 'justificativa' }, | |
| 13 | + {title : $translate.instant('ECM.LABEL.STATUS'), value : 'status.descricao' }]; | |
| 13 | 14 | |
| 14 | 15 | $scope.filterCriteria = { |
| 15 | 16 | start : 1, |
| 16 | 17 | dir : 'asc', |
| 17 | 18 | sort : 'id', |
| 18 | 19 | limit : 10, |
| 19 | - fields: ['id', 'processo.Protocolo'], | |
| 20 | - filters : [ {type : 'date', field : 'processo.protocolo' } , {type : 'string', field : 'usuarioSolicitante' } , {type : 'string', field : 'situacaoReabertura' }] | |
| 20 | + fields: ['id','processo.nup','status.descricao' ,'justificativa' ], | |
| 21 | + filters : [ {type : 'string', field : 'processo.nup' },{type : 'string', field : 'status.descricao'},{type : 'string', field : 'justificativa' } ] | |
| 21 | 22 | }; |
| 22 | - | |
| 23 | - | |
| 24 | - | |
| 23 | + | |
| 25 | 24 | // ABRI Documento SELECIONADA |
| 26 | 25 | $scope.abrirVisualizar = function(edit){ |
| 27 | - var reabrirProcesso = $scope.solicitacaoReaberturaProcessoChecked; | |
| 26 | + var reabrirProcesso = $scope.reabrirProcessoChecked; | |
| 28 | 27 | |
| 29 | 28 | if(!reabrirProcesso) { |
| 30 | 29 | $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolicitacaoReaberturaProcessoController.js
| ... | ... | @@ -70,30 +70,7 @@ citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoReposi |
| 70 | 70 | }); |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | - | |
| 74 | - | |
| 75 | - $scope.findAutoCompleteResponsavel = function(value){ | |
| 76 | - return PessoaRepository.findAutoComplete('nome', value).then(function(result) { | |
| 77 | - return result; | |
| 78 | - }); | |
| 79 | - }; | |
| 80 | - | |
| 81 | - | |
| 82 | - | |
| 83 | - //Buscar unidade através do nome | |
| 84 | - $scope.findAutoCompleteUnidade = function(value){ | |
| 85 | - return UnidadeRepository.findAutoComplete('nome', value).then(function(result) { | |
| 86 | - | |
| 87 | - var filtroListUnidadeLogada = null; | |
| 88 | - //Verifica se o usuario contem uma unidade padrão | |
| 89 | - if($scope.usuarioLogado.unidade){ | |
| 90 | - //Filtro da unidadeParão | |
| 91 | - filtroListUnidadeLogada = $filter('idNotObject')(result, $scope.usuarioLogado.unidade); | |
| 92 | - } | |
| 93 | - //Filtro das unidade adicionadas | |
| 94 | - return filtroListUnidadeLogada; | |
| 95 | - }); | |
| 96 | - }; | |
| 73 | + | |
| 97 | 74 | |
| 98 | 75 | // Consulta entidade e mostra no formulario |
| 99 | 76 | $scope.getReabrirProcesso = function(processo, edit){ | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolicitacaoReaberturaProcessoListController.js
| ... | ... | @@ -4,24 +4,23 @@ citApp.controller('SolicitacaoReaberturaProcessoListController', ['$scope', 'Rea |
| 4 | 4 | $scope.$showAdvancedFilters = false; |
| 5 | 5 | |
| 6 | 6 | $scope.resetForm = function() { |
| 7 | - angular.element("#editSolicitacaoReaberturaProcesso").scope().resetForm(); | |
| 7 | + angular.element("#editReabrirProcesso").scope().resetForm(); | |
| 8 | 8 | }; |
| 9 | 9 | |
| 10 | 10 | |
| 11 | - $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.protocolo' } , {title : $translate.instant('ECM.LABEL.SOLICITANTE'), value : 'usuarioSolicitante' } , | |
| 12 | - {title : $translate.instant('ECM.LABEL.SITUACAO'), value : 'situacaoReabertura' }]; | |
| 11 | + $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.nup'}, | |
| 12 | + {title : $translate.instant('ECM.LABEL.JUSTIFICATIVA'), value : 'justificativa' }, | |
| 13 | + {title : $translate.instant('ECM.LABEL.STATUS'), value : 'status.descricao' }]; | |
| 13 | 14 | |
| 14 | 15 | $scope.filterCriteria = { |
| 15 | 16 | start : 1, |
| 16 | 17 | dir : 'asc', |
| 17 | 18 | sort : 'id', |
| 18 | 19 | limit : 10, |
| 19 | - fields: ['id', 'processo.Protocolo'], | |
| 20 | - filters : [ {type : 'date', field : 'processo.protocolo' } , {type : 'string', field : 'usuarioSolicitante' } , {type : 'string', field : 'situacaoReabertura' }] | |
| 20 | + fields: ['id','processo.nup','status.descricao' ,'justificativa' ], | |
| 21 | + filters : [ {type : 'string', field : 'processo.nup' },{type : 'string', field : 'status.descricao'},{type : 'string', field : 'justificativa' } ] | |
| 21 | 22 | }; |
| 22 | - | |
| 23 | - | |
| 24 | - | |
| 23 | + | |
| 25 | 24 | // ABRI Documento SELECIONADA |
| 26 | 25 | $scope.abrirVisualizar = function(edit){ |
| 27 | 26 | var reabrirProcesso = $scope.solicitacaoReaberturaProcessoChecked; | ... | ... |
cit-ecm-web/src/main/webapp/html/reabrirProcesso/reabrirProcessoEdit.html
| ... | ... | @@ -52,15 +52,34 @@ |
| 52 | 52 | |
| 53 | 53 | <div class="row"> |
| 54 | 54 | <div class="col-sm-8"> |
| 55 | - <auto-complete ng-id="reabrirProcesso.processo" ng-disabled='!edit' ng-obrigatorio='true' ng-label="ECM.LABEL.PROTOCOLO" ng-model="reabrirProcesso.processo" form='reabrirProcessoForm' ng-find="findAutoCompleteProcessoo(value)" | |
| 56 | - ng-item="item.nome" /> | |
| 55 | + | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + | |
| 59 | + <div class="row"> | |
| 60 | + <div class="col-sm-4"> | |
| 61 | + <auto-complete ng-id="reabrirProcesso.processo" ng-disabled='reabrirProcesso.id' ng-obrigatorio='true' ng-label="ECM.LABEL.PROTOCOLO" ng-model="reabrirProcesso.processo" form='reabrirProcessoForm' ng-find="findAutoCompleteProcesso(value)" | |
| 62 | + ng-item="item.nup" /> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + | |
| 66 | + <div class="row" ng-if="reabrirProcesso.id"> | |
| 67 | + <div class="col-md-4"> | |
| 68 | + <label-select ng-id="reabrirProcesso.status" ng-model="reabrirProcesso.status" ng-label="ECM.LABEL.STATUS" ng-obrigatorio='reabrirProcesso.id' form="reabrirProcessoForm" ng-list="statusList" | |
| 69 | + ng-custom-options="dominioStatus.originalElement as dominioStatus.descricao for dominioStatus" track-by="track by dominioStatus.id" ng-disabled='!edit && reabrirProcesso.id'> </label-select> | |
| 57 | 70 | </div> |
| 58 | 71 | </div> |
| 59 | - | |
| 60 | 72 | |
| 73 | + <div class="row" ng-if="reabrirProcesso.id && reabrirProcesso.status.codigo == 3"> | |
| 74 | + <div class="col-sm-8"> | |
| 75 | + <label-text-area ng-id="reabrirProcesso.justificativaRejeicao" ng-disabled="!edit && reabrirProcesso.id" ng-typ="text" ng-obrigatorio='!edit && reabrirProcesso.id' ng-label="ECM.LABEL.JUSTIFICATIVAREJEICAO" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativaRejeicao" | |
| 76 | + ng-custom-maxlength='255' /> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + | |
| 61 | 80 | <div class="row"> |
| 62 | 81 | <div class="col-sm-8"> |
| 63 | - <label-text-area ng-id="reabrirProcesso.justificativa" ng-disabled="!edit" ng-typ="text" ng-obrigatorio='true' ng-label="ECM.LABEL.JUSTIFICATIVA" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativa" | |
| 82 | + <label-text-area ng-id="reabrirProcesso.justificativa" ng-disabled='reabrirProcesso.id' ng-typ="text" ng-obrigatorio='true' ng-label="ECM.LABEL.MOTIVO" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativa" | |
| 64 | 83 | ng-custom-maxlength='255' /> |
| 65 | 84 | </div> |
| 66 | 85 | </div> | ... | ... |
cit-ecm-web/src/main/webapp/html/reabrirProcesso/reabrirProcessoList.html
| ... | ... | @@ -13,6 +13,11 @@ |
| 13 | 13 | <translate>ECM.LABEL.REABRIR_PROCESSO</translate> |
| 14 | 14 | </button> |
| 15 | 15 | |
| 16 | + <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
| 17 | + <i class="fa fa-search"></i> | |
| 18 | + <translate>LABEL.PESQUISAR</translate> | |
| 19 | + </button> | |
| 20 | + | |
| 16 | 21 | <span class="divider-vertical"></span> |
| 17 | 22 | |
| 18 | 23 | <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> |
| ... | ... | @@ -35,7 +40,7 @@ |
| 35 | 40 | |
| 36 | 41 | <breadcrumb ng-workspace="workspace"></breadcrumb> |
| 37 | 42 | |
| 38 | - <list-view ng-lista="processoList" ng-repository="ProcessoRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="processoChecked"></list-view> | |
| 43 | + <list-view ng-lista="reabrirProcessoList" ng-repository="ReabrirProcessoRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="reabrirProcessoChecked"></list-view> | |
| 39 | 44 | |
| 40 | 45 | </div> |
| 41 | 46 | <!-- .page-content --> | ... | ... |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcesso.html
0 → 100644
| ... | ... | @@ -0,0 +1,2 @@ |
| 1 | +<div ng-include src="'/cit-ecm-web/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoList.html'" ng-show="workspace.$showSearch"></div> | |
| 2 | +<div ng-include src="'/cit-ecm-web/html/reabrirProcesso/reabrirProcessoEdit.html'" ng-show="workspace.$showEdit"></div> | ... | ... |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoEdit.html
0 → 100644
| ... | ... | @@ -0,0 +1,69 @@ |
| 1 | +<div id="editReabrirProcesso" class="page-content clearfix" ng-controller="ReabrirProcessoController"> | |
| 2 | + <div class="bar-buttons-action fixed"> | |
| 3 | + <div class="row"> | |
| 4 | + <div class="col-sm-8 text-left"> | |
| 5 | + | |
| 6 | + <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | |
| 7 | + <i class="fa fa-save green"></i> | |
| 8 | + <translate>ECM.LABEL.REABRIR</translate> | |
| 9 | + </button> | |
| 10 | + | |
| 11 | + <button class="btn btn-clear" ng-click="resetForm()" ng-show="edit"> | |
| 12 | + <i class="fa fa-eraser yellow-dark"></i> | |
| 13 | + <translate>LABEL.LIMPAR</translate> | |
| 14 | + </button> | |
| 15 | + | |
| 16 | + | |
| 17 | + <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
| 18 | + <i class="fa fa-search"></i> | |
| 19 | + <translate>LABEL.PESQUISAR</translate> | |
| 20 | + </button> | |
| 21 | + | |
| 22 | + </div> | |
| 23 | + <!-- .col --> | |
| 24 | + | |
| 25 | + <div class="col-sm-4 text-right"> | |
| 26 | + | |
| 27 | + <favorito /> | |
| 28 | + | |
| 29 | + <help-button workspace="workspace" /> | |
| 30 | + | |
| 31 | + </div> | |
| 32 | + <!-- .col --> | |
| 33 | + </div> | |
| 34 | + <!-- .row --> | |
| 35 | + </div> | |
| 36 | + <!-- .bar-buttons-action --> | |
| 37 | + | |
| 38 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | |
| 39 | + | |
| 40 | + <form name="reabrirProcessoForm"> | |
| 41 | + <p> | |
| 42 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | |
| 43 | + </p> | |
| 44 | + | |
| 45 | + <fieldset> | |
| 46 | + | |
| 47 | + <legend> | |
| 48 | + <translate>ECM.LABEL.DADOS_REABERTURA</translate> | |
| 49 | + </legend> | |
| 50 | + | |
| 51 | + </fieldset> | |
| 52 | + | |
| 53 | + <div class="row"> | |
| 54 | + <div class="col-sm-8"> | |
| 55 | + <auto-complete ng-id="reabrirProcesso.processo" ng-disabled='!edit' ng-obrigatorio='true' ng-label="ECM.LABEL.PROTOCOLO" ng-model="reabrirProcesso.processo" form='reabrirProcessoForm' ng-find="findAutoCompleteProcessoo(value)" | |
| 56 | + ng-item="item.nome" /> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + | |
| 60 | + | |
| 61 | + <div class="row"> | |
| 62 | + <div class="col-sm-8"> | |
| 63 | + <label-text-area ng-id="reabrirProcesso.justificativa" ng-disabled="!edit" ng-typ="text" ng-obrigatorio='true' ng-label="ECM.LABEL.JUSTIFICATIVA" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativa" | |
| 64 | + ng-custom-maxlength='255' /> | |
| 65 | + </div> | |
| 66 | + </div> | |
| 67 | + </form> | |
| 68 | +</div> | |
| 69 | +<!-- .page-content --> | ... | ... |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoList.html
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +<div id="searchProcesso" class="page-content" ng-controller="SolicitacaoReaberturaProcessoListController"> | |
| 2 | + <div class="bar-buttons-action fixed"> | |
| 3 | + <div class="row"> | |
| 4 | + <div class="col-sm-8 text-left"> | |
| 5 | + | |
| 6 | + <button class="btn btn-clear" ng-click="$showPageEditWorkspace(workspace); resetForm();"> | |
| 7 | + <i class="fa fa-plus-circle yellow-dark"></i> | |
| 8 | + <translate>LABEL.CADASTRAR</translate> | |
| 9 | + </button> | |
| 10 | + | |
| 11 | + <button class="btn btn-clear" ng-click="abrirVisualizar(false);"> | |
| 12 | + <i class="fa fa-search blue"></i> | |
| 13 | + <translate>LABEL.VISUALIZAR</translate> | |
| 14 | + </button> | |
| 15 | + | |
| 16 | + <span class="divider-vertical"></span> | |
| 17 | + | |
| 18 | + <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> | |
| 19 | + | |
| 20 | + </div> | |
| 21 | + <!-- .col --> | |
| 22 | + | |
| 23 | + <div class="col-sm-4 text-right"> | |
| 24 | + | |
| 25 | + <favorito /> | |
| 26 | + | |
| 27 | + <help-button workspace="workspace" /> | |
| 28 | + | |
| 29 | + </div> | |
| 30 | + <!-- .col --> | |
| 31 | + </div> | |
| 32 | + <!-- .row --> | |
| 33 | + </div> | |
| 34 | + <!-- .bar-buttons-action --> | |
| 35 | + | |
| 36 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | |
| 37 | + | |
| 38 | + <list-view ng-lista="reabrirProcessoList" ng-repository="ReabrirProcessoRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="solicitacaoReaberturaProcessoChecked"></list-view> | |
| 39 | + | |
| 40 | +</div> | |
| 41 | +<!-- .page-content --> | ... | ... |