Commit fc775d747961e8e013a601550d817dafae90d114
1 parent
2e68dbe2
Exists in
master
[Redmine Atendimento #4281]Export csv
Showing
12 changed files
with
44 additions
and
7 deletions
Show diff stats
cit-contratos-web/src/main/java/br/com/centralit/listener/StartupListenerContratos.java
... | ... | @@ -984,6 +984,7 @@ public class StartupListenerContratos extends UtilStartup implements Application |
984 | 984 | |
985 | 985 | internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.TERMO_REFERENCIA_PROJETO_BASICO", "Termo de referência/Projeto Básico", dominio, modulo)); |
986 | 986 | internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.CONTRATO_SEM_VINCULO_TERMO", "Contrato selecionado está sem vínculo a um termo de referência.", dominio, modulo)); |
987 | + internacionalizacaoList.add(new Internacionalizacao("CONTRATOS.LABEL.ENCERRAMENTO_CONTRATO", "Encerramento de contrato", dominio, modulo)); | |
987 | 988 | } |
988 | 989 | |
989 | 990 | private void gerarMensagem(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { | ... | ... |
cit-contratos-web/src/main/webapp/assets/js/angular/custom/controller/ContratoListController.js
... | ... | @@ -10,10 +10,10 @@ citApp.controller('ContratoListController', ['$scope', 'ContratoRepository', 'Do |
10 | 10 | }; |
11 | 11 | |
12 | 12 | // DEFINE CABEÇALHOS DA LISTAGEM |
13 | - $scope.headers = [ { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'numeroAnoContrato', filter : 'maskContrato' } , | |
13 | + $scope.headers = [ { title : $translate.instant('LABEL.NUMERO_ANO_CONTRATO'), value : 'numeroAnoContrato', mask : [new RegExp(/(\d{3})(\d{1,4})$/), '$1/$2'] } , | |
14 | 14 | { title : $translate.instant('LABEL.TIPO_CONTRATO'), value : 'dominioTipoContrato.descricao' } , |
15 | - { title : $translate.instant('LABEL.DATA_VIGENCIA_INICIAL'), value : 'dataVigenciaInicial', filter : 'dateBR' }, | |
16 | - { title : $translate.instant('LABEL.DATA_VIGENCIA_FINAL'), value : 'dataVigenciaFinal', filter : 'dateBR' }, | |
15 | + { title : $translate.instant('LABEL.DATA_VIGENCIA_INICIAL'), value : 'dataVigenciaInicial', filter : 'dateBR' }, | |
16 | + { title : $translate.instant('LABEL.DATA_VIGENCIA_FINAL'), value : 'dataVigenciaFinal', filter : 'dateBR' }, | |
17 | 17 | { title : $translate.instant('LABEL.SITUACAO_ATUAL'), value : 'dominioSituacaoAtual.descricao' }]; |
18 | 18 | |
19 | 19 | // DIFINE FILTROS DE PESQUISA E CAMPOS QUE DEVEM SER APRESENTADOS NA LISTAGEM |
... | ... | @@ -33,7 +33,7 @@ citApp.controller('ContratoListController', ['$scope', 'ContratoRepository', 'Do |
33 | 33 | DominioRepository.findAllDominio('tipoContrato').then(function(result) { |
34 | 34 | $scope.filterCriteria.filters[1].listaDominio = result; |
35 | 35 | }); |
36 | - | |
36 | + | |
37 | 37 | DominioRepository.findAllDominio('tipoSituacaoContrato').then(function(result) { |
38 | 38 | $scope.filterCriteria.filters[4].listaDominio = result; |
39 | 39 | }); |
... | ... | @@ -52,7 +52,7 @@ citApp.controller('ContratoListController', ['$scope', 'ContratoRepository', 'Do |
52 | 52 | angular.element('#editContrato').scope().getContrato(contrato.id, edit); |
53 | 53 | $scope.$showPageEditWorkspace($scope.workspace); |
54 | 54 | }; |
55 | - | |
55 | + | |
56 | 56 | $scope.gerarRelatorioTermoContrato = function() { |
57 | 57 | |
58 | 58 | if(!$scope.contratoChecked){ |
... | ... | @@ -61,7 +61,7 @@ citApp.controller('ContratoListController', ['$scope', 'ContratoRepository', 'Do |
61 | 61 | $scope.url = '/cit-contratos-web/rest/contrato/gerarTermoContrato?idContrato='+ $scope.contratoChecked.id; |
62 | 62 | $scope.visualizarRelatorio($scope.url, $translate.instant("LABEL.TITULO_CONTRATO")); |
63 | 63 | } |
64 | - | |
64 | + | |
65 | 65 | }; |
66 | 66 | |
67 | 67 | }]); |
68 | 68 | \ No newline at end of file | ... | ... |
cit-contratos-web/src/main/webapp/html/contrato/contratoList.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <translate>LABEL.EDITAR</translate> |
19 | 19 | </button> |
20 | 20 | |
21 | - <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'ContratoRepository')" type="button"> | |
21 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'ContratoRepository', 'LABEL.CONTRATO')" type="button"> | |
22 | 22 | <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> |
23 | 23 | </button> |
24 | 24 | ... | ... |
cit-contratos-web/src/main/webapp/html/cronogramaExecucao/cronogramaExecucaoList.html
... | ... | @@ -28,6 +28,10 @@ |
28 | 28 | <i class="fa fa-print"></i> |
29 | 29 | <translate>CONTRATOS.LABEL.GERAR_CRONOGRAMA</translate> |
30 | 30 | </button> |
31 | + | |
32 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'CronogramaExecucaoRepository', 'CONTRATOS.LABEL.CRONOGRAMA_EXECUCAO')" type="button"> | |
33 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
34 | + </button> | |
31 | 35 | |
32 | 36 | <span class="divider-vertical"></span> |
33 | 37 | ... | ... |
cit-contratos-web/src/main/webapp/html/encerramentoContrato/encerramentoContratoList.html
... | ... | @@ -26,6 +26,10 @@ |
26 | 26 | <i class="fa fa-print"></i> |
27 | 27 | <translate>LABEL.GERAR_ENCERRAMENTO_CONTRATO</translate> |
28 | 28 | </button> |
29 | + | |
30 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'EncerramentoContratoRepository', 'CONTRATOS.LABEL.ENCERRAMENTO_CONTRATO')" type="button"> | |
31 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
32 | + </button> | |
29 | 33 | |
30 | 34 | <span class="divider-vertical"></span> |
31 | 35 | ... | ... |
cit-contratos-web/src/main/webapp/html/estudoTecnico/estudoTecnicoList.html
... | ... | @@ -23,6 +23,10 @@ |
23 | 23 | <translate>LABEL.REMOVER</translate> |
24 | 24 | </button> |
25 | 25 | |
26 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'EstudoTecnicoRepository', 'LABEL.ESTUDO_TECNICO')" type="button"> | |
27 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
28 | + </button> | |
29 | + | |
26 | 30 | <button |
27 | 31 | title="{{$translate.instant('CONTRATOS.LABEL.GERAR_ESTUDO_TECNICO')}}" |
28 | 32 | alt="{{$translate.instant('CONTRATOS.LABEL.GERAR_ESTUDO_TECNICO')}}" | ... | ... |
cit-contratos-web/src/main/webapp/html/notificacao/notificacaoContratoList.html
... | ... | @@ -31,6 +31,10 @@ |
31 | 31 | <i class="fa fa-print"></i> |
32 | 32 | <translate>NOTIFICACAO_CONTRATO.GERAR_NOTIFICACAO_RELATORIO</translate> |
33 | 33 | </button> |
34 | + | |
35 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'NotificacaoContratoRepository', 'LABEL.NOTIFICACOES')" type="button"> | |
36 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
37 | + </button> | |
34 | 38 | |
35 | 39 | <span class="divider-vertical"></span> |
36 | 40 | ... | ... |
cit-contratos-web/src/main/webapp/html/ordemFornecimento/ordemFornecimentoList.html
... | ... | @@ -26,6 +26,10 @@ |
26 | 26 | <i class="fa fa-print"></i> |
27 | 27 | <translate>LABEL.GERAR_ORDEM_FORNECIMENTO</translate> |
28 | 28 | </button> |
29 | + | |
30 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'OrdemFornecimentoRepository', 'LABEL.TITULO_ORDEM_FORNECIMENTO')" type="button"> | |
31 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
32 | + </button> | |
29 | 33 | |
30 | 34 | <span class="divider-vertical"></span> |
31 | 35 | ... | ... |
cit-contratos-web/src/main/webapp/html/programa/programaList.html
... | ... | @@ -22,6 +22,10 @@ |
22 | 22 | <i class="fa fa-times red"></i> |
23 | 23 | <translate>LABEL.REMOVER</translate> |
24 | 24 | </button> |
25 | + | |
26 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'ProgramaRepository', 'LABEL.PROGRAMA')" type="button"> | |
27 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
28 | + </button> | |
25 | 29 | |
26 | 30 | <span class="divider-vertical"></span> |
27 | 31 | ... | ... |
cit-contratos-web/src/main/webapp/html/questionario/questionarioList.html
... | ... | @@ -23,6 +23,10 @@ |
23 | 23 | <translate>LABEL.REMOVER</translate> |
24 | 24 | </button> |
25 | 25 | |
26 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'QuestionarioRepository', 'LABEL.QUESTIONARIO')" type="button"> | |
27 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
28 | + </button> | |
29 | + | |
26 | 30 | <span class="divider-vertical"></span> |
27 | 31 | |
28 | 32 | <div class="btn-group dropdown" role="group" dropdown> | ... | ... |
cit-contratos-web/src/main/webapp/html/registroOcorrencias/registroOcorrenciasList.html
... | ... | @@ -29,6 +29,10 @@ |
29 | 29 | <translate>LABEL.GERAR_REGISTRO_OCORRENCIA</translate> |
30 | 30 | </button> |
31 | 31 | |
32 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'RegistroOcorrenciaRepository', 'LABEL.TITULO_REGISTRO_OCORRENCIA')" type="button"> | |
33 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
34 | + </button> | |
35 | + | |
32 | 36 | <span class="divider-vertical"></span> |
33 | 37 | |
34 | 38 | <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> | ... | ... |
cit-contratos-web/src/main/webapp/html/termoReferencia/termoReferenciaList.html
... | ... | @@ -26,6 +26,10 @@ |
26 | 26 | <translate>LABEL.REMOVER</translate> |
27 | 27 | </button> |
28 | 28 | |
29 | + <button class="btn btn-clear" ng-click="exportarCSV(filterCriteria, headers, 'TermoReferenciaRepository', 'CONTRATOS.LABEL.TERMO_REFERENCIA_PROJETO_BASICO')" type="button"> | |
30 | + <i class="fa fa-file-excel-o"></i> <translate>LABEL.EXPORTAR_CSV</translate> | |
31 | + </button> | |
32 | + | |
29 | 33 | <button |
30 | 34 | title="{{$translate.instant('LABEL.GERAR_TERMO_REFERENCIA')}}" |
31 | 35 | alt="{{$translate.instant('LABEL.GERAR_TERMO_REFERENCIA')}}" | ... | ... |