Commit 5a0e19223383ff06c91bf18bcace11930356342d
1 parent
d4622260
Exists in
master
redmine #4583 assinatura interna com visualizacoes
Showing
10 changed files
with
208 additions
and
88 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/model/Assinatura.java
@@ -8,6 +8,7 @@ import javax.persistence.Id; | @@ -8,6 +8,7 @@ import javax.persistence.Id; | ||
8 | import javax.persistence.ManyToOne; | 8 | import javax.persistence.ManyToOne; |
9 | 9 | ||
10 | import br.com.centralit.framework.json.Views; | 10 | import br.com.centralit.framework.json.Views; |
11 | +import br.com.centralit.framework.model.Dominio; | ||
11 | import br.com.centralit.framework.model.Usuario; | 12 | import br.com.centralit.framework.model.Usuario; |
12 | import br.com.centralit.framework.model.arquitetura.PersistentObjectAudit; | 13 | import br.com.centralit.framework.model.arquitetura.PersistentObjectAudit; |
13 | 14 | ||
@@ -58,12 +59,23 @@ public class Assinatura extends PersistentObjectAudit { | @@ -58,12 +59,23 @@ public class Assinatura extends PersistentObjectAudit { | ||
58 | private Long id; | 59 | private Long id; |
59 | 60 | ||
60 | /** Atributo usuario. */ | 61 | /** Atributo usuario. */ |
62 | + @JsonView({ Views.DocumentoGedEdit.class }) | ||
61 | @ManyToOne(fetch = FetchType.LAZY) | 63 | @ManyToOne(fetch = FetchType.LAZY) |
62 | private Usuario usuario; | 64 | private Usuario usuario; |
63 | 65 | ||
64 | - /** Atributo documento. */ | 66 | + /** Atributo documentoGed. */ |
65 | @ManyToOne(fetch = FetchType.LAZY) | 67 | @ManyToOne(fetch = FetchType.LAZY) |
66 | - private Documento documento; | 68 | + private DocumentoGed documentoGed; |
69 | + | ||
70 | + /** Atributo tipoAssinatura. */ | ||
71 | + @JsonView({ Views.DocumentoGedEdit.class }) | ||
72 | + @ManyToOne(fetch = FetchType.LAZY) | ||
73 | + private Dominio tipoAssinatura; | ||
74 | + | ||
75 | + /** Atributo funcao. */ | ||
76 | + @ManyToOne(fetch = FetchType.LAZY) | ||
77 | + @JsonView({ Views.DocumentoGedEdit.class }) | ||
78 | + private Funcao funcao; | ||
67 | 79 | ||
68 | /** | 80 | /** |
69 | * Retorna o valor do atributo <code>id</code> | 81 | * Retorna o valor do atributo <code>id</code> |
@@ -106,23 +118,63 @@ public class Assinatura extends PersistentObjectAudit { | @@ -106,23 +118,63 @@ public class Assinatura extends PersistentObjectAudit { | ||
106 | } | 118 | } |
107 | 119 | ||
108 | /** | 120 | /** |
109 | - * Retorna o valor do atributo <code>documento</code> | 121 | + * Retorna o valor do atributo <code>documentoGed</code> |
122 | + * | ||
123 | + * @return <code>DocumentoGed</code> | ||
124 | + */ | ||
125 | + public DocumentoGed getDocumentoGed() { | ||
126 | + | ||
127 | + return documentoGed; | ||
128 | + } | ||
129 | + | ||
130 | + /** | ||
131 | + * Define o valor do atributo <code>documentoGed</code>. | ||
132 | + * | ||
133 | + * @param documentoGed | ||
134 | + */ | ||
135 | + public void setDocumentoGed(DocumentoGed documentoGed) { | ||
136 | + | ||
137 | + this.documentoGed = documentoGed; | ||
138 | + } | ||
139 | + | ||
140 | + /** | ||
141 | + * Retorna o valor do atributo <code>tipoAssinatura</code> | ||
142 | + * | ||
143 | + * @return <code>Dominio</code> | ||
144 | + */ | ||
145 | + public Dominio getTipoAssinatura() { | ||
146 | + | ||
147 | + return tipoAssinatura; | ||
148 | + } | ||
149 | + | ||
150 | + /** | ||
151 | + * Define o valor do atributo <code>tipoAssinatura</code>. | ||
152 | + * | ||
153 | + * @param tipoAssinatura | ||
154 | + */ | ||
155 | + public void setTipoAssinatura(Dominio tipoAssinatura) { | ||
156 | + | ||
157 | + this.tipoAssinatura = tipoAssinatura; | ||
158 | + } | ||
159 | + | ||
160 | + /** | ||
161 | + * Retorna o valor do atributo <code>funcao</code> | ||
110 | * | 162 | * |
111 | - * @return <code>Documento</code> | 163 | + * @return <code>Funcao</code> |
112 | */ | 164 | */ |
113 | - public Documento getDocumento() { | 165 | + public Funcao getFuncao() { |
114 | 166 | ||
115 | - return documento; | 167 | + return funcao; |
116 | } | 168 | } |
117 | 169 | ||
118 | /** | 170 | /** |
119 | - * Define o valor do atributo <code>documento</code>. | 171 | + * Define o valor do atributo <code>funcao</code>. |
120 | * | 172 | * |
121 | - * @param documento | 173 | + * @param funcao |
122 | */ | 174 | */ |
123 | - public void setDocumento(Documento documento) { | 175 | + public void setFuncao(Funcao funcao) { |
124 | 176 | ||
125 | - this.documento = documento; | 177 | + this.funcao = funcao; |
126 | } | 178 | } |
127 | 179 | ||
128 | } | 180 | } |
cit-ecm-api/src/main/java/br/com/centralit/api/model/Assunto.java
1 | package br.com.centralit.api.model; | 1 | package br.com.centralit.api.model; |
2 | 2 | ||
3 | -import javax.persistence.Entity; | ||
4 | import javax.persistence.FetchType; | 3 | import javax.persistence.FetchType; |
5 | import javax.persistence.GeneratedValue; | 4 | import javax.persistence.GeneratedValue; |
6 | import javax.persistence.GenerationType; | 5 | import javax.persistence.GenerationType; |
cit-ecm-api/src/main/java/br/com/centralit/api/model/DocumentoGed.java
@@ -235,6 +235,10 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { | @@ -235,6 +235,10 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { | ||
235 | @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | 235 | @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) |
236 | private Collection<InteressadoDocumento> interessados; | 236 | private Collection<InteressadoDocumento> interessados; |
237 | 237 | ||
238 | + @OneToMany(fetch = FetchType.LAZY, mappedBy = "documentoGed", cascade = CascadeType.ALL, orphanRemoval = true) | ||
239 | + @JsonView({ Views.DocumentoGedEdit.class }) | ||
240 | + private Collection<Assinatura> assinaturas; | ||
241 | + | ||
238 | /** | 242 | /** |
239 | * @return the novaVersao | 243 | * @return the novaVersao |
240 | */ | 244 | */ |
@@ -973,4 +977,24 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { | @@ -973,4 +977,24 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { | ||
973 | this.tipoSuporteDocumento = tipoSuporteDocumento; | 977 | this.tipoSuporteDocumento = tipoSuporteDocumento; |
974 | } | 978 | } |
975 | 979 | ||
980 | + /** | ||
981 | + * Retorna o valor do atributo <code>assinaturas</code> | ||
982 | + * | ||
983 | + * @return <code>Collection<Assinatura></code> | ||
984 | + */ | ||
985 | + public Collection<Assinatura> getAssinaturas() { | ||
986 | + | ||
987 | + return assinaturas; | ||
988 | + } | ||
989 | + | ||
990 | + /** | ||
991 | + * Define o valor do atributo <code>assinaturas</code>. | ||
992 | + * | ||
993 | + * @param assinaturas | ||
994 | + */ | ||
995 | + public void setAssinaturas(Collection<Assinatura> assinaturas) { | ||
996 | + | ||
997 | + this.assinaturas = assinaturas; | ||
998 | + } | ||
999 | + | ||
976 | } | 1000 | } |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/InicializarEcmServiceImpl.java
@@ -141,6 +141,7 @@ public class InicializarEcmServiceImpl extends UtilStartup { | @@ -141,6 +141,7 @@ public class InicializarEcmServiceImpl extends UtilStartup { | ||
141 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/EstruturaOrganizacionalECMRepository.js", this.dominioJS, menuCadastroProcesso)); | 141 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/EstruturaOrganizacionalECMRepository.js", this.dominioJS, menuCadastroProcesso)); |
142 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/ConfiguracaoUsuarioUnidadeRepository.min.js", this.dominioJS, menuCadastroProcesso)); | 142 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/ConfiguracaoUsuarioUnidadeRepository.min.js", this.dominioJS, menuCadastroProcesso)); |
143 | 143 | ||
144 | + filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/AssinaturaRepository.js", this.dominioJS, menuCadastroProcesso)); | ||
144 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/DocumentoGedRepository.js", this.dominioJS, menuCadastroProcesso)); | 145 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/DocumentoGedRepository.js", this.dominioJS, menuCadastroProcesso)); |
145 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/DocumentoGedRepository.min.js", this.dominioJS, menuCadastroProcesso)); | 146 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/repository/DocumentoGedRepository.min.js", this.dominioJS, menuCadastroProcesso)); |
146 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/controller/GerenciarProcessoController.js", this.dominioJS, menuCadastroProcesso)); | 147 | filesProcesso.add(new MenuFile("/cit-ecm-web/assets/js/angular/custom/controller/GerenciarProcessoController.js", this.dominioJS, menuCadastroProcesso)); |
cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
@@ -415,6 +415,8 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -415,6 +415,8 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
415 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.CERTIFICADO_DIGITAL", "Certificado Digital", dominio, modulo)); | 415 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.CERTIFICADO_DIGITAL", "Certificado Digital", dominio, modulo)); |
416 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINATURA_DOCUMENTO", "Assinatura de Documento", dominio, modulo)); | 416 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINATURA_DOCUMENTO", "Assinatura de Documento", dominio, modulo)); |
417 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINAR", "Assinar", dominio, modulo)); | 417 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINAR", "Assinar", dominio, modulo)); |
418 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DATA_DA_ASSINATURA", "Data da assinatura", dominio, modulo)); | ||
419 | + internacionalizacaoList.add(new Internacionalizacao("ECM.ASSINADO_SUCESSO", "Documento assinado com sucesso!", dominio, modulo)); | ||
418 | 420 | ||
419 | } | 421 | } |
420 | 422 | ||
@@ -448,7 +450,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -448,7 +450,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
448 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.REMOCAO_COM_VINCULO", "Não é possível excluir pois o mesmo encontra-se em uso por outro cadastro no sistema!", dominio, modulo)); | 450 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.REMOCAO_COM_VINCULO", "Não é possível excluir pois o mesmo encontra-se em uso por outro cadastro no sistema!", dominio, modulo)); |
449 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.PERMISSAO_OPERACAO", "Você não tem permissão para executar a operação.", dominio, modulo)); | 451 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.PERMISSAO_OPERACAO", "Você não tem permissão para executar a operação.", dominio, modulo)); |
450 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.GRUPO_PADRAO_EM_OUTRA_UNIDADE", "O grupo selecionado como padrão está sendo usado como grupo padrão da unidade ", dominio, modulo)); | 452 | internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.GRUPO_PADRAO_EM_OUTRA_UNIDADE", "O grupo selecionado como padrão está sendo usado como grupo padrão da unidade ", dominio, modulo)); |
451 | - | 453 | + internacionalizacaoList.add(new Internacionalizacao("ECM.VALIDACAO.SENHA_ASSINATURA", "Informe sua senha para assinar!", dominio, modulo)); |
452 | } | 454 | } |
453 | 455 | ||
454 | /** | 456 | /** |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoController.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | 3 | ||
4 | -citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$timeout','GerenciarProcessoRepository', 'ProcessoRepository', 'RuntimeManagerRepository','$rootScope', 'DocumentoGedRepository', 'HistoricoAlteracaoProcessoRepository','UnidadeRepository','UnidadeProcessoRepository','CredencialProcessoRepository', 'PessoaRepository', | ||
5 | - function GerenciarProcessoController($scope, $translate, $timeout, GerenciarProcessoRepository, ProcessoRepository, RuntimeManagerRepository,$rootScope, DocumentoGedRepository, HistoricoAlteracaoProcessoRepository,UnidadeRepository, UnidadeProcessoRepository,CredencialProcessoRepository, PessoaRepository) { | 4 | +citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$timeout','GerenciarProcessoRepository', 'ProcessoRepository', 'RuntimeManagerRepository','$rootScope', 'DocumentoGedRepository', 'HistoricoAlteracaoProcessoRepository','UnidadeRepository','UnidadeProcessoRepository','CredencialProcessoRepository', 'PessoaRepository', '$q', 'AssinaturaRepository', |
5 | + function GerenciarProcessoController($scope, $translate, $timeout, GerenciarProcessoRepository, ProcessoRepository, RuntimeManagerRepository,$rootScope, DocumentoGedRepository, HistoricoAlteracaoProcessoRepository,UnidadeRepository, UnidadeProcessoRepository,CredencialProcessoRepository, PessoaRepository, $q, AssinaturaRepository) { | ||
6 | 6 | ||
7 | $scope.processo = {}; | 7 | $scope.processo = {}; |
8 | $scope.iconAnexo = {}; | 8 | $scope.iconAnexo = {}; |
@@ -30,7 +30,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | @@ -30,7 +30,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | ||
30 | $scope.isGerenciarCredencialProcesso = false; | 30 | $scope.isGerenciarCredencialProcesso = false; |
31 | $scope.isClassificarProcessoDocumento = false; | 31 | $scope.isClassificarProcessoDocumento = false; |
32 | $scope.isAtribuirProcesso = false; | 32 | $scope.isAtribuirProcesso = false; |
33 | - $scope.isAssinarDocumento = false; | 33 | + $scope.exibirAssinarDocAnexo = false; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | // CRIAR RELACIONAMENTO DE PROCESSO | 36 | // CRIAR RELACIONAMENTO DE PROCESSO |
@@ -701,16 +701,43 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | @@ -701,16 +701,43 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | ||
701 | $scope.abrirAssinarDocumento = function(documento) { | 701 | $scope.abrirAssinarDocumento = function(documento) { |
702 | $scope.fecharPagina(); | 702 | $scope.fecharPagina(); |
703 | $scope.numeroDocumento = documento.numero ? documento.numero : ''; | 703 | $scope.numeroDocumento = documento.numero ? documento.numero : ''; |
704 | - $scope.isAssinarDocumento = false; | ||
705 | - _obterPermissaoAssinaturaDocumento(); | 704 | + $scope.exibirAssinarDocAnexo = false; |
705 | + $scope.documentoSelecionado = null; | ||
706 | + if(documento.formaCriacao.codigo === 1){ | ||
707 | + //TODO ABRIR DOCUMENTO ONLINE | ||
708 | + } else if(documento.formaCriacao.codigo === 2){ | ||
709 | + _obterAssinaturasDocumento(documento.id).then(function(documentoSelecionado){ | ||
710 | + $scope.documentoSelecionado = documentoSelecionado; | ||
711 | + _validarAssinaturaPorUsuario(documento.id).then(function(exibirIncluirAssinatura){ | ||
712 | + $scope.exibirIncluirAssinatura = !(exibirIncluirAssinatura == true); | ||
713 | + _obterPermissaoAssinaturaDocumentoExterno(); | ||
714 | + }); | ||
715 | + }); | ||
716 | + } | ||
706 | }; | 717 | }; |
707 | 718 | ||
708 | - function _obterPermissaoAssinaturaDocumento(){ | 719 | + function _validarAssinaturaPorUsuario(idDocumento){ |
720 | + var deferred = $q.defer(); | ||
721 | + AssinaturaRepository.validarAssinaturaPorUsuario(idDocumento).then(function(result){ | ||
722 | + deferred.resolve(result); | ||
723 | + }); | ||
724 | + return deferred.promise; | ||
725 | + } | ||
726 | + | ||
727 | + function _obterAssinaturasDocumento(idDocumento) { | ||
728 | + var deferred = $q.defer(); | ||
729 | + DocumentoGedRepository.get(idDocumento).then(function(result){ | ||
730 | + deferred.resolve(result.originalElement); | ||
731 | + }); | ||
732 | + return deferred.promise; | ||
733 | + } | ||
734 | + | ||
735 | + function _obterPermissaoAssinaturaDocumentoExterno(){ | ||
709 | $scope.pessoa = {}; | 736 | $scope.pessoa = {}; |
710 | PessoaRepository.getPermissaoAssinaturaDocumento().then(function(result){ | 737 | PessoaRepository.getPermissaoAssinaturaDocumento().then(function(result){ |
711 | - $scope.isAssinarDocumento = result.originalElement.isAssinarDocumento; | 738 | + $scope.exibirAssinarDocAnexo = result.originalElement.exibirAssinarDocAnexo; |
712 | $scope.pessoa = result.originalElement; | 739 | $scope.pessoa = result.originalElement; |
713 | - if(!$scope.isAssinarDocumento) { | 740 | + if(!$scope.exibirAssinarDocAnexo) { |
714 | $scope.showAlert("error", $translate.instant('ECM.MSG.ERRO_PERMISSAO_ASSINAR')); | 741 | $scope.showAlert("error", $translate.instant('ECM.MSG.ERRO_PERMISSAO_ASSINAR')); |
715 | return; | 742 | return; |
716 | } | 743 | } |
@@ -737,7 +764,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | @@ -737,7 +764,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | ||
737 | } | 764 | } |
738 | 765 | ||
739 | function _getFuncao(parceiro, isServidor) { | 766 | function _getFuncao(parceiro, isServidor) { |
740 | - var funcao = {nome : '', isServidor : isServidor}; | 767 | + var funcao = {id : parceiro.funcao.id, nome : '', isServidor : isServidor}; |
741 | if(parceiro.cargo) | 768 | if(parceiro.cargo) |
742 | funcao.nome = funcao.nome.concat(parceiro.cargo).concat(' / ').concat(parceiro.funcao.nome); | 769 | funcao.nome = funcao.nome.concat(parceiro.cargo).concat(' / ').concat(parceiro.funcao.nome); |
743 | else | 770 | else |
@@ -745,4 +772,45 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | @@ -745,4 +772,45 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim | ||
745 | return funcao; | 772 | return funcao; |
746 | } | 773 | } |
747 | 774 | ||
775 | + $scope.assinar = function() { | ||
776 | + if(!$scope.autenticacao){ | ||
777 | + $scope.showAlert("error", $translate.instant('ECM.VALIDACAO.SENHA_ASSINATURA')); | ||
778 | + return; | ||
779 | + } | ||
780 | + | ||
781 | + AssinaturaRepository.saveAssinaturaInterna(_getAssinatura()).then(function(result){ | ||
782 | + if($scope.documentoSelecionado.assinaturas) | ||
783 | + $scope.documentoSelecionado.assinaturas.push(result.originalElement); | ||
784 | + $scope.autenticacao = null; | ||
785 | + $scope.exibirIncluirAssinatura = false; | ||
786 | + $scope.showAlert("success", $translate.instant('ECM.ASSINADO_SUCESSO')); | ||
787 | + }); | ||
788 | + }; | ||
789 | + | ||
790 | + function _getAssinatura(){ | ||
791 | + return {documentoGed : { id : $scope.documentoSelecionado.id }, funcao : {id : _getFuncaoChecked()} }; | ||
792 | + }; | ||
793 | + | ||
794 | + function _getFuncaoChecked(){ | ||
795 | + for(var pos = 0; pos < $scope.funcoes.length; pos++){ | ||
796 | + if($scope.funcoes[pos].isServidor) | ||
797 | + return $scope.funcoes[pos].id; | ||
798 | + } | ||
799 | + }; | ||
800 | + | ||
801 | + /* | ||
802 | + * Abre panel visualizar assinaturas | ||
803 | + */ | ||
804 | + $scope.visualizarAssinaturasDocumento = function(documento){ | ||
805 | + $scope.fecharPagina(); | ||
806 | + $scope.numeroDocumento = documento.numero ? documento.numero : ''; | ||
807 | + $scope.exibirAssinarDocAnexo = false; | ||
808 | + $scope.documentoSelecionado = null; | ||
809 | + $scope.exibirIncluirAssinatura = false; | ||
810 | + _obterAssinaturasDocumento(documento.id).then(function(documentoSelecionado){ | ||
811 | + $scope.documentoSelecionado = documentoSelecionado; | ||
812 | + $scope.exibirAssinarDocAnexo = true; | ||
813 | + }); | ||
814 | + }; | ||
815 | + | ||
748 | }] ); | 816 | }] ); |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoListUnidadeController.js
@@ -134,7 +134,9 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -134,7 +134,9 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
134 | assignment.workItem = $scope.workItem; | 134 | assignment.workItem = $scope.workItem; |
135 | assignment.checked = false; | 135 | assignment.checked = false; |
136 | }); | 136 | }); |
137 | - $scope.assignments[0].checked = true; | 137 | + if($scope.assignments.length > 0){ |
138 | + $scope.assignments[0].checked = true; | ||
139 | + } | ||
138 | }; | 140 | }; |
139 | 141 | ||
140 | $scope.selectAssignment = function(assignmentSelect) { | 142 | $scope.selectAssignment = function(assignmentSelect) { |
cit-ecm-web/src/main/webapp/html/assinatura/documentoAssinaturaEdit.html
1 | -<div id="documentoAssinatura" class="widget-box margin-bottom" ng-controller="GerenciarProcessoController"> | ||
2 | - <div class="widget-header"> | ||
3 | - <h2 class="widget-title"> | ||
4 | - <translate>ECM.LABEL.ASSINATURA_DOCUMENTO</translate> : {{numeroDocumento}} | ||
5 | - </h2> | ||
6 | - <div class="widget-toolbar"> | ||
7 | - <a href="#void" ng-click="widgetAssinarDocIsCollapsed = !widgetAssinarDocIsCollapsed"> | ||
8 | - <i class="fa" ng-class="{'fa-chevron-up': !widgetAssinarDocIsCollapsed, 'fa-chevron-down': widgetAssinarDocIsCollapsed}"></i> | ||
9 | - </a> | ||
10 | - </div> | 1 | +<div class="row"> |
2 | + <div class="col-sm-12"> | ||
3 | + <label-input ng-type="text" ng-id="assinante" ng-label="ECM.LABEL.ASSINANTE" ng-disabled="true" ng-model="pessoa.nome" /> | ||
11 | </div> | 4 | </div> |
12 | - <div class="widget-body" collapse="widgetAssinarDocIsCollapsed"> | ||
13 | - <div class="widget-main clearfix"> | ||
14 | - <div class="page-content clearfix"> | ||
15 | - <div class="row"> | ||
16 | - <div class="col-sm-12"> | ||
17 | - <label-input ng-type="text" ng-id="assinante" ng-label="ECM.LABEL.ASSINANTE" ng-disabled="true" ng-model="pessoa.nome" /> | ||
18 | - </div> | ||
19 | - </div> | ||
20 | - <div class="row"> | ||
21 | - <div class="col-sm-12"> | ||
22 | - <strong><label><translate>ECM.LABEL.CARGO_FUNCAO</translate></label></strong> | ||
23 | - </div> | ||
24 | - </div> | ||
25 | - <div class="row"> | ||
26 | - <div class="col-sm-12"> | ||
27 | - <div class="form-group" style="padding: 4px;"> | ||
28 | - <label data-ng-repeat="funcao in funcoes"> | ||
29 | - <input type="radio" name="response" data-ng-model="funcao.isServidor" data-ng-value="true" class="radio-group-inline" style="margin-left: 20px;"/> | ||
30 | - {{funcao.nome}} | ||
31 | - </label> | ||
32 | - </div> | ||
33 | - </div> | ||
34 | - </div> | ||
35 | - | ||
36 | - <div class="row"> | ||
37 | - <div class="col-sm-1" style="margin-top: 5px; !important"> | ||
38 | - <label> | ||
39 | - <translate>PORTAL.LABEL.SENHA</translate> | ||
40 | - </label> | ||
41 | - </div> | ||
42 | - <div class="col-sm-4" style="margin-top: 0px; !important"> | ||
43 | - <label-input ng-type="password" ng-id="autenticacao" ng-disabled="false" ng-model="autenticacao" /> | ||
44 | - </div> | ||
45 | - <div class="col-sm-4" style="margin-top: 5px; !important"> | ||
46 | - <label> | ||
47 | - <translate>ECM.LABEL.OU</translate> | ||
48 | - </label> | ||
49 | - <label style="margin-left: 5px;"> | ||
50 | - <translate>ECM.LABEL.CERTIFICADO_DIGITAL</translate> | ||
51 | - <i class="glyphicon glyphicon-info-sign blue" tooltip="{{$translate.instant('ECM.LABEL.CERTIFICADO_DIGITAL')}}" style="margin-left: 5px;"></i> | ||
52 | - </label> | ||
53 | - </div> | ||
54 | - </div> | ||
55 | - | ||
56 | - <div class="row"> | ||
57 | - <div class="col-md-12"> | ||
58 | - <button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" type="button" class="btn btn-sm btn-primary"> | ||
59 | - <i class="fa fa-save green"></i> | ||
60 | - <translate>LABEL.SALVAR</translate> | ||
61 | - </button> | ||
62 | - </div> | ||
63 | - </div> | 5 | +</div> |
6 | +<div class="row"> | ||
7 | + <div class="col-sm-12"> | ||
8 | + <strong><label><translate>ECM.LABEL.CARGO_FUNCAO</translate></label></strong> | ||
9 | + </div> | ||
10 | +</div> | ||
11 | +<div class="row"> | ||
12 | + <div class="col-sm-12"> | ||
13 | + <div class="form-group" style="padding: 4px;"> | ||
14 | + <label data-ng-repeat="funcao in funcoes"> | ||
15 | + <input type="radio" name="response" data-ng-model="funcao.isServidor" data-ng-value="true" class="radio-group-inline" style="margin-left: 20px;"/> | ||
16 | + {{funcao.nome}} | ||
17 | + </label> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | +</div> | ||
64 | 21 | ||
65 | - </div> | ||
66 | - </div> | 22 | +<div class="row"> |
23 | + <div class="col-sm-1" style="margin-top: 5px; !important"> | ||
24 | + <label> | ||
25 | + <translate>PORTAL.LABEL.SENHA</translate> | ||
26 | + </label> | ||
27 | + </div> | ||
28 | + <div class="col-sm-4" > | ||
29 | + <label-input ng-type="password" ng-id="autenticacao" ng-disabled="false" ng-model="$parent.autenticacao" /> | ||
67 | </div> | 30 | </div> |
31 | +<!-- <div class="col-sm-4" style="margin-top: 5px; !important"> --> | ||
32 | +<!-- <label> --> | ||
33 | +<!-- <translate>ECM.LABEL.OU</translate> --> | ||
34 | +<!-- </label> --> | ||
35 | +<!-- <label style="margin-left: 5px; font-weight: bold"> --> | ||
36 | +<!-- <translate>ECM.LABEL.CERTIFICADO_DIGITAL</translate> --> | ||
37 | +<!-- <i class="glyphicon glyphicon-info-sign blue" tooltip="{{$translate.instant('ECM.LABEL.CERTIFICADO_DIGITAL')}}" style="margin-left: 5px;"></i> --> | ||
38 | +<!-- </label> --> | ||
39 | +<!-- </div> --> | ||
68 | </div> | 40 | </div> |
69 | \ No newline at end of file | 41 | \ No newline at end of file |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/includeAcaoProcesso.html
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <div ng-include src="'/cit-ecm-web/html/atribuirProcesso/atribuir.html'" ng-show="isAtribuirProcesso" /> | 26 | <div ng-include src="'/cit-ecm-web/html/atribuirProcesso/atribuir.html'" ng-show="isAtribuirProcesso" /> |
27 | 27 | ||
28 | <!-- Assinatura documento --> | 28 | <!-- Assinatura documento --> |
29 | -<div ng-include src="'/cit-ecm-web/html/documentoGed/documentoAssinatura.html'" ng-show="isAssinarDocumento" /> | 29 | +<div ng-include src="'/cit-ecm-web/html/assinatura/documentoAssinaturaView.html'" ng-show="exibirAssinarDocAnexo" /> |
30 | 30 | ||
31 | <div id="widget-processo" ng-show="isProcessoEdit" class="widget-box margin-bottom"> | 31 | <div id="widget-processo" ng-show="isProcessoEdit" class="widget-box margin-bottom"> |
32 | <div class="widget-header"> | 32 | <div class="widget-header"> |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/includeDocumentosProcesso.html
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <li ng-if='!documento.cancelado'><a href="#void" ng-click="visualizarVersoes(documento);"> <translate>ECM.LABEL.VERSOESDODOCUMENTO</translate></a></li> | 40 | <li ng-if='!documento.cancelado'><a href="#void" ng-click="visualizarVersoes(documento);"> <translate>ECM.LABEL.VERSOESDODOCUMENTO</translate></a></li> |
41 | <li ><a ng-if='documento.cancelado'href="#void" ng-click="getCancelamentoDocumento(documento);"> <translate>ECM.LABEL.JUSTIFICATIVA_CANCELAMENTO</translate></a></li> | 41 | <li ><a ng-if='documento.cancelado'href="#void" ng-click="getCancelamentoDocumento(documento);"> <translate>ECM.LABEL.JUSTIFICATIVA_CANCELAMENTO</translate></a></li> |
42 | <li ><a href="#void" ng-click="abrirAssinarDocumento(documento)"> <translate>ECM.LABEL.ASSINARDOCUMENTO</translate></a></li> | 42 | <li ><a href="#void" ng-click="abrirAssinarDocumento(documento)"> <translate>ECM.LABEL.ASSINARDOCUMENTO</translate></a></li> |
43 | - <li ><a href="#void" ng-click="visualizarAssinarDocumento()"> <translate>ECM.LABEL.ASSINATURAS_DOCUMENTO</translate></a></li> | 43 | + <li ><a href="#void" ng-click="visualizarAssinaturasDocumento(documento)"> <translate>ECM.LABEL.ASSINATURAS_DOCUMENTO</translate></a></li> |
44 | </ul> | 44 | </ul> |
45 | 45 | ||
46 | </div> | 46 | </div> |