Commit 9b2f91bb2adca75aa074b0fae6ecb949f67a5f74
1 parent
be5ee056
Exists in
master
Redmine #4599 Correcao homologacao
Showing
9 changed files
with
273 additions
and
56 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/InicializarEcmServiceImpl.java
... | ... | @@ -129,7 +129,7 @@ public class InicializarEcmServiceImpl extends UtilStartup { |
129 | 129 | menuProcesso = this.menuService.mergeIfNotExist(menuProcesso); |
130 | 130 | |
131 | 131 | // Submenu Cadastro de Processo #INICIO |
132 | - Pagina pgProcesso = new Pagina("Novo Processo", "/cit-ecm-web/html/processo/processoEdit.html"); | |
132 | + Pagina pgProcesso = new Pagina("Novo Processo", "/cit-ecm-web/html/processo/processoNew.html"); | |
133 | 133 | pgProcesso = this.paginaService.saveIfNotExist(pgProcesso); |
134 | 134 | |
135 | 135 | Menu menuCadastroProcesso = new Menu("Novo Processo", pgProcesso, menuProcesso, 2, 1, null, null, null, null, modulo, "NOVO_PROCESSO"); | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoController.js
... | ... | @@ -84,14 +84,14 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim |
84 | 84 | $scope.novoProcesso = function () { |
85 | 85 | |
86 | 86 | |
87 | - $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.NOVOPROCESSO'), '/cit-ecm-web/html/processo/processoEdit.html', 'mod-orange'); | |
87 | + $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.NOVOPROCESSO'), '/cit-ecm-web/html/processo/processo.html', 'mod-orange'); | |
88 | 88 | |
89 | 89 | |
90 | 90 | |
91 | 91 | $timeout(function() { |
92 | - angular.element('#editProcessoEcm').scope().$showPageEditWorkspace(angular.element('#editProcessoEcm').scope().workspace); | |
92 | + angular.element('#newProcesso').scope().$showPageEditWorkspace(angular.element('#newProcesso').scope().workspace); | |
93 | 93 | $timeout(function(){ |
94 | - angular.element('#editProcessoEcm').scope().resetForm(); | |
94 | + angular.element('#newProcesso').scope().resetForm(); | |
95 | 95 | }, 1000); |
96 | 96 | |
97 | 97 | }, 300); |
... | ... | @@ -278,9 +278,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim |
278 | 278 | $scope.isVersoesDocumento = false; |
279 | 279 | |
280 | 280 | $timeout( function () { |
281 | - angular.element( '#editProcessoEditEcm' ).scope().getProcesso( $scope.processo, true ); | |
282 | - angular.element( document.querySelector( '#topoMenu' ) ).remove(); | |
283 | - angular.element( document.querySelector( '#cabecalhoProcesso' ) ).remove(); | |
281 | + angular.element( '#editProcesso' ).scope().getProcesso( $scope.processo, true ); | |
284 | 282 | } ); |
285 | 283 | |
286 | 284 | }; | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/MetadadoProcessoViewController.js
0 → 100644
... | ... | @@ -0,0 +1,17 @@ |
1 | +'use strict'; | |
2 | + | |
3 | +citApp.controller('MetadadoProcessoViewController', ['$scope', 'ProcessoRepository', '$translate', '$timeout', '$filter', function ProcessoController($scope, ProcessoRepository, $translate, $timeout, $filter) { | |
4 | + | |
5 | + $scope.processo = {}; | |
6 | + | |
7 | + // Consulta entidade e mostra no formulario | |
8 | + $scope.getProcessoView = function(processo){ | |
9 | + | |
10 | + $scope.setLoadingGet(true); | |
11 | + | |
12 | + ProcessoRepository.getMetadadoProcesso(processo.id).then(function(result) { | |
13 | + $scope.processo = result.originalElement; | |
14 | + $scope.setLoading(false); | |
15 | + }); | |
16 | + }; | |
17 | +}]); | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ProcessoController.js
... | ... | @@ -15,6 +15,9 @@ citApp.controller('ProcessoController', ['$scope', 'ProcessoRepository', 'Domini |
15 | 15 | |
16 | 16 | // Limpa formulário para novo cadastro |
17 | 17 | $scope.resetForm = function() { |
18 | + | |
19 | + $scope.processoForm = $scope.processoNewController.processoForm; | |
20 | + | |
18 | 21 | $scope.limparProcesso(); |
19 | 22 | |
20 | 23 | $scope.edit = true; |
... | ... | @@ -353,7 +356,7 @@ citApp.controller('ProcessoController', ['$scope', 'ProcessoRepository', 'Domini |
353 | 356 | }; |
354 | 357 | |
355 | 358 | $scope.inicializarProcesso = function(){ |
356 | - $scope.resetForm(); | |
359 | + | |
357 | 360 | $timeout(function() { |
358 | 361 | $scope.processoForm = $scope.processoNewController.processoForm; |
359 | 362 | }); | ... | ... |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/includeAcaoProcesso.html
... | ... | @@ -25,5 +25,5 @@ |
25 | 25 | |
26 | 26 | <div ng-include src="'/cit-ecm-web/html/processo/metadadoProcessoView.html'" ng-show="isVisualizarMetadadoProcesso" /> |
27 | 27 | |
28 | -<div ng-include src="'/cit-ecm-web/html/processo/processoMetadadoEdit.html'" ng-show="isProcessoEdit" /> | |
28 | +<div ng-include src="'/cit-ecm-web/html/processo/processoEdit.html'" ng-show="isProcessoEdit" /> | |
29 | 29 | ... | ... |
cit-ecm-web/src/main/webapp/html/processo/metadadosProcesso.html
0 → 100644
... | ... | @@ -0,0 +1,170 @@ |
1 | + | |
2 | +<p> | |
3 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | |
4 | +</p> | |
5 | + | |
6 | +<fieldset> | |
7 | + | |
8 | + <legend> | |
9 | + <translate>ECM.LABEL.DADOS_PROCESSO</translate> | |
10 | + </legend> | |
11 | + | |
12 | + <div class="row"> | |
13 | + <div class="col-md-6"> | |
14 | + <div class="row"> | |
15 | + <div class="col-md-6 "> | |
16 | + | |
17 | + <label-input-radio ng-id="processo.tipoProtocolo.codigo" ng-label="ECM.LABEL.TIPOPROTOCOLO" list="dominiosTipoProtocoloNup" ng-disabled='!edit || processo.id' text="descricao" value="codigo" | |
18 | + ng-model="processo.tipoProtocolo.codigo" form="processoForm"></label-input-radio> | |
19 | + | |
20 | + </div> | |
21 | + <div class="col-md-6" ng-show='processo.tipoProtocolo.codigo == 2 || processo.id'> | |
22 | + <div class='form-group' ng-class="{'has-error': processoForm['protocolo'].$error.required && (!processoForm['protocolo'].$pristine || processoForm.$submitted)}"> | |
23 | + <label class='control-label'> <translate>ECM.LABEL.PROTOCOLO</translate> <span class='red'>*</span></label> <i | |
24 | + ng-show="processoForm['protocolo'].$error.required && !processoForm['protocolo'].$pristine || processoForm.$submitted" class='fa fa-warning red' | |
25 | + tooltip="{{$translate.instant('ECM.LABEL.PROTOCOLO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i> <input ng-required="processo.tipoProtocolo.codigo == 2" | |
26 | + class="form-control" numbers-only id="protocolo" ng-show='processo.tipoProtocolo.codigo == 2 ||processo.id' ng-label="LABEL.PROTOCOLO" ng-disabled='!edit || processo.id' ng-model="processo.nup" | |
27 | + form="processoForm" /> | |
28 | + </div> | |
29 | + </div> | |
30 | + </div> | |
31 | + </div> | |
32 | + </div> | |
33 | + | |
34 | + <div class="row"> | |
35 | + <div class="col-md-6"> | |
36 | + <auto-complete ng-id="processo.tipoProcesso" ng-set-result="constroiRelacionamentoTipoProcesso(item)" ng-label="ECM.LABEL.TIPOPROCESSO" ng-model="processo.tipoProcesso" form="processoForm" | |
37 | + ng-find="findAutoCompleteTipoProcesso(value)" ng-item="item.nome" ng-obrigatorio='true' ng-disabled='!edit || processo.id' /> | |
38 | + </div> | |
39 | + </div> | |
40 | + | |
41 | + <div class="row" ng-show='processo.tipoProcesso.id'> | |
42 | + <div class="col-md-6"> | |
43 | + <auto-complete ng-id="assuntoSelecionado" ng-disabled='sugestoes.length > 0' ng-label="ECM.LABEL.ASSUNTO" ng-set-result='setTipoAssunto(item)' ng-model="assuntoSelecionado" form="processoForm" | |
44 | + ng-find="findAutoCompleteAssunto(value)" ng-item="item.assunto" ng-obrigatorio='{{!sugestoes}}' /> | |
45 | + | |
46 | + </div> | |
47 | + </div> | |
48 | + | |
49 | + <div class="row" ng-show='processo.tipoProcesso.id'> | |
50 | + <div class="col-md-6"> | |
51 | + <div class="form-group"> | |
52 | + <div class="input-group"> | |
53 | + <select class="form-control typeahead-wide" ng-model="sugestoes" ng-change="setAssunto(sugestoes)" multiple id="sugestoes" ng-disabled='assuntoSelecionado.id' ng-multiple="false" | |
54 | + ng-options="sugestao as sugestao.assunto for sugestao in assuntos track by sugestao.id"> | |
55 | + </select> <span ng-show="sugestoes.length > 0" class="input-group-addon" ng-click="sugestoes = null" ng-class="{'hover-directive' : (($hover == true) && !disabled)}" ng-mouseover="$hover = true" | |
56 | + ng-mouseout="$hover = false"> <i class="fa fa-eraser bigger-110"></i> | |
57 | + </span> <span class="input-group-addon" style="visibility: hidden;"> <i class="fa fa-search bigger-110"></i></span> | |
58 | + </div> | |
59 | + | |
60 | + </div> | |
61 | + </div> | |
62 | + </div> | |
63 | + | |
64 | + <div class="row" ng-show='processo.tipoProcesso.id'> | |
65 | + | |
66 | + <div class="col-md-6"> | |
67 | + <label-select ng-id="processo.nivelAcesso" ng-label="ECM.LABEL.NIVEL_ACESSO" ng-model="processo.nivelAcesso" ng-custom-change='setHipoteseLegal(processo.nivelAcesso.id)' form="processoForm" | |
68 | + ng-obrigatorio="true" ng-disabled="!edit" ng-custom-options="nivelAcessoTipoProcesso.originalElement as nivelAcessoTipoProcesso.nivelAcesso.descricao for nivelAcessoTipoProcesso " | |
69 | + track-by="track by nivelAcessoTipoProcesso.id" ng-list="nivelAcessoList" show-selecione='false' /> | |
70 | + </div> | |
71 | + | |
72 | + <div class="col-md-6"> | |
73 | + <div class="form-group" ng-show='processo.nivelAcesso.nivelAcesso.codigo == 0'> | |
74 | + <label class="control-label block" ng-class="{'has-error': processoForm['processo.sigilo.id'].$error.required && (!processoForm['processo.sigilo.id'].$pristine || processoForm.$submitted)}"> | |
75 | + <translate>ECM.LABEL.SIGILO</translate> <span class="red">*</span> <i | |
76 | + ng-show="processoForm['processo.sigilo.id'].$error.required && (!processoForm['processo.sigilo.id'].$pristine || processoForm.$submitted)" class='fa fa-warning red' | |
77 | + tooltip="{{$translate.instant('ECM.LABEL.SIGILO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i> | |
78 | + </label> | |
79 | + | |
80 | + <div class="radio-inline" ng-repeat="sigiloTipoProcesso in processo.nivelAcesso.sigilos"> | |
81 | + <label> <input type="radio" required="processo.nivelAcesso.nivelAcesso.codigo == 1" name="processo.sigilo.id" id="processo.tipoSigilo.id" ng-disabled="!edit" | |
82 | + ng-value="sigiloTipoProcesso.sigilo.id" ng-model="processo.sigilo.id" ng-change='setHipoteseLegal(processo.sigilo.id)' /> {{sigiloTipoProcesso.sigilo.tipoSigilo.descricao}} | |
83 | + </label> | |
84 | + </div> | |
85 | + </div> | |
86 | + </div> | |
87 | + | |
88 | + </div> | |
89 | + | |
90 | + <div class="row"> | |
91 | + <div class="col-sm-6" ng-show='processo.nivelAcesso.nivelAcesso.codigo == 1 || processo.sigilo.id'> | |
92 | + <label-select ng-id="processo.hipoteseLegal" ng-model="processo.hipoteseLegal" ng-label="ECM.LABEL.HIPOTESELEGAL" ng-obrigatorio='false' form="processoForm" ng-list="hipoteses" | |
93 | + ng-custom-options="hipoteseLegal.originalElement as hipoteseLegal.nome for hipoteseLegal" ng-obrigatorio='true' track-by="track by hipoteseLegal.id" ng-disabled='!edit'> </label-select> | |
94 | + </div> | |
95 | + </div> | |
96 | + | |
97 | + | |
98 | + <div class="row"> | |
99 | + | |
100 | + <div class="col-md-6"> | |
101 | + | |
102 | + <label-text-area ng-id="processo.assuntoComplementar" ng-label="ECM.LABEL.ASSUNTOCOMPLEMENTAR" ng-model="processo.assuntoComplementar" form="processoForm" /> | |
103 | + | |
104 | + </div> | |
105 | + | |
106 | + <div class="col-md-6"> | |
107 | + | |
108 | + <label-text-area ng-id="processo.observacaoGeral" ng-label="ECM.LABEL.OBSERVACAOGERAL" ng-model="processo.observacaoGeral" form="processoForm" /> | |
109 | + | |
110 | + </div> | |
111 | + | |
112 | + </div> | |
113 | + | |
114 | + <fieldset> | |
115 | + | |
116 | + <legend> | |
117 | + <translate>ECM.LABEL.INTERESSADOS</translate> | |
118 | + </legend> | |
119 | + | |
120 | + <div class="row"> | |
121 | + | |
122 | + <div class="col-md-12"> | |
123 | + | |
124 | + <div class="row"> | |
125 | + <div class="col-sm-6"> | |
126 | + <auto-complete ng-id="interessado" ng-label="ECM.LABEL.INTERESSADO" ng-model="interessado" ng-find="findAutoCompleteInteressados(value)" ng-item="item.nome" ng-set-result="setInteressados(item)" | |
127 | + ng-show='edit' button-new-show="true" button-new-action="novaPessoa();" /> | |
128 | + </div> | |
129 | + </div> | |
130 | + | |
131 | + <div class="row"> | |
132 | + <div class="col-sm-6"> | |
133 | + <div class="panel panel-default"> | |
134 | + <div class="panel-heading clearfix"> | |
135 | + <button class="btn btn-clear" type="button" ng-hide="!edit" ng-click="removerInteressados()" ng-show='edit'> | |
136 | + <i class="fa fa-times red"></i> | |
137 | + <translate>LABEL.REMOVER</translate> | |
138 | + </button> | |
139 | + </div> | |
140 | + <table class="table table-striped table-bordered table-hover"> | |
141 | + <thead> | |
142 | + <tr> | |
143 | + <th width="5%" class="text-center"></th> | |
144 | + | |
145 | + <th class="text-center"><translate>LABEL.NOME</translate></th> | |
146 | + | |
147 | + </tr> | |
148 | + </thead> | |
149 | + | |
150 | + | |
151 | + <tbody> | |
152 | + <tr ng-repeat="interessado in processo.interessados"> | |
153 | + <td class="text-center"><input type="radio" name="interessadoChecked" id="interessadoChecked" ng-value="interessado" ng-model="$parent.interessadoChecked" | |
154 | + ng-click="setInteressadoRemocao(interessado, $index)" /></td> | |
155 | + | |
156 | + <td class="text-center">{{interessado.interessado.nome}}</td> | |
157 | + | |
158 | + </tr> | |
159 | + <tr ng-hide="processo.interessados.length > 0"> | |
160 | + <td colspan="3" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | |
161 | + </tr> | |
162 | + </tbody> | |
163 | + </table> | |
164 | + </div> | |
165 | + </div> | |
166 | + </div> | |
167 | + </div> | |
168 | + </div> | |
169 | + </fieldset> | |
170 | +</fieldset> | ... | ... |
cit-ecm-web/src/main/webapp/html/processo/processo.html
cit-ecm-web/src/main/webapp/html/processo/processoEdit.html
1 | -<div id="editProcessoEcm" class="page-content clearfix" ng-controller="ProcessoController as processoNewController"> | |
2 | - | |
3 | - <div id="newProcesso" ng-if="!processo.id"> | |
4 | - <div class="bar-buttons-action fixed"> | |
5 | - <div class="row"> | |
6 | - <div class="col-sm-8 text-left"> | |
7 | - | |
8 | - <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | |
9 | - <i class="fa fa-save green"></i> | |
10 | - <translate>LABEL.SALVAR</translate> | |
11 | - </button> | |
12 | - | |
13 | - <button class="btn btn-clear" ng-click="resetForm()" ng-show="edit"> | |
14 | - <i class="fa fa-eraser yellow-dark"></i> | |
15 | - <translate>LABEL.LIMPAR</translate> | |
16 | - </button> | |
17 | - | |
18 | - <button class="btn btn-clear" ng-show="!edit" ng-click="edit = true"> | |
19 | - <i class="fa fa-pencil blue"></i> | |
20 | - <translate>LABEL.EDITAR</translate> | |
21 | - </button> | |
22 | - | |
1 | +<div id="editProcesso" class="page-content clearfix" ng-controller="ProcessoController as processoEditController"> | |
2 | + <form id="processoEditController.processoForm" name="processoEditController.processoForm" autocomplete="off" novalidate> | |
3 | + | |
4 | + <div id="editProcesso" ng-if="processo.id"> | |
5 | + <div id="widget-processo" class="widget-box margin-bottom"> | |
6 | + <div class="widget-header"> | |
7 | + <h2 class="widget-title"> | |
8 | + <translate>ECM.LABEL.PROCESSO</translate> | |
9 | + </h2> | |
10 | + | |
11 | + <div class="widget-toolbar"> | |
12 | + <a href="#void" ng-click="closeWidget('widget-processo')"> <i class="fa fa-close"></i> | |
13 | + </a> | |
14 | + </div> | |
23 | 15 | </div> |
24 | - | |
25 | - <div class="col-sm-4 text-right"> | |
26 | - | |
27 | - <favorito /> | |
28 | - | |
29 | - <help-button workspace="workspace" /> | |
30 | - | |
16 | + <div class="widget-body"> | |
17 | + <div class="widget-main clearfix"> | |
18 | + <div ng-include src="'/cit-ecm-web/html/processo/metadadosProcesso.html'" /> | |
19 | + </div> | |
20 | + | |
21 | + <div class="row" ng-if="processo.id"> | |
22 | + <div style="margin-top: -38px; margin-left: 17px;" class="col-md-12"> | |
23 | + <button class="btn btn-sm btn-primary" ng-click="saveOrUpdate()"> | |
24 | + <translate>LABEL.SALVAR</translate> | |
25 | + </button> | |
26 | + | |
27 | + <button class="btn btn-sm btn-primary" ng-click="closeWidget('widget-processo')"> | |
28 | + <translate>LABEL.CANCELAR</translate> | |
29 | + </button> | |
30 | + </div> | |
31 | + </div> | |
31 | 32 | </div> |
32 | - | |
33 | 33 | </div> |
34 | - | |
35 | 34 | </div> |
36 | - | |
37 | - <breadcrumb ng-workspace="workspace"></breadcrumb> | |
38 | - | |
39 | - </div> | |
40 | - | |
41 | - <form id="processoNewController.processoForm" name="processoNewController.processoForm" autocomplete="off" novalidate> | |
42 | - <div ng-include src="'/cit-ecm-web/html/processo/metadadoProcessoEdit.html'" /> | |
43 | 35 | </form> |
44 | - | |
45 | 36 | </div> |
46 | 37 | |
47 | 38 | <!-- .page-content --> |
48 | - | |
49 | - | |
50 | - | |
51 | - | |
52 | - | |
53 | - | |
54 | - | ... | ... |
cit-ecm-web/src/main/webapp/html/processo/processoNew.html
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +<div id="newProcesso" class="page-content clearfix" ng-controller="ProcessoController as processoNewController"> | |
2 | + | |
3 | + <div id="newProcesso" ng-if="!processo.id"> | |
4 | + <div class="bar-buttons-action fixed"> | |
5 | + <div class="row"> | |
6 | + <div class="col-sm-8 text-left"> | |
7 | + | |
8 | + <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | |
9 | + <i class="fa fa-save green"></i> | |
10 | + <translate>LABEL.SALVAR</translate> | |
11 | + </button> | |
12 | + | |
13 | + <button class="btn btn-clear" ng-click="resetForm()" ng-show="edit"> | |
14 | + <i class="fa fa-eraser yellow-dark"></i> | |
15 | + <translate>LABEL.LIMPAR</translate> | |
16 | + </button> | |
17 | + | |
18 | + <button class="btn btn-clear" ng-show="!edit" ng-click="edit = true"> | |
19 | + <i class="fa fa-pencil blue"></i> | |
20 | + <translate>LABEL.EDITAR</translate> | |
21 | + </button> | |
22 | + | |
23 | + </div> | |
24 | + | |
25 | + <div class="col-sm-4 text-right"> | |
26 | + | |
27 | + <favorito /> | |
28 | + | |
29 | + <help-button workspace="workspace" /> | |
30 | + | |
31 | + </div> | |
32 | + | |
33 | + </div> | |
34 | + | |
35 | + </div> | |
36 | + | |
37 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | |
38 | + | |
39 | + </div> | |
40 | + | |
41 | + <form id="processoNewController.processoForm" name="processoNewController.processoForm" autocomplete="off" novalidate> | |
42 | + <div ng-include src="'/cit-ecm-web/html/processo/metadadosProcesso.html'" /> | |
43 | + </form> | |
44 | + | |
45 | +</div> | ... | ... |