Commit f55c143588b66d91cea358281d98de12cefa5541
1 parent
7007f863
Exists in
master
redmine #4463 sub tabela com consulta
Showing
6 changed files
with
181 additions
and
55 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/model/PlanoClassificacao.java
@@ -77,7 +77,7 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme | @@ -77,7 +77,7 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme | ||
77 | private String codigo; | 77 | private String codigo; |
78 | 78 | ||
79 | /** Atributo nome. */ | 79 | /** Atributo nome. */ |
80 | - @JsonView({ ViewsEcm.PlanoClassificacaoListView.class, ViewsEcm.PlanoClassificacaoParent.class, ViewsEcm.PlanoClassificacaoAutocompleteRecursive.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoProcessoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class, Views.UnidadeProcessoListView.class }) | 80 | + @JsonView({ ViewsEcm.PlanoClassificacaoListView.class, ViewsEcm.PlanoClassificacaoParent.class, ViewsEcm.PlanoClassificacaoAutocompleteRecursive.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoProcessoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class }) |
81 | private String nome; | 81 | private String nome; |
82 | 82 | ||
83 | /** Atributo observacao. */ | 83 | /** Atributo observacao. */ |
@@ -100,7 +100,7 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme | @@ -100,7 +100,7 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme | ||
100 | private Boolean permitirUsarComoClassificacao; | 100 | private Boolean permitirUsarComoClassificacao; |
101 | 101 | ||
102 | @Transient | 102 | @Transient |
103 | - @JsonView({ ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.TipoProcessoEdit.class, Views.ProcessoList.class, Views.DocumentoGedEdit.class, ViewsEcm.TipoDocumentoPlanoClassificacaoAutoCompleteView.class}) | 103 | + @JsonView({ ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.TipoProcessoEdit.class, Views.ProcessoList.class, Views.DocumentoGedEdit.class, ViewsEcm.TipoDocumentoPlanoClassificacaoAutoCompleteView.class, Views.UnidadeProcessoListView.class }) |
104 | private String assunto; | 104 | private String assunto; |
105 | 105 | ||
106 | /** Atributo tipoDestinacao. */ | 106 | /** Atributo tipoDestinacao. */ |
cit-ecm-api/src/main/java/br/com/centralit/api/model/Processo.java
@@ -83,7 +83,7 @@ public class Processo extends PersistentObjectUnidade { | @@ -83,7 +83,7 @@ public class Processo extends PersistentObjectUnidade { | ||
83 | private Long id; | 83 | private Long id; |
84 | 84 | ||
85 | /** Atributo assuntoComplementar. */ | 85 | /** Atributo assuntoComplementar. */ |
86 | - @JsonView({ Views.ProcessoList.class }) | 86 | + @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class }) |
87 | private String assuntoComplementar; | 87 | private String assuntoComplementar; |
88 | 88 | ||
89 | /** Atributo dataReferencia. */ | 89 | /** Atributo dataReferencia. */ |
cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
@@ -403,6 +403,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -403,6 +403,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
403 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.NOVO_TIPO_SUPORTE ", "Novo tipo suporte de documento", dominio, modulo)); | 403 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.NOVO_TIPO_SUPORTE ", "Novo tipo suporte de documento", dominio, modulo)); |
404 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.TIPO_SUPORTE_DOCUMENTO ", "Tipo suporte de documento", dominio, modulo)); | 404 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.TIPO_SUPORTE_DOCUMENTO ", "Tipo suporte de documento", dominio, modulo)); |
405 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DIGITE_PROTOCOLO", "Digite o potocolo", dominio, modulo)); | 405 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DIGITE_PROTOCOLO", "Digite o potocolo", dominio, modulo)); |
406 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.SOBRESTAR_SEM", "Sobrestar", dominio, modulo)); | ||
406 | 407 | ||
407 | } | 408 | } |
408 | 409 | ||
@@ -507,6 +508,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -507,6 +508,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
507 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.LEGENDA_CAMPO_DINAMICO_NUMERO_DOCUMENTO", "Use: @numeroDocumento@ para adicionar o número do documento", dominio, modulo)); | 508 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.LEGENDA_CAMPO_DINAMICO_NUMERO_DOCUMENTO", "Use: @numeroDocumento@ para adicionar o número do documento", dominio, modulo)); |
508 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.PROCESSO_CONCLUIDO_SUCESSO", "Processo concluído com sucesso!", dominio, modulo)); | 509 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.PROCESSO_CONCLUIDO_SUCESSO", "Processo concluído com sucesso!", dominio, modulo)); |
509 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.PROCESSO_SALVO_SUCESSO", "O processo !", dominio, modulo)); | 510 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.PROCESSO_SALVO_SUCESSO", "O processo !", dominio, modulo)); |
511 | + internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.NAO_EXISTE_TAREFA_EXECUTAR", "Não existem tarefas a serem executadas!", dominio, modulo)); | ||
510 | 512 | ||
511 | } | 513 | } |
512 | } | 514 | } |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoListUnidadeController.js
@@ -4,8 +4,7 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -4,8 +4,7 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
4 | function GerenciarProcessoListUnidadeController($scope, workflowFilterCriteriaService, appService, environmentService, FormBuilderRepository, FlowRepository, BusinessProcessRepository, RuntimeManagerRepository, DomainRepository, $compile, $translate, $modal, $injector, $parse, $rootScope, $timeout, BusinessProcessCategoryRepository, GerenciarProcessoRepository, UnidadeProcessoRepository, DominioRepository, $filter) { | 4 | function GerenciarProcessoListUnidadeController($scope, workflowFilterCriteriaService, appService, environmentService, FormBuilderRepository, FlowRepository, BusinessProcessRepository, RuntimeManagerRepository, DomainRepository, $compile, $translate, $modal, $injector, $parse, $rootScope, $timeout, BusinessProcessCategoryRepository, GerenciarProcessoRepository, UnidadeProcessoRepository, DominioRepository, $filter) { |
5 | 5 | ||
6 | $scope.$showAdvancedFilters = false; | 6 | $scope.$showAdvancedFilters = false; |
7 | - | ||
8 | - $scope.processo = {}; | 7 | + $scope.btnAction = false; |
9 | 8 | ||
10 | $scope.headers = [ { | 9 | $scope.headers = [ { |
11 | title : $translate.instant('ECM.LABEL.PROTOCOLO'), | 10 | title : $translate.instant('ECM.LABEL.PROTOCOLO'), |
@@ -14,8 +13,8 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -14,8 +13,8 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
14 | title : $translate.instant('ECM.LABEL.TIPOPROCESSO'), | 13 | title : $translate.instant('ECM.LABEL.TIPOPROCESSO'), |
15 | value : 'processo.tipoProcesso.descricao' | 14 | value : 'processo.tipoProcesso.descricao' |
16 | }, { | 15 | }, { |
17 | - title : $translate.instant('ECM.LABEL.ASSUNTO'), | ||
18 | - value : 'processo.assunto.nome' | 16 | + title : $translate.instant('ECM.LABEL.ASSUNTOCOMPLEMENTAR'), |
17 | + value : 'processo.assuntoComplementar' | ||
19 | }, { | 18 | }, { |
20 | title : $translate.instant('ECM.LABEL.ATRIBUIDOA'), | 19 | title : $translate.instant('ECM.LABEL.ATRIBUIDOA'), |
21 | value : 'usuarioResponsavel.username' | 20 | value : 'usuarioResponsavel.username' |
@@ -25,14 +24,6 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -25,14 +24,6 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
25 | }, { | 24 | }, { |
26 | title : $translate.instant('ECM.LABEL.NIVEL_SIGILO'), | 25 | title : $translate.instant('ECM.LABEL.NIVEL_SIGILO'), |
27 | value : 'processo.sigilo.tipoSigilo.descricao' | 26 | value : 'processo.sigilo.tipoSigilo.descricao' |
28 | - }, { | ||
29 | - title : $translate.instant('LABEL.DATA_DE_CRIACAO'), | ||
30 | - value : 'processo.dataCriacao', | ||
31 | - filter : 'dateBR' | ||
32 | - }, { | ||
33 | - title : $translate.instant('LABEL.DATA_RECEBIMENTO'), | ||
34 | - value : 'processo.dataReferencia', | ||
35 | - filter : 'dateBR' | ||
36 | }]; | 27 | }]; |
37 | 28 | ||
38 | $scope.filterCriteria = { | 29 | $scope.filterCriteria = { |
@@ -41,22 +32,20 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -41,22 +32,20 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
41 | dir : 'asc', | 32 | dir : 'asc', |
42 | sort : 'processo.nup', | 33 | sort : 'processo.nup', |
43 | limit : 10, | 34 | limit : 10, |
44 | - fields: ['id', 'processo.nup', 'processo.tipoProcesso.descricao', 'processo.assunto.nome','usuarioResponsavel.username', 'processo.status.descricao', 'processo.sigilo.tipoSigilo.descricao', 'processo.dataCriacao', 'processo.idProcessInstance', 'processo.dataReferencia', 'processo'], | 35 | + fields: ['id', 'processo.nup', 'processo.tipoProcesso.descricao', 'processo.assuntoComplementar','usuarioResponsavel.username', 'processo.status.descricao', 'processo.sigilo.tipoSigilo.descricao', 'processo.dataCriacao', 'processo.idProcessInstance', 'processo.dataReferencia', 'processo.assunto'], |
45 | filters : [ | 36 | filters : [ |
46 | { type : 'string', field : 'processo.nup'}, | 37 | { type : 'string', field : 'processo.nup'}, |
47 | { type : 'string', field : 'processo.tipoProcesso.descricao'}, | 38 | { type : 'string', field : 'processo.tipoProcesso.descricao'}, |
48 | - { type : 'string', field : 'processo.assunto.nome'}, | 39 | + { type : 'string', field : 'processo.assuntoComplementar'}, |
49 | { type : 'string', field : 'usuarioResponsavel.username'}, | 40 | { type : 'string', field : 'usuarioResponsavel.username'}, |
50 | { type : 'string', field : 'processo.status.descricao', listaDominio : []}, | 41 | { type : 'string', field : 'processo.status.descricao', listaDominio : []}, |
51 | - { type : 'string', field : 'processo.sigilo.tipoSigilo.descricao'}, | ||
52 | - { type: 'date-range', field: 'processo.dataCriacao'}, | ||
53 | - { type: 'date-range', field: 'processo.dataReferencia'} | 42 | + { type : 'string', field : 'processo.sigilo.tipoSigilo.descricao'} |
54 | ] | 43 | ] |
55 | }; | 44 | }; |
56 | 45 | ||
57 | function carregarDominiosStatusProcesso() { | 46 | function carregarDominiosStatusProcesso() { |
58 | DominioRepository.findAllDominio('statusProcesso').then(function(result) { | 47 | DominioRepository.findAllDominio('statusProcesso').then(function(result) { |
59 | - $scope.filterCriteria.filters[3].listaDominio = $filter('orderBy')(result, 'originalElement.descricao', true); | 48 | + $scope.filterCriteria.filters[4].listaDominio = $filter('orderBy')(result, 'originalElement.descricao', true); |
60 | }); | 49 | }); |
61 | }; | 50 | }; |
62 | 51 | ||
@@ -68,10 +57,127 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | @@ -68,10 +57,127 @@ citApp.controller('GerenciarProcessoListUnidadeController', ['$scope', 'workflow | ||
68 | $scope.filterResult(); | 57 | $scope.filterResult(); |
69 | }; | 58 | }; |
70 | 59 | ||
71 | - carregarDominiosStatusProcesso(); | 60 | + $scope.abrirNovoProcesso = function() { |
61 | + $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.NOVOPROCESSO'), '/cit-ecm-web/html/processo/processoEdit.html', 'mod-orange'); | ||
62 | + $timeout(function() { | ||
63 | + angular.element('#editProcessoEcm').scope().$showPageEditWorkspace(angular.element('#editProcessoEcm').scope().workspace); | ||
64 | + $timeout(function(){ | ||
65 | + angular.element('#editProcessoEcm').scope().resetForm(); | ||
66 | + }, 1000); | ||
67 | + | ||
68 | + }, 300); | ||
69 | + }; | ||
72 | 70 | ||
73 | $scope.obterTransclude = function() { | 71 | $scope.obterTransclude = function() { |
74 | - $scope.modelSelecionado = $scope.$$childTail.modelParent; | 72 | + _getProcesso(); |
73 | + if($scope.modelSelecionado){ | ||
74 | + _getFilterCriteriaTarefa(); | ||
75 | + _fetchBusinessProcess(); | ||
76 | + } | ||
77 | + }; | ||
78 | + | ||
79 | + function _getProcesso(){ | ||
80 | + $scope.modelSelecionado = {}; | ||
81 | + for(var count = 0; count < $scope.processos.length; count++){ | ||
82 | + if($scope.processos[count].$show) { | ||
83 | + $scope.modelSelecionado = $scope.processos[count]; | ||
84 | + break; | ||
85 | + } | ||
86 | + } | ||
87 | + | ||
88 | + }; | ||
89 | + | ||
90 | + function _getFilterCriteriaTarefa(){ | ||
91 | + var filterService = workflowFilterCriteriaService.getDefaultFilterCriteria(); | ||
92 | + $scope.filterCriteriaBusinessProcess = { | ||
93 | + start : 1, | ||
94 | + sort : 'workItem.processInstance.id', | ||
95 | + limit : 10, | ||
96 | + deadline : 1, | ||
97 | + processDeadline : 1, | ||
98 | + timeManagementStatus : "", | ||
99 | + fields : [ 'workItem.id', 'workItem.processInstance.id'], | ||
100 | + filters : [{type: 'numeric', field: 'workItem.processInstance.id', value : $scope.modelSelecionado['processo.idProcessInstance']} | ||
101 | + , {type: 'string', field: 'workItem.flowElement.name'} | ||
102 | + , {type: 'string', field: 'workItem.processInstance.businessProcess.description'} | ||
103 | + , {type: 'string', field: 'workItem.processInstance.flowStatus.name'}] | ||
104 | + }; | ||
105 | + | ||
106 | + $scope.filterCriteriaBusinessProcess.username = filterService.username; | ||
107 | + $scope.filterCriteriaBusinessProcess.groups = filterService.groups; | ||
108 | + } | ||
109 | + | ||
110 | + function _fetchBusinessProcess() { | ||
111 | + $scope.assignments = []; | ||
112 | + $scope.btnAction = false; | ||
113 | + $scope.tarefaSelecionada = null; | ||
114 | + $scope.workItem = null; | ||
115 | + BusinessProcessRepository.tasksByParam($scope.filterCriteriaBusinessProcess).then(function(result) { | ||
116 | + $scope.assignments = result.originalElement.objects; | ||
117 | + if($scope.assignments.length > 0) | ||
118 | + _recuperarPermissoes($scope.assignments[0].id); | ||
119 | + else | ||
120 | + $scope.modelSelecionado.$expandido = !$scope.modelSelecionado.$expandido; | ||
121 | + }); | ||
122 | + }; | ||
123 | + | ||
124 | + $scope.selecionarTarefa = function(tarefaSelecionada) { | ||
125 | + //$scope.tarefaSelecionada = tarefaSelecionada; | ||
75 | }; | 126 | }; |
76 | 127 | ||
128 | + function _recuperarPermissoes(idAssignment){ | ||
129 | + $scope.assignments[0].$checked = true; | ||
130 | + BusinessProcessRepository.getPermissions({id: idAssignment}).then(function(result) { | ||
131 | + $scope.workItem = result.originalElement; | ||
132 | + vincularWorkItemAssignments(); | ||
133 | + $scope.btnAction = !(!$scope.workItem.execute && !$scope.workItem.suspend && !$scope.workItem.delegate && !$scope.workItem.restart && !$scope.workItem.visualize); | ||
134 | + $scope.modelSelecionado.$expandido = !$scope.modelSelecionado.$expandido; | ||
135 | + }); | ||
136 | + }; | ||
137 | + | ||
138 | + function vincularWorkItemAssignments(){ | ||
139 | + $scope.assignments.forEach(function(assignments){ | ||
140 | + assignments.workItem = $scope.workItem; | ||
141 | + }); | ||
142 | + }; | ||
143 | + | ||
144 | + $scope.executarTarefa = function(){ | ||
145 | + if($scope.workItem){ | ||
146 | + var pagina = '/cit-esi-web/assets/js/angular/custom/directive/html/userTask.html'; | ||
147 | + if ($scope.workItem.flowElement.userInterface && $scope.workItem.flowElement.userInterface.executeCustomPage) { | ||
148 | + pagina = $scope.workItem.flowElement.userInterface.URLCustomPage; | ||
149 | + _abrirPaginaTarefa(pagina); | ||
150 | + }else if ($scope.workItem.flowElement.userInterface && $scope.workItem.flowElement.userInterface.resource && $scope.workItem.flowElement.userInterface.resourceName) { | ||
151 | + FormBuilderRepository.getByName($scope.workItem.flowElement.userInterface.resourceName).then(function(result) { | ||
152 | + pagina = '/cit-esi-web/forms/'+result.originalElement.path+'/'+result.originalElement.resource.name+"_task.html"; | ||
153 | + _abrirPaginaTarefa(pagina); | ||
154 | + }); | ||
155 | + }else{ | ||
156 | + _abrirPaginaTarefa(pagina); | ||
157 | + } | ||
158 | + } | ||
159 | + }; | ||
160 | + | ||
161 | + function _abrirPaginaTarefa(pagina){ | ||
162 | + if (appService.existsWorkspace(pagina)) { | ||
163 | + $scope.showAlert('warning', $translate.instant('ESI.MSG.JA_EXISTE_TELA_TAREFA')); | ||
164 | + return ; | ||
165 | + } | ||
166 | + | ||
167 | + $scope.processInstance = $scope.workItem.processInstance; | ||
168 | + $scope.processInstance.collapsed = true; | ||
169 | + $scope.processInstance.collapsedError = true; | ||
170 | + | ||
171 | + $rootScope.task = $scope.workItem; | ||
172 | + $rootScope.processInstance = $scope.processInstance; | ||
173 | + $rootScope.controllerScope = $scope; | ||
174 | + | ||
175 | + var nome = $scope.task.flowElement.description; | ||
176 | + if (!nome || nome == '') | ||
177 | + nome = $scope.workItem.flowElement.name; | ||
178 | + | ||
179 | + $scope.addNewWorkspace($translate.instant('ESI.PERMISSAO.EXECUTAR')+" "+$translate.instant('ESI.TAREFA').toLowerCase()+" '"+nome+"'", pagina, true, 'mod-red-dark', $scope.workItem); | ||
180 | + }; | ||
181 | + | ||
182 | + carregarDominiosStatusProcesso(); | ||
77 | }]); | 183 | }]); |
78 | \ No newline at end of file | 184 | \ No newline at end of file |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/gerenciarProcessoListUnidade.html
@@ -3,6 +3,11 @@ | @@ -3,6 +3,11 @@ | ||
3 | <div class="bar-buttons-action fixed"> | 3 | <div class="bar-buttons-action fixed"> |
4 | <div class="row"> | 4 | <div class="row"> |
5 | <div class="col-sm-9 text-left"> | 5 | <div class="col-sm-9 text-left"> |
6 | + <button class="btn btn-clear" title="{{$translate.instant('ECM.LABEL.NOVOPROCESSO')}}" alt="{{$translate.instant('ECM.LABEL.NOVOPROCESSO')}}" | ||
7 | + ng-click="abrirNovoProcesso();"> | ||
8 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
9 | + <translate>ECM.LABEL.NOVOPROCESSO</translate> | ||
10 | + </button> | ||
6 | <button class="btn btn-clear" title="{{$translate.instant('LABEL.ATUALIZAR')}}" alt="{{$translate.instant('LABEL.ATUALIZAR')}}" ng-click="atualizarGrid();"> | 11 | <button class="btn btn-clear" title="{{$translate.instant('LABEL.ATUALIZAR')}}" alt="{{$translate.instant('LABEL.ATUALIZAR')}}" ng-click="atualizarGrid();"> |
7 | <i class="fa fa-refresh purple"></i> | 12 | <i class="fa fa-refresh purple"></i> |
8 | <translate>LABEL.ATUALIZAR</translate> | 13 | <translate>LABEL.ATUALIZAR</translate> |
@@ -17,8 +22,8 @@ | @@ -17,8 +22,8 @@ | ||
17 | 22 | ||
18 | <breadcrumb ng-workspace="workspace"></breadcrumb> | 23 | <breadcrumb ng-workspace="workspace"></breadcrumb> |
19 | 24 | ||
20 | - <list-view ng-lista="processos" ng-repository="UnidadeProcessoRepository" ng-headers="headers" ng-filter-criteria="filterCriteria" | ||
21 | - ng-exibir-coluna-selecao="false" transclude="tarefasPorProcesso.html" ng-model-parent="modelSelecionado" ng-custom-transclude="obterTransclude()"> | 25 | + <list-view ng-lista="processos" ng-repository="UnidadeProcessoRepository" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="tarefa" |
26 | + ng-exibir-coluna-selecao="false" transclude="tarefasPorProcesso.html" ng-custom-transclude="obterTransclude()" ng-model-parent="modelSelecionado"> | ||
22 | <div ng-include src="'/cit-ecm-web/html/gerenciarProcesso/tarefasPorProcesso.html'"></div> | 27 | <div ng-include src="'/cit-ecm-web/html/gerenciarProcesso/tarefasPorProcesso.html'"></div> |
23 | </list-view> | 28 | </list-view> |
24 | </div> | 29 | </div> |
25 | \ No newline at end of file | 30 | \ No newline at end of file |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/tarefasPorProcesso.html
1 | 1 | ||
2 | -<fieldset style="margin-left: 5%; width: 90%"> | 2 | +<fieldset style="margin-left: 5%; width: 90%" ng-if="modelSelecionado.$expandido"> |
3 | 3 | ||
4 | <legend> | 4 | <legend> |
5 | - <div class="pull-left"> | 5 | + <div class="pull-left" style="font-size : 14px; !important"> |
6 | + {{modelSelecionado['processo.assunto']['assunto']}} | ||
6 | </div> | 7 | </div> |
7 | - <div class="pull-right"> | ||
8 | - <translate>LABEL.DATA_DE_CRIACAO</translate>: {{modelSelecionado.processo.dataCriacao | filter : 'dateBR'}} | ||
9 | - <translate>LABEL.DATA_RECEBIMENTO</translate>: {{modelSelecionado.processo.dataReferencia}} | 8 | + <div class="pull-right" style="font-size : 12px; !important"> |
9 | + <div> | ||
10 | + <translate>LABEL.DATA_DE_CRIACAO</translate>: {{modelSelecionado['processo.dataCriacao'] | date : 'dd/MM/yyyy'}} | ||
11 | + <translate>LABEL.DATA_RECEBIMENTO</translate>: {{modelSelecionado['processo.dataReferencia'] | date : 'dd/MM/yyyy'}} | ||
12 | + </div> | ||
10 | </div> | 13 | </div> |
11 | </legend> | 14 | </legend> |
12 | 15 | ||
13 | <div class="row" style="margin-top: 6px; margin-bottom: -25px;"> | 16 | <div class="row" style="margin-top: 6px; margin-bottom: -25px;"> |
14 | <div class="panel panel-default"> | 17 | <div class="panel panel-default"> |
15 | - <div class="panel-heading clearfix"> | ||
16 | - <button class="btn btn-clear" title="{{$translate.instant('LABEL.EXECUTAR')}}" alt="{{$translate.instant('LABEL.EXECUTAR')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | 18 | + <div class="panel-heading clearfix" ng-if="btnAction"> |
19 | + <button class="btn btn-clear" title="{{$translate.instant('LABEL.EXECUTAR')}}" alt="{{$translate.instant('LABEL.EXECUTAR')}}" type="button" | ||
20 | + ng-click="executarTarefa();" > | ||
17 | <i class="fa fa-play-circle-o green"></i> | 21 | <i class="fa fa-play-circle-o green"></i> |
18 | <translate>LABEL.EXECUTAR</translate> | 22 | <translate>LABEL.EXECUTAR</translate> |
19 | </button> | 23 | </button> |
20 | - <button class="btn btn-clear" title="{{$translate.instant('PORTAL.LABEL.CAPTURAR')}}" alt="{{$translate.instant('PORTAL.LABEL.CAPTURAR')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | ||
21 | - <i class="fa fa-thumb-tack orange"></i> | ||
22 | - <translate>PORTAL.LABEL.CAPTURAR</translate> | ||
23 | - </button> | ||
24 | - <button class="btn btn-clear" title="{{$translate.instant('ESI.PERMISSAO.DELEGAR')}}" alt="{{$translate.instant('ESI.PERMISSAO.DELEGAR')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | ||
25 | - <i class="fa fa-users blue"></i> | ||
26 | - <translate>ESI.PERMISSAO.DELEGAR</translate> | ||
27 | - </button> | ||
28 | - <button class="btn btn-clear" title="{{$translate.instant('ESI.PERMISSAO.SUSPENDER')}}" alt="{{$translate.instant('ESI.PERMISSAO.SUSPENDER')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | 24 | + <button class="btn btn-clear" title="{{$translate.instant('ECM.LABEL.SOBRESTAR_SEM')}}" alt="{{$translate.instant('ECM.LABEL.SOBRESTAR_SEM')}}" type="button" |
25 | + ng-click="" > | ||
29 | <i class="fa fa-pause red"></i> | 26 | <i class="fa fa-pause red"></i> |
30 | - <translate>ESI.PERMISSAO.SUSPENDER</translate> | 27 | + <translate>ECM.LABEL.SOBRESTAR_SEM</translate> |
31 | </button> | 28 | </button> |
32 | - <button class="btn btn-clear" title="{{$translate.instant('LABEL.REATIVAR')}}" alt="{{$translate.instant('LABEL.REATIVAR')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | 29 | + <button class="btn btn-clear" title="{{$translate.instant('LABEL.REATIVAR')}}" alt="{{$translate.instant('LABEL.REATIVAR')}}" type="button" |
30 | + ng-click="" > | ||
33 | <i class="fa fa-play green"></i> | 31 | <i class="fa fa-play green"></i> |
34 | <translate>LABEL.REATIVAR</translate> | 32 | <translate>LABEL.REATIVAR</translate> |
35 | </button> | 33 | </button> |
36 | - <button class="btn btn-clear" title="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" alt="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | 34 | + <button class="btn btn-clear" title="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" alt="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" type="button" |
35 | + ng-click="" > | ||
37 | <i class="fa fa-search blue"></i> | 36 | <i class="fa fa-search blue"></i> |
38 | <translate>PORTAL.LABEL.VISUALIZAR_FLUXO</translate> | 37 | <translate>PORTAL.LABEL.VISUALIZAR_FLUXO</translate> |
39 | </button> | 38 | </button> |
40 | - <button class="btn btn-clear" title="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" alt="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" type="button" ng-click="dadosBemPatrimonial.$showInconsistencias = false" > | 39 | + <button class="btn btn-clear" title="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" alt="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" type="button" |
40 | + ng-click="" > | ||
41 | <i class="fa fa-history yellow-dark"></i> | 41 | <i class="fa fa-history yellow-dark"></i> |
42 | <translate>ESI.LOG.CONSULTA_LOG</translate> | 42 | <translate>ESI.LOG.CONSULTA_LOG</translate> |
43 | </button> | 43 | </button> |
@@ -53,25 +53,38 @@ | @@ -53,25 +53,38 @@ | ||
53 | </tr> | 53 | </tr> |
54 | </thead> | 54 | </thead> |
55 | <tbody> | 55 | <tbody> |
56 | - <tr> | 56 | + <tr ng-repeat="assignment in assignments"> |
57 | <td class="text-center" style="width: 5%;"> | 57 | <td class="text-center" style="width: 5%;"> |
58 | - <input type="radio" name="modelChecked" ng-value="tarefa" ng-model="$parent.tarefaSelecionada" /> | 58 | + <input type="radio" name="modelChecked" ng-value="true" ng-model="$parent.tarefaSelecionada" ng-click="selecionarTarefa(assigment)"/> |
59 | </td> | 59 | </td> |
60 | <td class="text-center" style="width: 5%;"> | 60 | <td class="text-center" style="width: 5%;"> |
61 | - <span class="small green" >123456{{assignment.id}}</span> | 61 | + <span class="small green" >{{assignment.id}}</span> |
62 | </td> | 62 | </td> |
63 | <td> | 63 | <td> |
64 | - <span class="small green">cassimiro{{assignment.flowElement.name}}</span> | 64 | + <span class="small green">{{assignment.flowElement.name}}</span> |
65 | </td> | 65 | </td> |
66 | <td> | 66 | <td> |
67 | - <span class="small green">teste{{assignment.processInstance.businessProcess.description}}</span> | 67 | + <label ng-show="assignment.workItem.processInstance.status != 'SUSPENDED' && assignment.workItem.processInstance.flowStatus"> |
68 | + <span class="small badge black" style="background-color: {{assignment.workItem.processInstance.flowStatus.backgroundColor}} !important"> | ||
69 | + <b><font color="{{assignment.workItem.processInstance.flowStatus.textColor}}"> | ||
70 | + <translate>{{assignment.workItem.processInstance.flowStatus.name}}</translate> | ||
71 | + </b></font> | ||
72 | + </span> | ||
73 | + </label> | ||
74 | + <label ng-show="assignment.workItem.processInstance.status == 'SUSPENDED'"> | ||
75 | + <span class="small badge black" style="background-color: red !important"> | ||
76 | + <b><font color="white"> | ||
77 | + <translate>ESI.ENUMERADO.SITUACAO_INSTANCIA_SUSPENSA</translate> | ||
78 | + </b></font> | ||
79 | + </span> | ||
80 | + </label> | ||
68 | </td> | 81 | </td> |
69 | </tr> | 82 | </tr> |
70 | - <!-- <tr ng-show="totalItens <= 0"> --> | ||
71 | - <!-- <td colspan="9"> --> | ||
72 | - <!-- <strong><translate>MSG.NENHUM_REGISTRO_ENCONTRADO</translate></strong> --> | ||
73 | - <!-- </td> --> | ||
74 | - <!-- </tr> --> | 83 | + <tr ng-show="assignments <= 0"> |
84 | + <td colspan="{{modelSelecionado.colspanTransclude}}"> | ||
85 | + <strong><translate>ECM.MSG.NAO_EXISTE_TAREFA_EXECUTAR</translate></strong> | ||
86 | + </td> | ||
87 | + </tr> | ||
75 | </tbody> | 88 | </tbody> |
76 | </table> | 89 | </table> |
77 | 90 |