From 47ac689ce501d3aa592ee5ab9f3fc68ed896b363 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Tue, 27 Sep 2022 15:37:16 -0300 Subject: [PATCH 01/80] =?UTF-8?q?HOT-FIX:=20corrige=20chamada=20de=20met?= =?UTF-8?q?=C3=B3do=20est=C3=A1tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/api/views_materia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/api/views_materia.py b/sapl/api/views_materia.py index 8c5515d88..d37658afa 100644 --- a/sapl/api/views_materia.py +++ b/sapl/api/views_materia.py @@ -100,7 +100,7 @@ class _MateriaLegislativaViewSet: ultima_tramitacao = materia.tramitacao_set.order_by( '-data_tramitacao', '-id').first() - serializer_class = MateriaApiViewSetConstrutor.get_viewset_for_model( + serializer_class = ApiViewSetConstrutor.get_viewset_for_model( Tramitacao).serializer_class(ultima_tramitacao) return Response(serializer_class.data) From 86379e077748a3c9ec4730bfd122064c7a73451b Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Thu, 29 Sep 2022 09:36:03 -0300 Subject: [PATCH 02/80] =?UTF-8?q?Feat:=20Ajuste=20de=20mensagem=20de=20err?= =?UTF-8?q?o=20de=20n=C3=BAmero=20de=20sess=C3=A3o=20plen=C3=A1ria=20exist?= =?UTF-8?q?ente=20(#3610)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: joao --- sapl/sessao/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py index 27ea9675b..73ac911f0 100644 --- a/sapl/sessao/forms.py +++ b/sapl/sessao/forms.py @@ -71,9 +71,9 @@ class SessaoPlenariaForm(FileFieldCheckMixin, ModelForm): encerramento = self.cleaned_data['data_fim'] error = ValidationError( - "Número de Sessão Plenária já existente " - "para a Legislatura, Sessão Legislativa e Tipo informados. " - "Favor escolher um número distinto.") + "Número de Sessão Plenária '" + str(num) + "' já existente " + "para o Tipo de Sessão " + str(tipo) + " da " + str(sl) + + " Sessão Legislativa da " + str(leg) + " Legislatura. Por Favor, escolha um número distinto.") qs = tipo.build_predicados_queryset(leg, sl, abertura) qs &= Q(numero=num) From 391a19deaf36675450a5af9070d8bdfc26564d78 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 29 Sep 2022 10:44:44 -0300 Subject: [PATCH 03/80] =?UTF-8?q?refactor:=20relat=C3=B3rio=20de=20estat?= =?UTF-8?q?=C3=ADstica=20de=20normas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/forms.py | 2 ++ sapl/base/views.py | 6 ++++++ .../base/EstatisticasAcessoNormas_filter.html | 13 +++++++++++-- .../relatorio_estatisticas_acesso_normas.html | 7 ++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/sapl/base/forms.py b/sapl/base/forms.py index a0a88ac10..ca9083d98 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -946,6 +946,8 @@ class EstatisticasAcessoNormasForm(Form): (10, '010 mais acessadas'), (50, '050 mais acessadas'), (100, '100 mais acessadas'), + (500, '500 mais acessadas'), + (1000, '1000 mais acessadas'), ], initial=5) diff --git a/sapl/base/views.py b/sapl/base/views.py index 035951e40..2c549f355 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -1219,6 +1219,7 @@ class EstatisticasAcessoNormas(TemplateView): **params ) + normas_count_mes = collections.OrderedDict() normas_mes = collections.OrderedDict() meses = {1: 'Janeiro', 2: 'Fevereiro', 3: 'Março', 4: 'Abril', 5: 'Maio', 6: 'Junho', 7: 'Julho', 8: 'Agosto', 9: 'Setembro', 10: 'Outubro', 11: 'Novembro', 12: 'Dezembro'} @@ -1226,10 +1227,15 @@ class EstatisticasAcessoNormas(TemplateView): for norma in estatisticas: if not meses[norma.mes_est] in normas_mes: normas_mes[meses[norma.mes_est]] = [] + normas_count_mes[meses[norma.mes_est]] = 0 + + normas_count_mes[meses[norma.mes_est]] += norma.norma_count normas_mes[meses[norma.mes_est]].append(norma) context['normas_mes'] = normas_mes + context['normas_count_mes'] = normas_count_mes + is_relatorio = request.GET.get('relatorio') context['show_results'] = show_results_filter_set( diff --git a/sapl/templates/base/EstatisticasAcessoNormas_filter.html b/sapl/templates/base/EstatisticasAcessoNormas_filter.html index 85348960a..9769d937f 100644 --- a/sapl/templates/base/EstatisticasAcessoNormas_filter.html +++ b/sapl/templates/base/EstatisticasAcessoNormas_filter.html @@ -1,6 +1,6 @@ {% extends "crud/list.html" %} {% load i18n %} -{% load crispy_forms_tags %} +{% load crispy_forms_tags common_tags %} {% block base_content %} {% if not ano %} @@ -22,7 +22,12 @@ - + @@ -70,9 +75,13 @@ $('#id_mais_acessadas').val('5') $('#id_mais_acessadas')[0].options[2].setAttribute('disabled', true) $('#id_mais_acessadas')[0].options[3].setAttribute('disabled', true) + $('#id_mais_acessadas')[0].options[4].setAttribute('disabled', true) + $('#id_mais_acessadas')[0].options[5].setAttribute('disabled', true) } else { $('#id_mais_acessadas')[0].options[2].removeAttribute('disabled') $('#id_mais_acessadas')[0].options[3].removeAttribute('disabled') + $('#id_mais_acessadas')[0].options[4].removeAttribute('disabled') + $('#id_mais_acessadas')[0].options[5].removeAttribute('disabled') } //$('#id_mais_acessadas').prop('disabled', event.currentTarget.selectedOptions[0].value === '') diff --git a/sapl/templates/relatorios/relatorio_estatisticas_acesso_normas.html b/sapl/templates/relatorios/relatorio_estatisticas_acesso_normas.html index 4af79cfb8..2916342e2 100644 --- a/sapl/templates/relatorios/relatorio_estatisticas_acesso_normas.html +++ b/sapl/templates/relatorios/relatorio_estatisticas_acesso_normas.html @@ -44,7 +44,12 @@

Mês: {{ mes }}

+

Mês: {{ mes }}

+
+
Um total de acessos {{normas_count_mes|lookup:mes}} nas {{normas|length}} mais acessadas.
+
+
Posição
- + From 2c6001b5db0c8309986665e38cf7494de545825d Mon Sep 17 00:00:00 2001 From: Angelo Marcondes de Oliveira Neto Date: Mon, 3 Oct 2022 16:38:59 -0300 Subject: [PATCH 04/80] Update README.rst (#3612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A sala do discord de SAPL do discord "Somos interlegis", tem por objetivo prover suporte aos utilizadores do SAPL para solução de problemas variados do sistema. --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index b7ead05d1..dccd15e36 100644 --- a/README.rst +++ b/README.rst @@ -71,6 +71,9 @@ Orientações gerais sobre o GitHub =================================== `Instruções para GitHub `_ +Suporte ao utilizadores +=================================== + `Sala do Discord "Somos Interlegis" sobre SAPL `_ Perguntas Frequentes From ee519cfdb384278a26a35941d24d08205a75285f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LeandroJata=C3=AD?= Date: Mon, 3 Oct 2022 19:59:01 -0300 Subject: [PATCH 05/80] fix: corrige link para discord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit o Link anterior tinha tempo de expiração --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index dccd15e36..5481ba985 100644 --- a/README.rst +++ b/README.rst @@ -73,7 +73,7 @@ Orientações gerais sobre o GitHub Suporte ao utilizadores =================================== - `Sala do Discord "Somos Interlegis" sobre SAPL `_ + `Sala do Discord "Somos Interlegis" sobre SAPL `_ Perguntas Frequentes From b4bb25ac6cee050ef3e5873d70abe0ae2dedc933 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Tue, 4 Oct 2022 22:51:29 -0300 Subject: [PATCH 06/80] feat: ajusta carga de lookup e add END em icontains de texto --- drfautoapi/drfautoapi.py | 57 +++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/drfautoapi/drfautoapi.py b/drfautoapi/drfautoapi.py index 5d1518d06..e0fd0c348 100644 --- a/drfautoapi/drfautoapi.py +++ b/drfautoapi/drfautoapi.py @@ -2,17 +2,19 @@ from collections import OrderedDict import importlib import inspect import logging +import re from django.apps.config import AppConfig from django.apps.registry import apps from django.conf import settings from django.contrib.postgres.fields.jsonb import JSONField from django.db.models.base import ModelBase +from django.db.models.fields import TextField, CharField from django.db.models.fields.files import FileField from django.template.defaultfilters import capfirst from django.utils.translation import ugettext_lazy as _ import django_filters -from django_filters.constants import ALL_FIELDS +from django_filters.constants import ALL_FIELDS, EMPTY_VALUES from django_filters.filters import CharFilter from django_filters.filterset import FilterSet from django_filters.rest_framework.backends import DjangoFilterBackend @@ -26,6 +28,43 @@ from rest_framework.viewsets import ModelViewSet logger = logging.getLogger(__name__) +class SplitStringCharFilter(django_filters.CharFilter): + _re = re.compile(r'("[^"]+"| +|[^"]+)') + + def filter(self, qs, value): + if value in EMPTY_VALUES: + return qs + if self.distinct: + qs = qs.distinct() + lookup = '%s__%s' % (self.field_name, self.lookup_expr) + + values = [value] + if self.lookup_expr == 'icontains': + if not '"' in value: + values = value.split(' ') + else: + values = list( + filter( + lambda x: x and x != ' ' and x[0] != '"', + self._re.findall(value) + ) + ) + list( + map( + lambda x: x[1:-1], + filter( + lambda x: x and x[0] == '"', + self._re.findall(value) + ) + ) + ) + + if not isinstance(values, list): + values = [values] + for v in values: + qs = self.get_method(qs)(**{lookup: v}) + return qs + + class ApiFilterSetMixin(FilterSet): o = CharFilter(method='filter_o') @@ -39,6 +78,12 @@ class ApiFilterSetMixin(FilterSet): 'lookup_expr': 'exact', }, }, + CharField: { + 'filter_class': SplitStringCharFilter, + }, + TextField: { + 'filter_class': SplitStringCharFilter, + }, JSONField: { 'filter_class': django_filters.CharFilter, 'extra': lambda f: { @@ -81,16 +126,16 @@ class ApiFilterSetMixin(FilterSet): r = [] for lk, lv in cl.items(): - if lk == 'contained_by': + if lk in ('contained_by', 'trigram_similar', 'unaccent', 'search'): continue sflk = f'{sub_f}{"__" if sub_f else ""}{lk}' r.append(sflk) - if hasattr(lv, 'class_lookups'): - r += get_keys_lookups(lv.class_lookups, sflk) + if hasattr(lv, 'get_lookups'): + r += get_keys_lookups(lv.get_lookups(), sflk) - if hasattr(lv, 'output_field') and hasattr(lv, 'output_field.class_lookups'): + if hasattr(lv, 'output_field') and hasattr(lv, 'output_field.get_lookups'): r.append(f'{sflk}{"__" if sflk else ""}range') r += get_keys_lookups(lv.output_field.class_lookups, sflk) @@ -98,7 +143,7 @@ class ApiFilterSetMixin(FilterSet): return r fields[f_str] = list( - set(fields[f_str] + get_keys_lookups(f.class_lookups, ''))) + set(fields[f_str] + get_keys_lookups(f.get_lookups(), ''))) # Remove excluded fields exclude = exclude or [] From 930c89979e3ee8bdef22320d64e631d3df21d8d1 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Mon, 10 Oct 2022 14:43:01 -0300 Subject: [PATCH 07/80] =?UTF-8?q?feat:=20add=20edi=C3=A7=C3=A3o=20de=20par?= =?UTF-8?q?te=20de=20tipo=20de=20dispositivos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/compilacao/urls.py | 4 ++ sapl/compilacao/views.py | 31 +++++++++++++++- sapl/rules/group_geral.py | 2 +- sapl/templates/compilacao/layouts.yaml | 41 ++++++++++++++------- sapl/templates/menu_tabelas_auxiliares.yaml | 3 ++ 5 files changed, 64 insertions(+), 17 deletions(-) diff --git a/sapl/compilacao/urls.py b/sapl/compilacao/urls.py index 9364985aa..7ca2ad463 100644 --- a/sapl/compilacao/urls.py +++ b/sapl/compilacao/urls.py @@ -116,5 +116,9 @@ urlpatterns = [ include(VeiculoPublicacaoCrud.get_urls())), url(r'^sistema/ta/config/tipo/', include(TipoTextoArticuladoCrud.get_urls())), + url(r'^sistema/ta/config/tipodispositivo/', + include(TipoDispositivoCrud.get_urls())), + + ] diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index c6939a5fe..931db7cfd 100644 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -59,8 +59,35 @@ TipoNotaCrud = CrudAux.build(TipoNota, 'tipo_nota') TipoVideCrud = CrudAux.build(TipoVide, 'tipo_vide') TipoPublicacaoCrud = CrudAux.build(TipoPublicacao, 'tipo_publicacao') VeiculoPublicacaoCrud = CrudAux.build(VeiculoPublicacao, 'veiculo_publicacao') -TipoDispositivoCrud = CrudAux.build( - TipoDispositivo, 'tipo_dispositivo') + + +class TipoDispositivoCrud(CrudAux): + model = TipoDispositivo + + class BaseMixin(CrudAux.BaseMixin): + list_field_names = ('nome', ) + + @property + def delete_url(self): + return '' + + @property + def create_url(self): + return '' + + class CreateView(CrudAux.CreateView): + def has_permission(self): + return False + + class DeleteView(CrudAux.DeleteView): + def has_permission(self): + return False + + class UpdateView(CrudAux.UpdateView): + layout_key = 'TipoDispositivoUpdate' + + class ListView(CrudAux.ListView): + paginate_by = 100 def choice_models_in_extenal_views(): diff --git a/sapl/rules/group_geral.py b/sapl/rules/group_geral.py index 5e9545d7b..d12b94152 100644 --- a/sapl/rules/group_geral.py +++ b/sapl/rules/group_geral.py @@ -110,7 +110,7 @@ rules_group_geral = { __base__ + ['lock_unlock_textoarticulado'], set()), # estes tres models são complexos e a principio apenas o admin tem perm - (compilacao.TipoDispositivo, [], set()), + (compilacao.TipoDispositivo, __listdetailchange__, __perms_publicas__), (compilacao.TipoDispositivoRelationship, [], set()), (compilacao.PerfilEstruturalTextoArticulado, [], set()), diff --git a/sapl/templates/compilacao/layouts.yaml b/sapl/templates/compilacao/layouts.yaml index a92c8627b..3ceba4988 100644 --- a/sapl/templates/compilacao/layouts.yaml +++ b/sapl/templates/compilacao/layouts.yaml @@ -21,24 +21,37 @@ PerfilEstruturalTextoArticulado: - sigla:2 nome TipoDispositivo: - {% trans 'Dados Básicos' %}: - - nome:8 class_css - {% trans 'Configurações para Edição do Rótulo' %}: - - rotulo_prefixo_texto rotulo_sufixo_texto rotulo_ordinal contagem_continua + {% trans 'Dados Básicos Fixos' %}: + - nome class_css:2 dispositivo_de_articulacao:4 dispositivo_de_alteracao + - contagem_continua:2 rotulo_prefixo_texto:3 rotulo_ordinal:4 rotulo_sufixo_texto {% trans 'Configurações para Renderização de Rótulo e Texto' %}: - - rotulo_prefixo_html rotulo_sufixo_html - - texto_prefixo_html dispositivo_de_articulacao dispositivo_de_alteracao texto_sufixo_html + - rotulo_prefixo_html rotulo_sufixo_html + - texto_prefixo_html texto_sufixo_html {% trans 'Configurações para Nota Automática' %}: - - nota_automatica_prefixo_html nota_automatica_sufixo_html + - nota_automatica_prefixo_html nota_automatica_sufixo_html {% trans 'Configurações para Variações Numéricas' %}: - formato_variacao0 - - rotulo_separador_variacao01:5 formato_variacao1 - - rotulo_separador_variacao12:5 formato_variacao2 - - rotulo_separador_variacao23:5 formato_variacao3 - - rotulo_separador_variacao34:5 formato_variacao4 - - rotulo_separador_variacao45:5 formato_variacao5 - - + - rotulo_separador_variacao01:5 formato_variacao1 + - rotulo_separador_variacao12:5 formato_variacao2 + - rotulo_separador_variacao23:5 formato_variacao3 + - rotulo_separador_variacao34:5 formato_variacao4 + - rotulo_separador_variacao45:5 formato_variacao5 + +TipoDispositivoUpdate: + {% trans 'Configurações para Variações Numéricas' %}: + - rotulo_ordinal formato_variacao0 + - rotulo_separador_variacao01:5 formato_variacao1 + - rotulo_separador_variacao12:5 formato_variacao2 + - rotulo_separador_variacao23:5 formato_variacao3 + - rotulo_separador_variacao34:5 formato_variacao4 + - rotulo_separador_variacao45:5 formato_variacao5 + + {% trans 'Configurações para Renderização de Rótulo e Texto' %}: + - rotulo_prefixo_html rotulo_sufixo_html + - texto_prefixo_html texto_sufixo_html + {% trans 'Configurações para Nota Automática' %}: + - nota_automatica_prefixo_html nota_automatica_sufixo_html + TipoTextoArticulado: {% trans 'Identificação Básica' %}: - sigla:3 descricao:5 content_type:4 diff --git a/sapl/templates/menu_tabelas_auxiliares.yaml b/sapl/templates/menu_tabelas_auxiliares.yaml index 7241509cb..cf64082a1 100644 --- a/sapl/templates/menu_tabelas_auxiliares.yaml +++ b/sapl/templates/menu_tabelas_auxiliares.yaml @@ -208,6 +208,9 @@ - title: {% trans 'Tipos de Vides' %} url: sapl.compilacao:tipovide_list css_class: btn btn-link + - title: {% trans 'Tipos de Dispositivos' %} + url: sapl.compilacao:tipodispositivo_list + css_class: btn btn-link - title: {% trans 'Módulo LexML' %} css_class: head_title children: From b128f20b1eb1281acd467641de2dba50cd6c679c Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 13 Oct 2022 14:47:13 -0300 Subject: [PATCH 08/80] feat: remove html do ctrl-v no tinymce de expedientes --- frontend/src/__global/js/tinymce/index.js | 3 ++- sapl/templates/sessao/expediente.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/__global/js/tinymce/index.js b/frontend/src/__global/js/tinymce/index.js index bfb854396..99f94c14e 100644 --- a/frontend/src/__global/js/tinymce/index.js +++ b/frontend/src/__global/js/tinymce/index.js @@ -14,12 +14,13 @@ import 'tinymce/plugins/table' import './langs/pt_BR.js' window.tinymce = tinymce -window.initTextRichEditor = function (elements, readonly = false) { +window.initTextRichEditor = function (elements, readonly = false, paste_as_text = false) { const configTinymce = { selector: elements === null || elements === undefined ? 'textarea' : elements, language: 'pt_BR', branding: false, forced_root_block: 'p', + paste_as_text, plugins: 'table lists advlist link code', toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | code', menubar: 'file edit view insert format table' diff --git a/sapl/templates/sessao/expediente.html b/sapl/templates/sessao/expediente.html index c44e3ebe7..5cc4fff62 100644 --- a/sapl/templates/sessao/expediente.html +++ b/sapl/templates/sessao/expediente.html @@ -49,7 +49,7 @@ {% block extra_js %} {% if perms|get_add_perm:view %} {% else %} From 770f4b5c521348a3309432abe441a978b4ceb854 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 13 Oct 2022 14:48:23 -0300 Subject: [PATCH 09/80] rebuild frontend --- frontend/webpack-stats.json | 496 +++++++++--------- .../sapl/frontend/js/global.e8c9c610.js.gz | Bin 14070 -> 0 bytes ...{global.e8c9c610.js => global.f01dd32a.js} | 4 +- ...NSE.txt => global.f01dd32a.js.LICENSE.txt} | 0 .../sapl/frontend/js/global.f01dd32a.js.gz | Bin 0 -> 14090 bytes 5 files changed, 250 insertions(+), 250 deletions(-) delete mode 100644 sapl/static/sapl/frontend/js/global.e8c9c610.js.gz rename sapl/static/sapl/frontend/js/{global.e8c9c610.js => global.f01dd32a.js} (93%) rename sapl/static/sapl/frontend/js/{global.e8c9c610.js.LICENSE.txt => global.f01dd32a.js.LICENSE.txt} (100%) create mode 100644 sapl/static/sapl/frontend/js/global.f01dd32a.js.gz diff --git a/frontend/webpack-stats.json b/frontend/webpack-stats.json index 94e46cd84..058d04525 100644 --- a/frontend/webpack-stats.json +++ b/frontend/webpack-stats.json @@ -11,6 +11,11 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-brands-400.86c7e1fa.woff2", "publicPath": "/static/sapl/frontend/fonts/fa-brands-400.86c7e1fa.woff2" }, + "fonts/fa-solid-900.64d5644d.woff2": { + "name": "fonts/fa-solid-900.64d5644d.woff2", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2", + "publicPath": "/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2" + }, "fonts/fa-regular-400.e0550912.woff2": { "name": "fonts/fa-regular-400.e0550912.woff2", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-regular-400.e0550912.woff2", @@ -21,11 +26,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf", "publicPath": "/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf" }, - "fonts/fa-solid-900.64d5644d.woff2": { - "name": "fonts/fa-solid-900.64d5644d.woff2", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2", - "publicPath": "/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2" - }, "fonts/fa-solid-900.f418d876.ttf": { "name": "fonts/fa-solid-900.f418d876.ttf", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.f418d876.ttf", @@ -41,10 +41,10 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/global.45591136.css", "publicPath": "/static/sapl/frontend/css/global.45591136.css" }, - "js/global.e8c9c610.js": { - "name": "js/global.e8c9c610.js", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.e8c9c610.js", - "publicPath": "/static/sapl/frontend/js/global.e8c9c610.js" + "js/global.f01dd32a.js": { + "name": "js/global.f01dd32a.js", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js", + "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js" }, "css/parlamentar.cd5dc5a8.css": { "name": "css/parlamentar.cd5dc5a8.css", @@ -86,171 +86,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js", "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js" }, - "audio/ring.mp3": { - "name": "audio/ring.mp3", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/audio/ring.mp3", - "publicPath": "/static/sapl/frontend/audio/ring.mp3" - }, - "img/arrow.png": { - "name": "img/arrow.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/arrow.png", - "publicPath": "/static/sapl/frontend/img/arrow.png" - }, - "img/authenticated.png": { - "name": "img/authenticated.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/authenticated.png", - "publicPath": "/static/sapl/frontend/img/authenticated.png" - }, - "img/avatar.png": { - "name": "img/avatar.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/avatar.png", - "publicPath": "/static/sapl/frontend/img/avatar.png" - }, - "img/beta.png": { - "name": "img/beta.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/beta.png", - "publicPath": "/static/sapl/frontend/img/beta.png" - }, - "img/bg.png": { - "name": "img/bg.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/bg.png", - "publicPath": "/static/sapl/frontend/img/bg.png" - }, - "img/brasao_transp.gif": { - "name": "img/brasao_transp.gif", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/brasao_transp.gif", - "publicPath": "/static/sapl/frontend/img/brasao_transp.gif" - }, - "img/down_arrow_select.jpg": { - "name": "img/down_arrow_select.jpg", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg", - "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg" - }, - "img/etiqueta.png": { - "name": "img/etiqueta.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/etiqueta.png", - "publicPath": "/static/sapl/frontend/img/etiqueta.png" - }, - "img/favicon.ico": { - "name": "img/favicon.ico", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/favicon.ico", - "publicPath": "/static/sapl/frontend/img/favicon.ico" - }, - "img/file.png": { - "name": "img/file.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/file.png", - "publicPath": "/static/sapl/frontend/img/file.png" - }, - "img/hand-note.png": { - "name": "img/hand-note.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/hand-note.png", - "publicPath": "/static/sapl/frontend/img/hand-note.png" - }, - "img/icon_comissoes.png": { - "name": "img/icon_comissoes.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_comissoes.png", - "publicPath": "/static/sapl/frontend/img/icon_comissoes.png" - }, - "img/icon_delete_white.png": { - "name": "img/icon_delete_white.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_delete_white.png", - "publicPath": "/static/sapl/frontend/img/icon_delete_white.png" - }, - "img/icon_materia_legislativa.png": { - "name": "img/icon_materia_legislativa.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_materia_legislativa.png", - "publicPath": "/static/sapl/frontend/img/icon_materia_legislativa.png" - }, - "img/icon_mesa_diretora.png": { - "name": "img/icon_mesa_diretora.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_mesa_diretora.png", - "publicPath": "/static/sapl/frontend/img/icon_mesa_diretora.png" - }, - "img/icon_normas_juridicas.png": { - "name": "img/icon_normas_juridicas.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas.png", - "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas.png" - }, - "img/icon_normas_juridicas_destaque.png": { - "name": "img/icon_normas_juridicas_destaque.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas_destaque.png", - "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas_destaque.png" - }, - "img/icon_parlamentares.png": { - "name": "img/icon_parlamentares.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_parlamentares.png", - "publicPath": "/static/sapl/frontend/img/icon_parlamentares.png" - }, - "img/icon_pautas.png": { - "name": "img/icon_pautas.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_pautas.png", - "publicPath": "/static/sapl/frontend/img/icon_pautas.png" - }, - "img/icon_plenarias.png": { - "name": "img/icon_plenarias.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_plenarias.png", - "publicPath": "/static/sapl/frontend/img/icon_plenarias.png" - }, - "img/icon_relatorios.png": { - "name": "img/icon_relatorios.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_relatorios.png", - "publicPath": "/static/sapl/frontend/img/icon_relatorios.png" - }, - "img/icon_save_white.png": { - "name": "img/icon_save_white.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_save_white.png", - "publicPath": "/static/sapl/frontend/img/icon_save_white.png" - }, - "img/lexml.gif": { - "name": "img/lexml.gif", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/lexml.gif", - "publicPath": "/static/sapl/frontend/img/lexml.gif" - }, - "img/logo.png": { - "name": "img/logo.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo.png", - "publicPath": "/static/sapl/frontend/img/logo.png" - }, - "img/logo_cc.png": { - "name": "img/logo_cc.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_cc.png", - "publicPath": "/static/sapl/frontend/img/logo_cc.png" - }, - "img/logo_interlegis.png": { - "name": "img/logo_interlegis.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_interlegis.png", - "publicPath": "/static/sapl/frontend/img/logo_interlegis.png" - }, - "img/manual.png": { - "name": "img/manual.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/manual.png", - "publicPath": "/static/sapl/frontend/img/manual.png" - }, - "img/pdflogo.png": { - "name": "img/pdflogo.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/pdflogo.png", - "publicPath": "/static/sapl/frontend/img/pdflogo.png" - }, - "img/perfil.png": { - "name": "img/perfil.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/perfil.png", - "publicPath": "/static/sapl/frontend/img/perfil.png" - }, - "img/search-gray.png": { - "name": "img/search-gray.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search-gray.png", - "publicPath": "/static/sapl/frontend/img/search-gray.png" - }, - "img/search.png": { - "name": "img/search.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search.png", - "publicPath": "/static/sapl/frontend/img/search.png" - }, - "img/user.png": { - "name": "img/user.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/user.png", - "publicPath": "/static/sapl/frontend/img/user.png" - }, "js/skins/content/dark/content.css": { "name": "js/skins/content/dark/content.css", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.css", @@ -471,36 +306,201 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css" }, + "audio/ring.mp3": { + "name": "audio/ring.mp3", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/audio/ring.mp3", + "publicPath": "/static/sapl/frontend/audio/ring.mp3" + }, + "img/arrow.png": { + "name": "img/arrow.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/arrow.png", + "publicPath": "/static/sapl/frontend/img/arrow.png" + }, + "img/authenticated.png": { + "name": "img/authenticated.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/authenticated.png", + "publicPath": "/static/sapl/frontend/img/authenticated.png" + }, + "img/avatar.png": { + "name": "img/avatar.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/avatar.png", + "publicPath": "/static/sapl/frontend/img/avatar.png" + }, + "img/beta.png": { + "name": "img/beta.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/beta.png", + "publicPath": "/static/sapl/frontend/img/beta.png" + }, + "img/bg.png": { + "name": "img/bg.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/bg.png", + "publicPath": "/static/sapl/frontend/img/bg.png" + }, + "img/brasao_transp.gif": { + "name": "img/brasao_transp.gif", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/brasao_transp.gif", + "publicPath": "/static/sapl/frontend/img/brasao_transp.gif" + }, + "img/down_arrow_select.jpg": { + "name": "img/down_arrow_select.jpg", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg", + "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg" + }, + "img/etiqueta.png": { + "name": "img/etiqueta.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/etiqueta.png", + "publicPath": "/static/sapl/frontend/img/etiqueta.png" + }, + "img/favicon.ico": { + "name": "img/favicon.ico", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/favicon.ico", + "publicPath": "/static/sapl/frontend/img/favicon.ico" + }, + "img/file.png": { + "name": "img/file.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/file.png", + "publicPath": "/static/sapl/frontend/img/file.png" + }, + "img/hand-note.png": { + "name": "img/hand-note.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/hand-note.png", + "publicPath": "/static/sapl/frontend/img/hand-note.png" + }, + "img/icon_comissoes.png": { + "name": "img/icon_comissoes.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_comissoes.png", + "publicPath": "/static/sapl/frontend/img/icon_comissoes.png" + }, + "img/icon_delete_white.png": { + "name": "img/icon_delete_white.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_delete_white.png", + "publicPath": "/static/sapl/frontend/img/icon_delete_white.png" + }, + "img/icon_materia_legislativa.png": { + "name": "img/icon_materia_legislativa.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_materia_legislativa.png", + "publicPath": "/static/sapl/frontend/img/icon_materia_legislativa.png" + }, + "img/icon_mesa_diretora.png": { + "name": "img/icon_mesa_diretora.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_mesa_diretora.png", + "publicPath": "/static/sapl/frontend/img/icon_mesa_diretora.png" + }, + "img/icon_normas_juridicas.png": { + "name": "img/icon_normas_juridicas.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas.png", + "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas.png" + }, + "img/icon_normas_juridicas_destaque.png": { + "name": "img/icon_normas_juridicas_destaque.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas_destaque.png", + "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas_destaque.png" + }, + "img/icon_parlamentares.png": { + "name": "img/icon_parlamentares.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_parlamentares.png", + "publicPath": "/static/sapl/frontend/img/icon_parlamentares.png" + }, + "img/icon_pautas.png": { + "name": "img/icon_pautas.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_pautas.png", + "publicPath": "/static/sapl/frontend/img/icon_pautas.png" + }, + "img/icon_plenarias.png": { + "name": "img/icon_plenarias.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_plenarias.png", + "publicPath": "/static/sapl/frontend/img/icon_plenarias.png" + }, + "img/icon_relatorios.png": { + "name": "img/icon_relatorios.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_relatorios.png", + "publicPath": "/static/sapl/frontend/img/icon_relatorios.png" + }, + "img/icon_save_white.png": { + "name": "img/icon_save_white.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_save_white.png", + "publicPath": "/static/sapl/frontend/img/icon_save_white.png" + }, + "img/lexml.gif": { + "name": "img/lexml.gif", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/lexml.gif", + "publicPath": "/static/sapl/frontend/img/lexml.gif" + }, + "img/logo.png": { + "name": "img/logo.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo.png", + "publicPath": "/static/sapl/frontend/img/logo.png" + }, + "img/logo_cc.png": { + "name": "img/logo_cc.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_cc.png", + "publicPath": "/static/sapl/frontend/img/logo_cc.png" + }, + "img/logo_interlegis.png": { + "name": "img/logo_interlegis.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_interlegis.png", + "publicPath": "/static/sapl/frontend/img/logo_interlegis.png" + }, + "img/manual.png": { + "name": "img/manual.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/manual.png", + "publicPath": "/static/sapl/frontend/img/manual.png" + }, + "img/pdflogo.png": { + "name": "img/pdflogo.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/pdflogo.png", + "publicPath": "/static/sapl/frontend/img/pdflogo.png" + }, + "img/perfil.png": { + "name": "img/perfil.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/perfil.png", + "publicPath": "/static/sapl/frontend/img/perfil.png" + }, + "img/search-gray.png": { + "name": "img/search-gray.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search-gray.png", + "publicPath": "/static/sapl/frontend/img/search-gray.png" + }, + "img/search.png": { + "name": "img/search.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search.png", + "publicPath": "/static/sapl/frontend/img/search.png" + }, + "img/user.png": { + "name": "img/user.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/user.png", + "publicPath": "/static/sapl/frontend/img/user.png" + }, "js/chunk-vendors.874df7f4.js.LICENSE.txt": { "name": "js/chunk-vendors.874df7f4.js.LICENSE.txt", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt", "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt" }, - "js/global.e8c9c610.js.LICENSE.txt": { - "name": "js/global.e8c9c610.js.LICENSE.txt", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.e8c9c610.js.LICENSE.txt", - "publicPath": "/static/sapl/frontend/js/global.e8c9c610.js.LICENSE.txt" + "js/global.f01dd32a.js.LICENSE.txt": { + "name": "js/global.f01dd32a.js.LICENSE.txt", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt", + "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt" }, "fonts/fa-v4compatibility.7e7e1dad.ttf.gz": { "name": "fonts/fa-v4compatibility.7e7e1dad.ttf.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz", "publicPath": "/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz" }, - "js/global.e8c9c610.js.gz": { - "name": "js/global.e8c9c610.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.e8c9c610.js.gz", - "publicPath": "/static/sapl/frontend/js/global.e8c9c610.js.gz" - }, - "js/parlamentar.25e7f0fa.js.gz": { - "name": "js/parlamentar.25e7f0fa.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz", - "publicPath": "/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz" + "js/global.f01dd32a.js.gz": { + "name": "js/global.f01dd32a.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.gz", + "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.gz" }, "css/painel.e2b9504e.css.gz": { "name": "css/painel.e2b9504e.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/painel.e2b9504e.css.gz", "publicPath": "/static/sapl/frontend/css/painel.e2b9504e.css.gz" }, + "js/parlamentar.25e7f0fa.js.gz": { + "name": "js/parlamentar.25e7f0fa.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz", + "publicPath": "/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz" + }, "js/painel.7aa779e9.js.gz": { "name": "js/painel.7aa779e9.js.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/painel.7aa779e9.js.gz", @@ -511,36 +511,31 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js.gz", "publicPath": "/static/sapl/frontend/js/compilacao.1c9473f1.js.gz" }, - "css/compilacao.f4baf459.css.gz": { - "name": "css/compilacao.f4baf459.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/compilacao.f4baf459.css.gz", - "publicPath": "/static/sapl/frontend/css/compilacao.f4baf459.css.gz" - }, - "img/down_arrow_select.jpg.gz": { - "name": "img/down_arrow_select.jpg.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg.gz", - "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg.gz" + "js/skins/content/dark/content.css.gz": { + "name": "js/skins/content/dark/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/content/dark/content.css.gz" }, "js/skins/content/dark/content.min.css.gz": { "name": "js/skins/content/dark/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/dark/content.min.css.gz" }, - "js/skins/content/dark/content.css.gz": { - "name": "js/skins/content/dark/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/content/dark/content.css.gz" + "js/skins/content/default/content.css.gz": { + "name": "js/skins/content/default/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/content/default/content.css.gz" + }, + "css/compilacao.f4baf459.css.gz": { + "name": "css/compilacao.f4baf459.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/compilacao.f4baf459.css.gz", + "publicPath": "/static/sapl/frontend/css/compilacao.f4baf459.css.gz" }, "js/skins/content/default/content.min.css.gz": { "name": "js/skins/content/default/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/default/content.min.css.gz" }, - "js/skins/content/default/content.css.gz": { - "name": "js/skins/content/default/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/content/default/content.css.gz" - }, "js/skins/content/document/content.css.gz": { "name": "js/skins/content/document/content.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/document/content.css.gz", @@ -591,16 +586,16 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.inline.css.gz" }, - "js/skins/ui/oxide/content.min.css.gz": { - "name": "js/skins/ui/oxide/content.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz" - }, "js/skins/ui/oxide/content.inline.min.css.gz": { "name": "js/skins/ui/oxide/content.inline.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz" }, + "js/skins/ui/oxide/content.min.css.gz": { + "name": "js/skins/ui/oxide/content.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz" + }, "js/skins/ui/oxide/skin.shadowdom.css.gz": { "name": "js/skins/ui/oxide/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.shadowdom.css.gz", @@ -621,6 +616,11 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.css.gz" }, + "js/skins/ui/oxide/skin.css.gz": { + "name": "js/skins/ui/oxide/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz" + }, "js/skins/ui/oxide-dark/content.inline.min.css.gz": { "name": "js/skins/ui/oxide-dark/content.inline.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.min.css.gz", @@ -631,21 +631,16 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/content.min.css.gz" }, - "js/skins/ui/oxide/skin.css.gz": { - "name": "js/skins/ui/oxide/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz" + "js/skins/ui/oxide/skin.min.css.gz": { + "name": "js/skins/ui/oxide/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.min.css.gz" }, "js/skins/ui/oxide-dark/skin.shadowdom.css.gz": { "name": "js/skins/ui/oxide-dark/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.css.gz" }, - "js/skins/ui/oxide/skin.min.css.gz": { - "name": "js/skins/ui/oxide/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.min.css.gz" - }, "js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz": { "name": "js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz", @@ -666,11 +661,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz" }, - "js/skins/ui/tinymce-5/content.min.css.gz": { - "name": "js/skins/ui/tinymce-5/content.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz" - }, "js/skins/ui/oxide-dark/skin.min.css.gz": { "name": "js/skins/ui/oxide-dark/skin.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.min.css.gz", @@ -691,31 +681,41 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz" }, - "js/skins/ui/tinymce-5-dark/content.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.css.gz" + "js/skins/ui/tinymce-5/content.min.css.gz": { + "name": "js/skins/ui/tinymce-5/content.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz" }, "js/skins/ui/tinymce-5-dark/content.inline.css.gz": { "name": "js/skins/ui/tinymce-5-dark/content.inline.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.css.gz" }, + "js/skins/ui/tinymce-5-dark/content.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.css.gz" + }, + "js/skins/ui/tinymce-5-dark/content.inline.min.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/content.inline.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.min.css.gz" + }, "js/skins/ui/tinymce-5-dark/content.min.css.gz": { "name": "js/skins/ui/tinymce-5-dark/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.min.css.gz" }, + "js/skins/ui/tinymce-5/skin.min.css.gz": { + "name": "js/skins/ui/tinymce-5/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz" + }, "js/skins/ui/tinymce-5/skin.css.gz": { "name": "js/skins/ui/tinymce-5/skin.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz" }, - "js/skins/ui/tinymce-5-dark/content.inline.min.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/content.inline.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.min.css.gz" - }, "js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz": { "name": "js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz", @@ -726,10 +726,20 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.gz" }, - "js/skins/ui/tinymce-5/skin.min.css.gz": { - "name": "js/skins/ui/tinymce-5/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz" + "js/skins/ui/tinymce-5-dark/skin.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz" + }, + "img/down_arrow_select.jpg.gz": { + "name": "img/down_arrow_select.jpg.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg.gz", + "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg.gz" + }, + "js/skins/ui/tinymce-5-dark/skin.min.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz" }, "js/chunk-vendors.874df7f4.js.LICENSE.txt.gz": { "name": "js/chunk-vendors.874df7f4.js.LICENSE.txt.gz", @@ -741,16 +751,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf.gz", "publicPath": "/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf.gz" }, - "js/skins/ui/tinymce-5-dark/skin.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz" - }, - "js/skins/ui/tinymce-5-dark/skin.min.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz" - }, "css/global.45591136.css.gz": { "name": "css/global.45591136.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/global.45591136.css.gz", @@ -782,7 +782,7 @@ "css/chunk-vendors.9904f9d0.css", "js/chunk-vendors.874df7f4.js", "css/global.45591136.css", - "js/global.e8c9c610.js" + "js/global.f01dd32a.js" ], "parlamentar": [ "css/chunk-vendors.9904f9d0.css", diff --git a/sapl/static/sapl/frontend/js/global.e8c9c610.js.gz b/sapl/static/sapl/frontend/js/global.e8c9c610.js.gz deleted file mode 100644 index 0a068993045bb8fdc3cd60a7a07a4109445051c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14070 zcmVK9R(7_(UVNXn%&#&J6IV@Ey?o&<-3zVl1&ync1| z;_b&5PH|Hh4|e~XW!c`-+iO2FLJFmym-Y_%WM^7FN zMD>a)tCVRvl}WK1r-2{KF7Sq|y5RC?R3-uUJhP;IE4>ImN0}_jEHQjMFKYnGxs67a z@1#~Lq-|@c^g>=96_YHTThdG9+<1{?X=a&cev+hxF^ZDVn5JPFOXE9pNA8&4nYQf& zX(&DO&AaD6zJBrP?Yr|&FW>$6_PHtKGIOrvBKN9xE&EnC^ltcz3<}P*QhO;fCzE*^ zU!&8)l8(HYrCE`Cne9ZOM~GaCy+?ybE9i_o-+J=s;X_-bcse|Id}tr}*1?m(p)GuC zf3UaDzk7o|{XTj4@PK{?5BHzY@4=&kN4A(_Oz9lWkI;k3bH9-9qu@$r?M_Edi1Zn! zJGm^L%aLEkMQ(L6GC2mgA77Z5m}ei%OIt*i$q-R8D+|+ZL0k3_jX-)~8k97t&ab7+ z79V8{yrkJ_9CwQzrH=H23C3Ud3#h;>Q-4m2B8!G)AuZD{i!?~5pxr{6!c0da(_R9> zdYEHboTceiB%9%Z5~wGImy~gQ1fr;W6forWwrOs8-b$*Cbz)IDe>KO+XK_?m=8;L$ z(mzU%eJ7U5xR@NJJ3Fee%!?d!d20C=>7`AL0(Z{=u&Np;O(j4qfW zEHh>>1iTcJD3lEd2tURUSAdp45qg6eF4CkIg}peM&V1@p0LFFI?t8t&B~5Jqm{z(* z%l0Bs`5CzqkfS=UEE96Z>`4@y$AO$+X|<@l58wmQlXB z(**jfS$B<#hS7BoD-z4h4^t{MiQ+Jm0LMa`rq|L^a2uz{OffyWqMVi#ElkSyu~IA( zI1iC8s)wq(U+tt?uD8Fs?cUnUqlgxjW$ya3Xm<#Kv8(zb+ACErv7>JtSf8lgnfc== zVJdKnw7@7q@L44D6YE>YwGoq(VhS`L=QBSsg4oYk77toZKfF&0vqjGw-h$)ubb zb)n;3oq-3GdJ3lRS_M|fcgNg|!T^^xYw+AO@?sG~CQPHGrxu3sr2nr+#?-&j@AL|= z=rf=mn!8WG13fvahTH*fc|pvsjljb3XPDHG#(td6DEVnUa7;ysMI#|CG#yKaXxpx4 zb`=M@F7tSp?LKYZiwz{BCgt=V1P_ik%o7r1PRnh*;aMhi%Zy2G|4j ziE*j8&pNM=s@V;^p~Z1F=Ti$sxA;A!HUqEnn|m5u0n!!uHJb?HG?%peNk+Eiq*e#s z`1w^=OqdvYEJqMNsBemF%e0<6v5hDAuSb7OaXX9sKu*#)l$mQZi!F8g=>MeqX80hYyvyeArjNkM|DSYICJl5Bd)u+hXRW;ueT6+}1Lg zStbwKiKgI$J=SC}3fbZ5nj=v^MJh58iA3Zg7Gyt_-pnc{QErQgS85(l6UXeB$8MEG zLcV2A7d@3Dsub1eD3USw8P!mC2RNPe3W&Dh1%WCUF7BB-lO6NY9YtAA+V-SoDA#Ee z8ht3h6J0%*Py8tEm04`sCsvg~nq1ZF_V&b~cL;STYLMHxWkM8?WSjP2UR4cgAn@91 zm=Q|vm^~hZDH0EIwrU{F#!7l(SjU#%NmoiIjTe)edNp<`0nA0RPI^;hi}Z~u%MX3n zFBt?GO%n|z+47?8Z7ac4r(Op7NvIWI^*EZ2pMn~r(3K+30{0#qfus}f7Hxinymv1i ziiej1rr*bMMrIzV(M48Dl?igV6ltOiA$Q$M$&ZwNu4yJcDs-EqOZ4V`mcSICUIRfA zeFZWK+sPwRzQ>pa=NF~|wRT8wdg(f@FwS%XrXV@y$I;!L?@W%_nW;{fIZmYzob!OK`}w?qUx4w zJ)Lis0Q5ea6p;C0ZwjwQ9j<(LR zPr{Co3?r2dVOcp#NI%lHF7Pfcu+Ve)3O1=kD}sCut(3u9%HCSaKBrtRt4=}5Zg)X( zN^L-scD7rPj|!Pt5n!Q_nL98%e@mo<5^ZbsLSA~r z=$ETZD2~&4Z&b!H(I(G$jDG}=rNxdptLhr&cc;RbV)x%2gV$=?##Brmv|+4N`t+Ek zf>A7H;Qzry23LSG*_Qck#|pfaUi4@bJKvdx5*Xj@1b6{pd}5mJcLrA=LtPVe>F>bD zp`oKIPgy!CK>*Z{8;z6-8P96X^pqefjMsW18;F{^F+Bs2<2u5{%9L#N?d7JyDn0@;hn!!e(WGTAp=l?bo??pY zaVT+EAyd>(YE_fYZoB0_B4kOu=We(o@0NTjTGwah_K7lP;C~)uO1n>4$5G*ss$*$e z;b7e(`9`)Bt#=ZS2Zw_L@L=UJJo2r*hllKitkkYYhy4M+KOSKHS#PA5>ZRg!J$gv-k};jGS~d0vTA9+xUW9YNG;% zb&<|4n=*b=^#$9%@{he6;(F@kXS@t9TkyXSyqU7o7d-SGwS~Esmu+jA=LK?^d<+y}gB*A}RLVj0ou(2Hsrsf{mCJgIdS*`Lx; zDjN8VPgV(3(e3U2adE=R`fd&SpaFC=4*rODBTI?Zhj)yr?CitB^xNeR8ZDX&r zS0Zec`O|ZU3?b%atc@1Vq?0zdJh84Enb2gZbw(`W$_dj%l1_NllD2KWq$g6u%r1JOFx!)-PusdY#zk4mn zYT&nhyg?A0JC#^;0?e58T>NUa3C^Ygt&mdF#_wtbRCB}4abuS&?Eiud7Har%Gm`!Q zBsC;N^s<3auG)lBQ)QQaHW2I2D|HXVAKOj;zTz~6R}k$E$Bft`dV1;896+NO-GD^o z%$fN4yLm#C0%dyvqp>?1WNMr{Ba}LirYO1PpGe0~pd(_qx2scEEXD1wr7R`+FzPM4 zru@=&)%3450|liSz#nNM^qTv?+Qf-GsV44S5-%)T_AB$~{+)&RE&QM}AuUO8qC`X+ z@_Y?*mCuH)v!QqHR0%|~3$Wf+3aIyNQysO$)^_^P1WS_`(f@m75 zyW=uapH(0zLFO4sP5m2|Jx>G_hl+^Lv}KZ)Og+ocQgxgDk%JI@o^$`RL59u1?I z7_`aHF%qYKHjWZ->>0Q`L=QcsdBkhn^oMyGmlR|H!Gj#KliWU-c&OSJfg~olKo?)V z`QBtf=8xa{Q+ZN2Yqj{Yu0vR-Ug!idFSX8YC%K}TdyxZmlFlJds-89a)@j|bTG66*l>6tjvc1t$ zZlzrrV`v~K>;!VYUYXU}1@=(W3+t4Yw{{h(N9FdTrt4mud38TfZ!M<{-rQACi(2P9 z>x%8l6|Ba3+f1?Ec*PX2^8K1aEN$(!Ipy(&^-eMrrOzI*RNc__cF;81B$Kh*>Z&bD zxv}%+px^&jvmQb9${qgvDhcI{yFb`Wo|w*T1itQ8o7SMw_y1@krfS3#`+I#`yj&^1 zg14q^-L=C$7KRfJ<9jxxJ32DyG?h(XX*JTW5v~1Wr!}TaDc%Ebo)r-Bd{$kHreoE$ z7B6fwM!P2Lb>hGrRCRwQA2OT0zAa}31~PB4mM zS_P7~l>RZZ5#mIvDukE~{rYXUfu+zdn_#s|3M@CxB8tt3UtDv58atE1bFwXDPHd9l zDzDWy!v73CT|~Lwy^^8(0g|xV%IY&KW9vl&+}&*r))G&;uc!jjSG@78xi|Kv-pK2V z+ff|N&Qge}+I7gOZ4WbMc1Kf zz^YV^D0eM_^Mb`cU>a}LhRr%|L%pWvViJmrL#xGd1@dhJbkISrN;-e~@|Z9rQ(QJTA$N zcT3FThSVkI74+2NUKvLpt|SiAqDZHl3X?@yZ|*`0_4L7?yJu3=szcF2SdB_YLVg6tp^iJ;wGCNIp;gc}oz*)06*XqF^%&)+ zbN>p1*xr66trpWm6%~$N5wbf`JMEZA>SD1n0}W?=Myy43Fkqvo?cfz(nWSRb(kV== zS>7zF+yEaO%^%3yGvo~sUj2FDXNB4tF$LILn_V*(ecuX9D;j&T*ep3$OnFeE1of^N z@-Dp;FRcXyxF3}}()HzJYA=w&;%$>h9RiG1hOlx?Mefy8=Qshy3O94)Ec!cJECAS|?1*sR7@-iIy!0Y{o zNrC$97=E6u8A;%d@1UB#_tk*6`b{Yg&mlJSzSE)#-E&3H9l3J@xZ7qhXyvfnz8`{=RlBVggx01!??i{VpkH=N( zb2L?6j4$SB-5PrIAg(PDtVJ`D528HmYjXf+05-bx$`F1Tm~1^9MF2>p?oU_e+QHYOgQ3de;=*rP`PK#D+mz&?wz{ zMcSyuuL+v{L+Ah-Mx@GZlDQg|Dr% z)B$nSfsVi-_NljQHT!Id{6c7{zOG~%aizr)a@rH~NpVJnHe!rR(Q%Kuk!ZZ9ozO(E zwk4m-s36;!+uIe>T#Bx9)lCF(@Hc5F-CVT&du}GkP1&v|x3(~JiW68a$t&wwsqE}G zWANQ~E0XLk1t~qRsPyh`q9}$B1(4|Bw{m6;tLL;V=mn%T_eN&#?w{)mq6_s7fP8O)D%9%sBM(l%MtEC=Y1v{3Vta4Um z&>&$Z-a`$OHELMW4iW7WqSfy@aXy(JMyYAgiGx)xGa_xqR0@UJ8|?LGH>N(894(btB44rWciW5y=WnTkv z_fCMGV4mM4&0K?i+Gk#MG+{~ATaE2izBW@@-O8L1=sdSVb=;lN(;_p3PTG32U&-4xtwN-lc*&ajP{ z-qd^3352?7jrtpT+q$EC<2GB(@y=5#X|+f+bQ{4~i`W8LU5SF`L9A@A4Zv$4Z9iAK z$R}yt(<*_ri1noFLO`yIlmUKQJ^G}52EVsXIZnT`Z~KwE%hAa7(Y?Gce&WH+X$q`;fQ+KnF+!V10UxPLP0m2SB+vhj$N zKCIxnQY-9@?A?NPp%P?IdlPrEGqv5tafpgTZ}APl9QZv3V7`kco4o1HgqsY|WZ9}E z=uPbh1#LaHJLjGq2WT>YdDQ||uq&X@mX5;{>dmoFVedP>n;zqhdpz1nse{ww;AFa^ zd+bhoRo~t4nBYdeP?habS-h#Ty>?lo>aywyJ*MG|dR~YQ^(!RNdvAdhOh`Zg)1DWg zmVPxPdheYf1yl4=TJNPr+t45?iV4Q#(cH&8_t5C;k!SW(yjo+gf1I6+c4qFVH?zf` zS`e}Q6tC7C5Hb4uC-n4BSo3oCx&w5qQffGQ1t|U4;y1g)PMgP^P`8RVw2Qxla&mu< zd)`Q3#N-j@gn7@K3XE`Si!mo4b1VQh1|R1HWX=V^=IkI>5E6r45R_z3x`L9x!5KkH zf*h&JAv=*c)sWLFaat!f7#)kb-CpybJNg2ao^s$*U?pw$VCm_EfllaOK3!B03kC7? ztb)MgU9{tudB?t!Fu1f^LB#Ln${7d_J@v853#{?9zUksv@(T8miP5CTg+9BKdmy-r z3@j)Td8^)+vK#kDdlm~0C*`O=ihH7%KRTW<=hq&COgO2>J0(qJA6iV0Tw}g>(Xz=+ z(O6E^Go+w-36|Deqrm3+i&)YdN3@&vQIRcf$*&{5{*i2MRFL(J3Uux(^UO3ccl--^ zX-80gj!2ZI-5Vk@VXC1X@!_W?NZPA{q|=KG6H#1HHJ4sgU!mYM;~+nF)%p6F2DJ=) zz0Fc9@5`2#V)7L)MSBC#uHBR3kEHyvJ@ee7vnCwq(5T@Uw|(0ViTs1UStDt}B90O$ zrE%(q-rCM{q8x6Rt3-R;SlZO_2C3JII5?^T4rJ|~<0ypI9&<(tK=+*@7>H)Y!m9%o zy73C1H*G>szOs!hf=wkT1d05=)jla-kkXjSnW_fRSt|w2E+^y7wG9@PRUY zUILRqDgyZ)Ccyr(i97EIcQNy{bRKzHD$~v+2Qbn;BZV*?6||R3+ZfGer!`YSMYOqm zVRbheZ0APMRzXU87%A;xK=h{|<8!U#psUYi>@UC+n$Y>&tApnu7I+1xw5mhy1)j08 zl}Lr+h(V4&&ZG>{|BOnH@PmR={GiMjKLEdSDsK>xCnR-?vVtAY8ua_Uz}_tdRnb0c zHQNbxk@)~5PSv)vMmj5}ti4XwRA#WcwP2tHC=kc)@z}WA*fqjgh6YF>6 zR`59nr;ey=_kXaFPQvcy_}o8K+nYa&z)u1hw|h{dY(u0ng)VXY z61y{%i?rrNB9wG%M#uXYGNj*%}!%!6Zvj zM((XXs2+&Cj_`Q7T(*Ox11%U7fR>eO^^q$G_zGKi5YKJ#oZ}5g$;M+-d|0?@ijEqt z9Yg2+B6ZxnQ?;$meEPGfbEaoA?9t|Ar&%RLa&&}6hXZm~s))ckT=F%fl+3uM_VDY< z*(3wq&cNg7LZLLc>IN@1aY?>c)vBsf2dkp|WfKNeFL57szia*TTOrQ_ANLe1BlcE( z)auZPilhXK2Nyj`HI0xYhuRQx!G=l>9w=p zKne9BL4EMsY|fH1uhWhcq6wd9qV{08&Y@5~2XZKMw&q;tKy)@hUFV@_woO&VEpy-P zckTx0i_RvkdtuW3J30Q520h2Wg#XYRp9sw7P^Y_l%4>xx0KG4|A-}cRN`0vJwdtkp zXl69FBe{4u?0(WH)2bvL{HPR3epWGq?w+W8F783UFS=@syVnkN(7Wri2#PV7+O9rMyq#f>!6PrW$0l13a2Gfa*V z(d|pWmQf}{1J)PI4`UXWV^~*3YRuE@%51s#gAVuNZZKCgq68uhng#T#puTL8x>S`o zVsQ`^atdV?im!SNz06V!lUPzg7g%^+1s!m3xW&8=l#t z?ME+%1rvKwRVF`uGYxJ?C-B$)Y%O)Rsg7!;-PR;dGA#hZE@&f`UT9nF zwBq$@jew`Or>U25W`*3ePSFd8PHRm6R~wo330;B* zf}@++%p-YGTta?u=&8Lb9|r zw!sGBa)mLC$FaPxk(1V}yB!I+%7oV4k}JgP$%>qrVRfw8dZpInPowjCB(%FTSk#1C zvBN^Nt0ix_Zd&t=Ht+_dAeF9xU6GVD;~jdGwSvG4pqYL%DW^jS`uci~jmpQW;!%&2 zJcm8+9)+b#onB|0U1HR0LoMEowS9GAw&mFxhCUE7%#|6ZRrr-D2UhRy`g)FU_3XLr zsT5V4Zl?!=E*ordGA(}!8J^b}?TOW+sFCD$aV9jnT-j9gS|_#ZqMJoD!rTt}U?oHz zokAQXjzY&~D_>+)SWoW2Rx3eLw+`jn z(wCADQ&EqKm8_J$keA)U+5)N$n;5a9Q;xKq<-$7HVC1}!#Uu?4zOmg1Q<)odo4dS; z=ys%Ki<>OlvsI}G{!%#{lyijcJ$n3j-{t%6G0%%>Ajz%zYVbI*%vtg2*#}eHevo16 znjg@s&tzr%n9%EUnd|qnvY^}m2D4AE>1^Se_#4sNdn^J;uQ9!u%3P((yP(~CtgpB= ziZV=*{T8!YZJhz&ZF-&7@5q05<(luV(1ddAn(CJ;{wc~!KQ{a*%u(?4mooH?Yfdx8 zvosD-nH*;k)$$4}B??^gRq^G|cu09fGNV9d^r@t~1t(PJM+n?2Nfu{0o?wJg9&mCw z!#o99G{dkzrkGKBp^8zqPUlB?P53d-V034OUUzh3pKHG6JHK_B|K;Dm{2LAbG>*m~ z1UaI?pQ?TsU;dXtH(ARp^lOknl7bDOGrC0@!}-ieP?;)JyHi03HWn2q|JyPzq7mjt zJw!Yr^BGhmS-?=v3+@}}+DOnPgM225&ket2_72mz1Jwd}F3AnUpIr#m^gWNJQ387# zW_M81_+BNeAg4UFehqR)clf&IOBwJKykz|3NZ<#G=r(^&%gh*N={%Pi(|__^Vdzas z9w^aQ5Xd|ytG<{>BZ#BfF!i(0G2W}sK$Q4LIcG%{@BDH1Z1*SQN-h}2$S0^MC<|ri zOFwj&R7)fAujSYe(@fz8O%lbUEi{#K%V-bC{_=OYuV_U^&3ya^XQtG7)Ui@PYZGxgxFn3{O!wshS4}BewX><%%6c_;PK0! z@eFAso{`)A*D@tuc$&|AAmmk|IL?cy!3$Lb0dMrnC}ZYHek-V0phjaB`{b*FQAi)| zkd8q;qO0 zrK$%5nKAQoFxr=>%XsO-@LrfMzsV|<9HGS5&wcc7!hC}L+WbRM&zK*uThC97>b}$W z8DvL>s}QR5!CK{K_$2@xNC(|1=3Ew0ZF5euQbWY!&{Qf2G$^c ziFVOY2ysi4M@u@R2cAXLNY{(!a$H8BOn(M>g_S{{38EZo>dW7zGE4D<_b>lW4>J&5 z%8inXm|qMmom?viVVXNi5*ZT+1@tAyPiUwk=HTm~xdp@Phq(_T#$wQSrbxq|`->BF z`zKx!1+6YzzY+6^uIjCCV9UH6tNIW20t1wr|8>)OspY-A?VQ>T!eY^g~x|L|$Q2VUP zkOp7V7Zs$zZ)og27tz~cupiL!ZGUOIRCydUZr=K9KA@KyIRvN!U@}p zTQS_$;(`pUtAR}=lbj=TO!fTb|H+&gXF?yIAuSQS2LmG*H1WnKQ&A_P1&01!LW}ib zL4Qv_w4kral!nwky=Eyyy2nTQ><_wusV6>V{zTj@06w6<2F#uD09amj#sG&0X~CH*0PMnf35hz^KAygVc^m3L55Ap6Czsf19 z{Ph~^k`)1xaNqmWsgGIlNojbM5R!>l=$Fj1)7dOups`u3JRHw_Qq_M-V;)jPWVAo9 zOMce&N`%3;J7I;^eBR1$r?=$73iDrK30;VaBWS>LGRq2b9B^nBSvSgHBE@6MUy&kb zTZUDNKhPWa$U2!A*Ffl7I;Cu?Z+mISnR4kVx0!GJ;wKRBtQ=CfVbvG)R&_!t@p-Mq zW66NaT`{k_str(zl~~Lq>Fuf#OpYXd7z$a$#*(4o&nMFO@xyD@dD%q;sgO%KWoZo4 z6y}x$6ORpFX%LR_JnbmRNN2}P9jHOjMe34l7)3XvGXL}2__lG}AURRe;p*?VF)50f zySv*O$0@f!+Pt!h)z?Z<2VH+3(5Ff>!mLssxG`AV&z0gIB|%IJHr4f|RsGa?nu|4- zNQrqvyVqEIX^VKTzxL-0Ajl;Jen=ATRh5nE-%zhz zv+gBU6?^DOspyKXRGVdTMqV9oCGHy-FvFW*i=&4?Tl6-?T~NED2F_C4|72)Afig%qSxHl|Ga@gS!tY5rVOoXnyo%{G)QLY z`KI}5Jqww^Oq`E9Fl(* zJ;;i53=$ae&cUm3l9I=Uf0b1`38 zbMRbg8G88^6ye@lzIa#6{+u$tW{Ua^>~nR2Y*p8b8^u$q{4)%m?ESyQCB1&21@~Gx zDnZBPG+}x!na~OL>#YV=J?0w;Ic5YX!Fu;ND`)H;;CyyC(1%JGfF~1ND9T#pH3~9z zcG6kmt_+5XP8x6Ch2$Gd*8oE~OIg|1sK{7+R*2AES!jdvuaB()JSz)bMYS8&WTmr( z&Qm*Mb&lc@ozW;Z(H%MRS!fDIp7Ie$4|f$wu&GPy^13Zyow|R-NI9#sQ?|y zE1JleU~)|{cvE4s=4&W1B`Hxlc9!GM~Owe-b^F!it5_)+D*hwk_trXM>Ny^C|&=@0Hi_H;kR-G za|m|V8EpPwaF*FgH+~?)YGck%Q29s^=lw?JzHg#1B#Z2gBwp}L-2#Z|8tMFMPev~t zy>!7At6dIF%yg!I)>?ZFkun{uW>@peWmmAEi>ij(8!FVlkoSQz!ph4uWfXr%Lx1+= zFXXXj!;c-hikeCHHilg@upsvzwD1;H(#8jwqvtvcH1>v*@+PfHsCmhy_u=^_VqLA;k)o+`#2rpgPUvO9%mEhyeLP3vr>tozD<(VRLR)q6OA`102T zte>0&DwQ@?h#^jhJMiWZ8T86D-~`?!;_N8V$BY`6Zq92o8qyMNT)PaYtSOR#?0M7< zlu87ucVXghEgtE4rt?XX5gndpP;SW>A=9)nP{|z2wK>K!W{RI!!}+PD+^Fr`YFn35 z7#+01qlC|S%FN_t#~b*bwlknB3>Uh?&!e1A!a^ZU*`=>L{vm=kz%zde?aVRw8b#yu z^?C2*6W${thh!&t&{rYh%1hYJQW^ZcE=sJ3?5RI4`#bpfy$SvA9EoK)yn9#By? z)y})e5eYj$wcdsG*#S$JY#u&3Xnz^hq%CE_Mo^eXzIFKI$sPyh15AJalRr%L=+Pbr z?C(F?KTrYuk00~*LJuDC2dwrE4%P2N^_|dzg8{?sJ$a(O6S}WIP2{1D#{-Jnu~6%i zN2>ORkLYtAnddtRom1q@$Bz&B)1!xvpYZRa1NHlOpneYy)Tc@J4j*%u4)%hUvn~dg+uPkYi{b{c zD3W;L4Fuh1#m!Po9feskN+|MmWlq)C*d!lMrH`>OEj)Ux$Wg!3K@}!vI+N9ZDl=|bPRTh6V`VDMIw(Fz7rBoe9_1OJ?3+w=W{Ee-s^u)v<$!E+nWR z5^=$WFTL<0qI1|=bVQ+l6dxBAd<=MNYp|W(-KEDKedOsK#{kmZTDgTD*baq6EiCCh z#T$jh6&LZPZJ!kUdBQ+iaj(bM=j22#>9M-MCBtvGtFm?QM*tH@LjmyL_4+p-!7d=BdOZe%3>#kEJG_)Muj#kG}-; z>66SsQe`YpD1J^>=c729u8!+1ozN=8txvZKi-Nzp%JV>TP<4wOI!0laPD+=rV;EcX zDEU!i5Oqh1tiKb2JaLP4HI*3)PRs>42a5~;l7vI)jJ@um*d`iNhv$ytbm+(DbQVYV zv`OI$Dq4|*cXt$SS)UXzTUjRECR^VVv8f>)X{gJnH@-;`W2`Wt2ib(xc0Y@vh@U`F zDC2n`mdYpzn~39&iz(RY_O|*3tNF-Ig>!#=KN{Cz#VrR1vkqCt{3)mV3Y!fHm{qZ@ zzM6n!8d66sx{kh>HOji9_`V6y!dhZRLeW0p%%K?D8O=| zkECeYX^tvg@L8oxui)i~DTtgrr3>m%ZcCN3)iP!}OPJ0QCN8YWDM-dk=r|ECvCP9l zrE6m7AQ7mXqGIFYsJ+5dFT$dw>9YdxlI`u_BE3|9FZ!4C$qqWW)^8TTJ31dL&>u*> zku#S=Sb0}xlQOx={aO5Jl(7aJ{+;Z*JK%}JSYOa-8h!OPAKKCP>6Q7!YbUEDl^|_f oU!zFf(O3RnJbCi?QqXEGEmEfdL%DSMv}GUte{WnJOiqdb0P>%#cK`qY diff --git a/sapl/static/sapl/frontend/js/global.e8c9c610.js b/sapl/static/sapl/frontend/js/global.f01dd32a.js similarity index 93% rename from sapl/static/sapl/frontend/js/global.e8c9c610.js rename to sapl/static/sapl/frontend/js/global.f01dd32a.js index 7a84ac27f..7bcbd76cb 100644 --- a/sapl/static/sapl/frontend/js/global.e8c9c610.js +++ b/sapl/static/sapl/frontend/js/global.f01dd32a.js @@ -1,2 +1,2 @@ -/*! For license information please see global.e8c9c610.js.LICENSE.txt */ -(()=>{var d,c,e,a={4391:(e,t,a)=>{var o={"./pt-br":7971,"./pt-br.js":7971,"moment/locale/pt-br":7971,"moment/locale/pt-br.js":7971};function r(e){e=i(e);return a(e)}function i(e){if(a.o(o,e))return o[e];throw(e=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",e}r.keys=function(){return Object.keys(o)},r.resolve=i,(e.exports=r).id=4391},2717:(e,t,a)=>{var i=a(9755),o=a(6486);a(4916),a(3123),a(3210),a(9554),a(1539),a(4747),window.refreshDatePicker=function(){i.datepicker.setDefaults(i.datepicker.regional["pt-BR"]),i(".dateinput").datepicker();var e=document.querySelectorAll(".dateinput");o.each(e,function(e,t){e.setAttribute("autocomplete","off")})},window.getCookie=function(e){var t=null;if(document.cookie&&""!==document.cookie)for(var a=document.cookie.split(";"),o=0;oNenhum resultado")):(t=i('"),u.parent().find(".help").length?h.insertBefore(u.parent().find(".help")):h.appendTo(u.parent()),p("#"+c).click(function(){l=!0===l?(u.val(u.val().substr(1)),f[e].setSelect(u.val().split(",")),!1):(u.val("-"+u.val()),f[e].release(),!0)}),u.parent().find(".jcrop-tracker").mousedown(function(){l&&(p("#"+c).attr("checked","checked"),l=!1)}))):u.hide().parents("div.form-row:first").hide()})},jcrop:f={}});window.image_cropping=i,o(function(){r(function(){i.init()})})},4717:(e,t,a)=>{var Me,o=a(9755),Oe=a(4614).default;a(2564),a(4916),a(7601),a(4812),(Me=o).Jcrop=function(e,t){function S(e){return Math.round(e)+"px"}function I(e){return T.baseClass+"-"+e}function l(e){e=Me(e).offset();return[e.left,e.top]}function a(e){return[e.pageX-x[0],e.pageY-x[1]]}function j(e){"object"!=Oe(e)&&(e={}),T=Me.extend(T,e),Me.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){"function"!=typeof T[t]&&(T[t]=function(){})})}function H(e,t,a){if(x=l(A),_.setCursor("move"===e?e:e+"-resize"),"move"===e)return _.activateHandlers((o=t,fe.watchKeys(),function(e){M.moveOffset([e[0]-o[0],e[1]-o[1]]),o=e,k.update()}),N,a);var o,r,i,t=M.getFixed(),n=L(e),s=M.getCorner(L(n));M.setPressed(M.getCorner(n)),M.setCurrent(s),_.activateHandlers((r=e,i=t,function(e){if(T.aspectRatio)switch(r){case"e":case"w":e[1]=i.y+1;break;case"n":case"s":e[0]=i.x+1}else switch(r){case"e":case"w":e[1]=i.y2;break;case"n":case"s":e[0]=i.x2}M.setCurrent(e),k.update()}),N,a)}function L(e){switch(e){case"n":return"sw";case"s":case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function B(t){return function(e){return T.disabled||"move"===t&&!T.allowMove||(x=l(A),o=!0,H(t,a(e)),e.stopPropagation(),e.preventDefault()),!1}}function E(e,t,a){var o=e.width(),r=e.height();a<(r=tT.minSelect[0]&&t.h>T.minSelect[1]?(k.enableHandles(),k.done()):k.release(),_.setCursor(T.allowSelect?"crosshair":"default")}function J(e){var t;return T.disabled||T.allowSelect&&(o=!0,x=l(A),k.disableHandles(),_.setCursor("crosshair"),t=a(e),M.setPressed(t),k.update(),_.activateHandlers(V,N,"touch"===e.type.substring(0,5)),fe.watchKeys(),e.stopPropagation(),e.preventDefault()),!1}function V(e){M.setCurrent(e),k.update()}function U(){var e=Me("
").addClass(I("tracker"));return de&&e.css({opacity:0,backgroundColor:"white"}),e}function G(e){K([e[0]/b,e[1]/v,e[2]/b,e[3]/v]),T.onSelect.call(D,q(M.getFixed())),k.enableHandles()}function K(e){M.setPressed([e[0],e[1]]),M.setCurrent([e[2],e[3]]),k.update()}function W(){T.disabled=!0,k.disableHandles(),k.setCursor("default"),_.setCursor("default")}function Y(){T.disabled=!1,X()}function Q(e,t,a){t=t||T.bgColor;T.bgFade&&Me.fx.step.hasOwnProperty("backgroundColor")&&T.fadeTime&&!a?e.animate({backgroundColor:t},{queue:!1,duration:T.fadeTime}):e.css("backgroundColor",t)}function X(e){T.allowResize?e?k.enableOnly():k.enableHandles():k.disableHandles(),_.setCursor(T.allowSelect?"crosshair":"default"),k.setCursor(T.allowMove?"move":"default"),T.hasOwnProperty("trueSize")&&(b=T.trueSize[0]/y,v=T.trueSize[1]/C),T.hasOwnProperty("setSelect")&&(G(T.setSelect),k.done(),delete T.setSelect),O.refresh(),T.bgColor!=he&&(Q(T.shade?O.getShades():c,T.shade&&T.shadeColor||T.bgColor),he=T.bgColor),pe!=T.bgOpacity&&(pe=T.bgOpacity,T.shade?O.refresh():k.setBgOpacity(pe)),p=T.maxSize[0]||0,Z=T.maxSize[1]||0,$=T.minSize[0]||0,ee=T.minSize[1]||0,T.hasOwnProperty("outerImage")&&(A.attr("src",T.outerImage),delete T.outerImage),k.refresh()}var A,p,Z,$,ee,b,v,o,te,r,ae,oe,re,ie,i,n,s,ne,se,f,m,g,w,T=Me.extend({},Me.Jcrop.defaults),le=navigator.userAgent.toLowerCase(),de=/msie/.test(le),le=/msie [1-6]\./.test(le),t=("object"!=Oe(e)&&(e=Me(e)[0]),j(t="object"!=Oe(t)?{}:t),{border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0}),d=Me(e),ce=!0,y=("IMG"==e.tagName?(0!=d[0].width&&0!=d[0].height?(d.width(d[0].width),d.height(d[0].height)):((ae=new Image).src=d[0].src,d.width(ae.width),d.height(ae.height)),(A=d.clone().removeAttr("id").css(t).show()).width(d.width()),A.height(d.height()),d.after(A).hide()):(A=d.css(t).show(),ce=!1,null===T.shade&&(T.shade=!0)),E(A,T.boxWidth,T.boxHeight),A.width()),C=A.height(),c=Me("
").width(y).height(C).addClass(I("holder")).css({position:"relative",backgroundColor:T.bgColor}).insertAfter(d).append(A),z=(T.addClass&&c.addClass(T.addClass),Me("
")),ue=Me("
").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),P=Me("
").width("100%").height("100%").css("zIndex",320),F=Me("
").css({position:"absolute",zIndex:600}).dblclick(function(){var e=M.getFixed();T.onDblClick.call(D,e)}).insertBefore(A).append(ue,P),u=(ce&&(z=Me("").attr("src",A.attr("src")).css(t).width(y).height(C),ue.append(z)),le&&F.css({overflowY:"hidden"}),T.boundary),h=U().width(y+2*u).height(C+2*u).css({position:"absolute",top:S(-u),left:S(-u),zIndex:290}).mousedown(J),he=T.bgColor,pe=T.bgOpacity,x=l(A),R={createDragger:function(t){return function(e){return T.disabled||"move"===t&&!T.allowMove||(x=l(A),o=!0,H(t,a(R.cfilter(e)),!0),e.stopPropagation(),e.preventDefault()),!1}},newSelection:function(e){return J(R.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:Re,support:!0===T.touchSupport||!1===T.touchSupport?T.touchSupport:Re()},M=(w=g=m=f=0,{flipCoords:Pe,setPressed:function(e){e=ze(e),g=f=e[0],w=m=e[1]},setCurrent:function(e){e=ze(e),ne=e[0]-g,se=e[1]-w,g=e[0],w=e[1]},getOffset:function(){return[ne,se]},moveOffset:function(e){var t=e[0],e=e[1];f+t<0&&(t-=t+f),m+e<0&&(e-=e+m),C").css({position:"absolute",zIndex:240,opacity:0}),s={top:xe(),left:xe().height(C),right:xe().height(C),bottom:xe()},{update:ye,updateRaw:Ce,getShades:Ae,setBgColor:_e,enable:ke,disable:Se,resize:function(e,t){s.left.css({height:S(t)}),s.right.css({height:S(t)})},refresh:function(){(T.shade?ke:Se)(),k.isAwake()&&Ie(T.bgOpacity)},opacity:Ie}),k=function(){function e(e,t){t=Me("
").mousedown(B(e)).css({cursor:e+"-resize",position:"absolute",zIndex:t}).addClass("ord-"+e);return R.support&&t.bind("touchstart.jcrop",R.createDragger(e)),P.append(t),t}function t(){var e=M.getFixed();M.setPressed([e.x,e.y]),M.setCurrent([e.x2,e.y2]),a()}function a(e){if(l)return o(e)}function o(e){var t,a,o=M.getFixed();t=o.w,a=o.h,F.width(Math.round(t)).height(Math.round(a)),t=o.x,a=o.y,T.shade||z.css({top:S(-a),left:S(-t)}),F.css({top:S(a),left:S(t)}),T.shade&&O.updateRaw(o),l||(F.show(),T.shade?O.opacity(pe):r(pe,!0),l=!0),(e?T.onSelect:T.onChange).call(D,q(o))}function r(e,t,a){(l||t)&&(T.bgFade&&!a?A.animate({opacity:e},{queue:!1,duration:T.fadeTime}):A.css("opacity",e))}function i(){if(p=!0,T.allowResize)return P.show(),!0}function n(){p=!1,P.hide()}function s(e){(e?(te=!0,n):(te=!1,i))()}var l,d=370,c={},u={},h={},p=!1;if(T.dragEdges&&Me.isArray(T.createDragbars))for(var f=T.createDragbars,m=0;m").css({position:"absolute",opacity:T.borderOpacity}).addClass(I(x)),ue.append(x),x)}Me(document).bind("touchstart.jcrop-ios",function(e){Me(e.currentTarget).hasClass("jcrop-tracker")&&e.stopPropagation()});var _=U().mousedown(B("move")).css({cursor:"move",position:"absolute",zIndex:360});return R.support&&_.bind("touchstart.jcrop",R.createDragger("move")),ue.append(_),n(),{updateVisible:a,update:o,release:function(){n(),F.hide(),T.shade?O.opacity(1):r(1),l=!1,T.onRelease.call(D)},refresh:t,isAwake:function(){return l},setCursor:function(e){_.css("cursor",e)},enableHandles:i,enableOnly:function(){p=!0},showHandles:function(){p&&P.show()},disableHandles:n,animMode:s,setBgOpacity:r,done:function(){s(!1),t()}}}(),_=(oe=function(){},re=function(){},(ie=T.trackDocument)||h.mousemove(ge).mouseup(be).mouseout(be),A.before(h),{activateHandlers:function(e,t,a){return o=!0,oe=e,re=t,e=a,h.css({zIndex:450}),e?Me(document).bind("touchmove.jcrop",ve).bind("touchend.jcrop",we):ie&&Me(document).bind("mousemove.jcrop",ge).bind("mouseup.jcrop",be),!1},setCursor:function(e){h.css("cursor",e)}}),fe=(r=Me('').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),ae=Me("
").css({position:"absolute",overflow:"hidden"}).append(r),T.keySupport&&(r.keydown(function(e){if(e.ctrlKey||e.metaKey)return!0;var t=!!e.shiftKey?10:1;switch(e.keyCode){case 37:me(e,-t,0);break;case 39:me(e,t,0);break;case 38:me(e,0,-t);break;case 40:me(e,0,t);break;case 27:T.allowSelect&&k.release();break;case 9:return!0}return!1}).blur(function(e){r.hide()}),(le||!T.fixedSupport?(r.css({position:"absolute",left:"-20px"}),ae.append(r)):r).insertBefore(A)),{watchKeys:function(){T.keySupport&&(r.show(),r.focus())}});function me(e,t,a){T.allowMove&&(M.moveOffset([t,a]),k.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function ge(e){return oe(a(e)),!1}function be(e){return e.preventDefault(),e.stopPropagation(),o&&(o=!1,re(a(e)),k.isAwake()&&T.onSelect.call(D,q(M.getFixed())),h.css({zIndex:290}),Me(document).unbind(".jcrop"),oe=function(){},re=function(){}),!1}function ve(e){return oe(a(R.cfilter(e))),!1}function we(e){return be(R.cfilter(e))}function ye(){return Ce(M.getFixed())}function Ce(e){s.top.css({left:S(e.x),width:S(e.w),height:S(e.y)}),s.bottom.css({top:S(e.y2),left:S(e.x),width:S(e.w),height:S(C-e.y2)}),s.right.css({left:S(e.x2),width:S(y-e.x2)}),s.left.css({width:S(e.x)})}function xe(){return Me("
").css({position:"absolute",backgroundColor:T.shadeColor||T.bgColor}).appendTo(n)}function ke(){i||(i=!0,n.insertBefore(A),ye(),k.setBgOpacity(1,0,1),z.hide(),_e(T.shadeColor||T.bgColor,1),k.isAwake()?Ie(T.bgOpacity,1):Ie(1,1))}function _e(e,t){Q(Ae(),e,t)}function Se(){i&&(n.remove(),z.show(),i=!1,k.isAwake()?k.setBgOpacity(T.bgOpacity,1,1):(k.setBgOpacity(1,1,1),k.disableHandles()),Q(c,0,1))}function Ie(e,t){i&&(T.bgFade&&!t?n.animate({opacity:1-e},{queue:!1,duration:T.fadeTime}):n.css({opacity:1-e}))}function Ae(){return n.children()}function Te(){var e,t,a,o,r,i,n,s,l,d,c,u,h;return T.aspectRatio?(t=T.aspectRatio,a=T.minSize[0]/b,o=T.maxSize[0]/b,r=T.maxSize[1]/v,i=g-f,n=w-m,s=Math.abs(i),l=Math.abs(n),0===o&&(o=10*y),0==r&&(r=10*C),s/lp&&(g=0Z&&(w=0y&&(e[0]=y),e[1]>C&&(e[1]=C),[Math.round(e[0]),Math.round(e[1])]}function Pe(e,t,a,o){var r=e,i=a,n=t,s=o;return a{var u=a(9755),h=a(4614).default;a(1703),a(6647),a(8309),a(2564),function(){var i,a,p,n,r,o,e,t,s,l={version:"2.3.3",name:"jQuery-runner"},d=u;if(!d||!d.fn)throw new Error("["+l.name+"] jQuery or jQuery-like library is required for this plugin to work");function c(e,t,a){var o;if(!(this instanceof c))return new c(e,t,a);this.items=e,o=this.id=r(),this.settings=d.extend({},this.settings,t),n[o]=this,e.each(function(e,t){d(t).data("runner",o)}),this.value(this.settings.startAt),(a||this.settings.autostart)&&this.start()}n={},p=function(e){return(e<10?"0":"")+e},e=1,r=function(){return"runner"+e++},o=(t=this)["r"+(s="equestAnimationFrame")]||t["webkitR"+s]||t["mozR"+s]||t["msR"+s]||function(e){return setTimeout(e,30)},c.prototype.running=!(a=function(e,t){var a,o,r,i,n,s,l,d=["",":",":","."],c=o="",u=(t=t||{}).milliseconds,h=(i=[36e5,6e4,1e3,10]).length;for(e<(n=0)&&(e=Math.abs(e),o="-"),a=s=0,l=i.length;s=a)&&(this.total=a,this.finished=!0,this.stop(),this.fire("runnerFinish")),this.value(this.total),this.updating=!1)},c.prototype.fire=function(e){this.items.trigger(e,this.info())},c.prototype.start=function(){var e,t;this.running||(this.running=!0,this.startTime&&!this.finished||this.reset(),this.lastTime=d.now(),t=this,o(e=function(){t.running&&(t.update(),o(e))}),this.fire("runnerStart"))},c.prototype.stop=function(){this.running&&(this.running=!1,this.update(),this.fire("runnerStop"))},c.prototype.toggle=function(){this.running?this.stop():this.start()},c.prototype.lap=function(){var e=this.lastTime,t=e-this.lapTime;return this.settings.countdown&&(t=-t),(this.running||t)&&(this.lastLap=t,this.lapTime=e),e=this.format(this.lastLap),this.fire("runnerLap"),e},c.prototype.reset=function(e){e&&this.stop(),e=d.now(),"number"!=typeof this.settings.startAt||this.settings.countdown||(e-=this.settings.startAt),this.startTime=this.lapTime=this.lastTime=e,this.total=this.settings.startAt,this.value(this.total),this.finished=!1,this.fire("runnerReset")},c.prototype.info=function(){var e=this.lastLap||0;return{running:this.running,finished:this.finished,time:this.total,formattedTime:this.format(this.total),startTime:this.startTime,lapTime:e,formattedLapTime:this.format(e),settings:this.settings}},i=c,d.fn.runner=function(e,t,a){var o,r;switch("object"===h(e=e||"init")&&(a=t,t=e,e="init"),r=!!(o=this.data("runner"))&&n[o],e){case"init":new i(this,t,a);break;case"info":if(r)return r.info();break;case"reset":r&&r.reset(t);break;case"lap":if(r)return r.lap();break;case"start":case"stop":case"toggle":if(r)return r[e]();break;case"version":return l.version;default:d.error("["+l.name+"] Method "+e+" does not exist")}return this},d.fn.runner.format=a}.call(window)},4883:()=>{tinymce.addI18n("pt_BR",{Redo:"Refazer",Undo:"Desfazer",Cut:"Recortar",Copy:"Copiar",Paste:"Colar","Select all":"Selecionar tudo","New document":"Novo documento",Ok:"Ok",Cancel:"Cancelar","Visual aids":"Ajuda visual",Bold:"Negrito",Italic:"Itálico",Underline:"Sublinhar",Strikethrough:"Riscar",Superscript:"Sobrescrito",Subscript:"Subscrever","Clear formatting":"Limpar formatação","Align left":"Alinhar à esquerda","Align center":"Centralizar","Align right":"Alinhar à direita",Justify:"Justificar","Bullet list":"Lista não ordenada","Numbered list":"Lista ordenada","Decrease indent":"Diminuir recuo","Increase indent":"Aumentar recuo",Close:"Fechar",Formats:"Formatos","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"Seu navegador não suporta acesso direto à área de transferência. Por favor use os atalhos Ctrl+X - C - V do teclado",Headers:"Cabeçalhos","Header 1":"Cabeçalho 1","Header 2":"Cabeçalho 2","Header 3":"Cabeçalho 3","Header 4":"Cabeçalho 4","Header 5":"Cabeçalho 5","Header 6":"Cabeçalho 6",Headings:"Cabeçalhos","Heading 1":"Cabeçalho 1","Heading 2":"Cabeçalho 2","Heading 3":"Cabeçalho 3","Heading 4":"Cabeçalho 4","Heading 5":"Cabeçalho 5","Heading 6":"Cabeçalho 6",Preformatted:"Preformatado",Div:"Container",Pre:"Pre",Code:"Código",Paragraph:"Parágrafo",Blockquote:"Aspas",Inline:"Em linha",Blocks:"Blocos","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"O comando colar está agora em modo texto plano. O conteúdo será colado como texto plano até você desligar esta opção.","Font Family":"Fonte","Font Sizes":"Tamanho",Class:"Classe","Browse for an image":"Procure uma imagem",OR:"OU","Drop an image here":"Arraste uma imagem aqui",Upload:"Carregar",Block:"Bloco",Align:"Alinhamento",Default:"Padrão",Circle:"Círculo",Disc:"Disco",Square:"Quadrado","Lower Alpha":"a. b. c. ...","Lower Greek":"α. β. γ. ...","Lower Roman":"i. ii. iii. ...","Upper Alpha":"A. B. C. ...","Upper Roman":"I. II. III. ...",Anchor:"Âncora",Name:"Nome",Id:"Id","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"Id deve começar com uma letra, seguido apenas por letras, números, traços, pontos, dois pontos ou sublinhados.","You have unsaved changes are you sure you want to navigate away?":"Você tem mudanças não salvas. Você tem certeza que deseja sair?","Restore last draft":"Restaurar último rascunho","Special character":"Caracteres especiais","Source code":"Código fonte","Insert/Edit code sample":"Inserir/Editar código de exemplo",Language:"Idioma","Code sample":"Exemplo de código",Color:"Cor",R:"R",G:"G",B:"B","Left to right":"Da esquerda para a direita","Right to left":"Da direita para a esquerda",Emoticons:"Emoticons","Document properties":"Propriedades do documento",Title:"Título",Keywords:"Palavras-chave",Description:"Descrição",Robots:"Robôs",Author:"Autor",Encoding:"Codificação",Fullscreen:"Tela cheia",Action:"Ação",Shortcut:"Atalho",Help:"Ajuda",Address:"Endereço","Focus to menubar":"Foco no menu","Focus to toolbar":"Foco na barra de ferramentas","Focus to element path":"Foco no caminho do elemento","Focus to contextual toolbar":"Foco na barra de ferramentas contextual","Insert link (if link plugin activated)":"Inserir link (se o plugin de link estiver ativado)","Save (if save plugin activated)":"Salvar (se o plugin de salvar estiver ativado)","Find (if searchreplace plugin activated)":"Procurar (se o plugin de procurar e substituir estiver ativado)","Plugins installed ({0}):":"Plugins instalados ({0}):","Premium plugins:":"Plugins premium:","Learn more...":"Saiba mais...","You are using {0}":"Você está usando {0}",Plugins:"Plugins","Handy Shortcuts":"Atalhos úteis","Horizontal line":"Linha horizontal","Insert/edit image":"Inserir/editar imagem","Image description":"Inserir descrição",Source:"Endereço da imagem",Dimensions:"Dimensões","Constrain proportions":"Manter proporções",General:"Geral",Advanced:"Avançado",Style:"Estilo","Vertical space":"Espaçamento vertical","Horizontal space":"Espaçamento horizontal",Border:"Borda","Insert image":"Inserir imagem",Image:"Imagem","Image list":"Lista de Imagens","Rotate counterclockwise":"Girar em sentido horário","Rotate clockwise":"Girar em sentido anti-horário","Flip vertically":"Virar verticalmente","Flip horizontally":"Virar horizontalmente","Edit image":"Editar imagem","Image options":"Opções de Imagem","Zoom in":"Aumentar zoom","Zoom out":"Diminuir zoom",Crop:"Cortar",Resize:"Redimensionar",Orientation:"Orientação",Brightness:"Brilho",Sharpen:"Aumentar nitidez",Contrast:"Contraste","Color levels":"Níveis de cor",Gamma:"Gama",Invert:"Inverter",Apply:"Aplicar",Back:"Voltar","Insert date/time":"Inserir data/hora","Date/time":"data/hora","Insert link":"Inserir link","Insert/edit link":"Inserir/editar link","Text to display":"Texto para mostrar",Url:"Url",Target:"Alvo",None:"Nenhum","New window":"Nova janela","Remove link":"Remover link",Anchors:"Âncoras",Link:"Link","Paste or type a link":"Cole ou digite um Link","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"A URL que você informou parece ser um link externo. Deseja incluir o prefixo http://?","Link list":"Lista de Links","Insert video":"Inserir vídeo","Insert/edit video":"Inserir/editar vídeo","Insert/edit media":"Inserir/editar imagem","Alternative source":"Fonte alternativa",Poster:"Autor","Paste your embed code below:":"Insira o código de incorporação abaixo:",Embed:"Incorporar",Media:"imagem","Nonbreaking space":"Espaço não separável","Page break":"Quebra de página","Paste as text":"Colar como texto",Preview:"Pré-visualizar",Print:"Imprimir",Save:"Salvar",Find:"Localizar","Replace with":"Substituir por",Replace:"Substituir","Replace all":"Substituir tudo",Prev:"Anterior",Next:"Próximo","Find and replace":"Localizar e substituir","Could not find the specified string.":"Não foi possível encontrar o termo especificado","Match case":"Diferenciar maiúsculas e minúsculas","Whole words":"Palavras inteiras",Spellcheck:"Corretor ortográfico",Ignore:"Ignorar","Ignore all":"Ignorar tudo",Finish:"Finalizar","Add to Dictionary":"Adicionar ao Dicionário","Insert table":"Inserir tabela","Table properties":"Propriedades da tabela","Delete table":"Excluir tabela",Cell:"Célula",Row:"Linha",Column:"Coluna","Cell properties":"Propriedades da célula","Merge cells":"Agrupar células","Split cell":"Dividir célula","Insert row before":"Inserir linha antes","Insert row after":"Inserir linha depois","Delete row":"Excluir linha","Row properties":"Propriedades da linha","Cut row":"Recortar linha","Copy row":"Copiar linha","Paste row before":"Colar linha antes","Paste row after":"Colar linha depois","Insert column before":"Inserir coluna antes","Insert column after":"Inserir coluna depois","Delete column":"Excluir coluna",Cols:"Colunas",Rows:"Linhas",Width:"Largura",Height:"Altura","Cell spacing":"Espaçamento da célula","Cell padding":"Espaçamento interno da célula",Caption:"Legenda",Left:"Esquerdo",Center:"Centro",Right:"Direita","Cell type":"Tipo de célula",Scope:"Escopo",Alignment:"Alinhamento","H Align":"Alinhamento H","V Align":"Alinhamento V",Top:"Superior",Middle:"Meio",Bottom:"Inferior","Header cell":"Célula cabeçalho","Row group":"Agrupar linha","Column group":"Agrupar coluna","Row type":"Tipo de linha",Header:"Cabeçalho",Body:"Corpo",Footer:"Rodapé","Border color":"Cor da borda","Insert template":"Inserir modelo",Templates:"Modelos",Template:"Modelo","Text color":"Cor do texto","Background color":"Cor do fundo","Custom...":"Personalizado...","Custom color":"Cor personalizada","No color":"Nenhuma cor","Table of Contents":"índice de Conteúdo","Show blocks":"Mostrar blocos","Show invisible characters":"Exibir caracteres invisíveis","Words: {0}":"Palavras: {0}","{0} words":"{0} palavras",File:"Arquivo",Edit:"Editar",Insert:"Inserir",View:"Visualizar",Format:"Formatar",Table:"Tabela",Tools:"Ferramentas","Powered by {0}":"Distribuído por {0}","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Área de texto formatado. Pressione ALT-F9 para exibir o menu, ALT-F10 para exibir a barra de ferramentas ou ALT-0 para exibir a ajuda"})},6746:(e,t,a)=>{"use strict";a(6992),a(8674),a(9601),a(7727),a(3734),a(6688),a(5476),a(2466),a(2526),a(4414),a(2993),a(13);var o=a(381),r=(a(7971),a(7575)),r=a.n(r),r=(a(8860),a(6890),a(7490),a(8190),a(4400),a(2682),a(6552),a(8619),a(4883),window.tinymce=r(),window.initTextRichEditor=function(e){e={selector:null==e?"textarea":e,language:"pt_BR",branding:!1,forced_root_block:"p",plugins:"table lists advlist link code",toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | code",menubar:"file edit view insert format table"};1{if(!t){for(var r=1/0,i=0;iu.O[e](t[l]))?t.splice(l--,1):(s=!1,oo;i--)d[i]=d[i-1];d[i]=[t,a,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),u.j=172,c={172:0},u.O.j=e=>0===c[e],t=(e,t)=>{var a,o,r,[i,n,s]=t,l=0;if(i.some(e=>0!==c[e])){for(a in n)u.o(n,a)&&(u.m[a]=n[a]);s&&(r=s(u))}for(e&&e(t);lu(6746));u.O(t)})(); \ No newline at end of file +/*! For license information please see global.f01dd32a.js.LICENSE.txt */ +(()=>{var d,c,e,a={4391:(e,t,a)=>{var o={"./pt-br":7971,"./pt-br.js":7971,"moment/locale/pt-br":7971,"moment/locale/pt-br.js":7971};function r(e){e=i(e);return a(e)}function i(e){if(a.o(o,e))return o[e];throw(e=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",e}r.keys=function(){return Object.keys(o)},r.resolve=i,(e.exports=r).id=4391},2717:(e,t,a)=>{var i=a(9755),o=a(6486);a(4916),a(3123),a(3210),a(9554),a(1539),a(4747),window.refreshDatePicker=function(){i.datepicker.setDefaults(i.datepicker.regional["pt-BR"]),i(".dateinput").datepicker();var e=document.querySelectorAll(".dateinput");o.each(e,function(e,t){e.setAttribute("autocomplete","off")})},window.getCookie=function(e){var t=null;if(document.cookie&&""!==document.cookie)for(var a=document.cookie.split(";"),o=0;oNenhum resultado")):(t=i('
"),u.parent().find(".help").length?h.insertBefore(u.parent().find(".help")):h.appendTo(u.parent()),p("#"+c).click(function(){l=!0===l?(u.val(u.val().substr(1)),f[e].setSelect(u.val().split(",")),!1):(u.val("-"+u.val()),f[e].release(),!0)}),u.parent().find(".jcrop-tracker").mousedown(function(){l&&(p("#"+c).attr("checked","checked"),l=!1)}))):u.hide().parents("div.form-row:first").hide()})},jcrop:f={}});window.image_cropping=i,o(function(){r(function(){i.init()})})},4717:(e,t,a)=>{var Me,o=a(9755),Oe=a(4614).default;a(2564),a(4916),a(7601),a(4812),(Me=o).Jcrop=function(e,t){function S(e){return Math.round(e)+"px"}function I(e){return T.baseClass+"-"+e}function l(e){e=Me(e).offset();return[e.left,e.top]}function a(e){return[e.pageX-x[0],e.pageY-x[1]]}function j(e){"object"!=Oe(e)&&(e={}),T=Me.extend(T,e),Me.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){"function"!=typeof T[t]&&(T[t]=function(){})})}function H(e,t,a){if(x=l(A),_.setCursor("move"===e?e:e+"-resize"),"move"===e)return _.activateHandlers((o=t,fe.watchKeys(),function(e){M.moveOffset([e[0]-o[0],e[1]-o[1]]),o=e,k.update()}),N,a);var o,r,i,t=M.getFixed(),n=L(e),s=M.getCorner(L(n));M.setPressed(M.getCorner(n)),M.setCurrent(s),_.activateHandlers((r=e,i=t,function(e){if(T.aspectRatio)switch(r){case"e":case"w":e[1]=i.y+1;break;case"n":case"s":e[0]=i.x+1}else switch(r){case"e":case"w":e[1]=i.y2;break;case"n":case"s":e[0]=i.x2}M.setCurrent(e),k.update()}),N,a)}function L(e){switch(e){case"n":return"sw";case"s":case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function B(t){return function(e){return T.disabled||"move"===t&&!T.allowMove||(x=l(A),o=!0,H(t,a(e)),e.stopPropagation(),e.preventDefault()),!1}}function E(e,t,a){var o=e.width(),r=e.height();a<(r=tT.minSelect[0]&&t.h>T.minSelect[1]?(k.enableHandles(),k.done()):k.release(),_.setCursor(T.allowSelect?"crosshair":"default")}function J(e){var t;return T.disabled||T.allowSelect&&(o=!0,x=l(A),k.disableHandles(),_.setCursor("crosshair"),t=a(e),M.setPressed(t),k.update(),_.activateHandlers(V,N,"touch"===e.type.substring(0,5)),fe.watchKeys(),e.stopPropagation(),e.preventDefault()),!1}function V(e){M.setCurrent(e),k.update()}function U(){var e=Me("
").addClass(I("tracker"));return de&&e.css({opacity:0,backgroundColor:"white"}),e}function G(e){K([e[0]/b,e[1]/v,e[2]/b,e[3]/v]),T.onSelect.call(D,q(M.getFixed())),k.enableHandles()}function K(e){M.setPressed([e[0],e[1]]),M.setCurrent([e[2],e[3]]),k.update()}function W(){T.disabled=!0,k.disableHandles(),k.setCursor("default"),_.setCursor("default")}function Y(){T.disabled=!1,X()}function Q(e,t,a){t=t||T.bgColor;T.bgFade&&Me.fx.step.hasOwnProperty("backgroundColor")&&T.fadeTime&&!a?e.animate({backgroundColor:t},{queue:!1,duration:T.fadeTime}):e.css("backgroundColor",t)}function X(e){T.allowResize?e?k.enableOnly():k.enableHandles():k.disableHandles(),_.setCursor(T.allowSelect?"crosshair":"default"),k.setCursor(T.allowMove?"move":"default"),T.hasOwnProperty("trueSize")&&(b=T.trueSize[0]/y,v=T.trueSize[1]/C),T.hasOwnProperty("setSelect")&&(G(T.setSelect),k.done(),delete T.setSelect),O.refresh(),T.bgColor!=he&&(Q(T.shade?O.getShades():c,T.shade&&T.shadeColor||T.bgColor),he=T.bgColor),pe!=T.bgOpacity&&(pe=T.bgOpacity,T.shade?O.refresh():k.setBgOpacity(pe)),p=T.maxSize[0]||0,Z=T.maxSize[1]||0,$=T.minSize[0]||0,ee=T.minSize[1]||0,T.hasOwnProperty("outerImage")&&(A.attr("src",T.outerImage),delete T.outerImage),k.refresh()}var A,p,Z,$,ee,b,v,o,te,r,ae,oe,re,ie,i,n,s,ne,se,f,m,g,w,T=Me.extend({},Me.Jcrop.defaults),le=navigator.userAgent.toLowerCase(),de=/msie/.test(le),le=/msie [1-6]\./.test(le),t=("object"!=Oe(e)&&(e=Me(e)[0]),j(t="object"!=Oe(t)?{}:t),{border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0}),d=Me(e),ce=!0,y=("IMG"==e.tagName?(0!=d[0].width&&0!=d[0].height?(d.width(d[0].width),d.height(d[0].height)):((ae=new Image).src=d[0].src,d.width(ae.width),d.height(ae.height)),(A=d.clone().removeAttr("id").css(t).show()).width(d.width()),A.height(d.height()),d.after(A).hide()):(A=d.css(t).show(),ce=!1,null===T.shade&&(T.shade=!0)),E(A,T.boxWidth,T.boxHeight),A.width()),C=A.height(),c=Me("
").width(y).height(C).addClass(I("holder")).css({position:"relative",backgroundColor:T.bgColor}).insertAfter(d).append(A),z=(T.addClass&&c.addClass(T.addClass),Me("
")),ue=Me("
").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),P=Me("
").width("100%").height("100%").css("zIndex",320),F=Me("
").css({position:"absolute",zIndex:600}).dblclick(function(){var e=M.getFixed();T.onDblClick.call(D,e)}).insertBefore(A).append(ue,P),u=(ce&&(z=Me("").attr("src",A.attr("src")).css(t).width(y).height(C),ue.append(z)),le&&F.css({overflowY:"hidden"}),T.boundary),h=U().width(y+2*u).height(C+2*u).css({position:"absolute",top:S(-u),left:S(-u),zIndex:290}).mousedown(J),he=T.bgColor,pe=T.bgOpacity,x=l(A),R={createDragger:function(t){return function(e){return T.disabled||"move"===t&&!T.allowMove||(x=l(A),o=!0,H(t,a(R.cfilter(e)),!0),e.stopPropagation(),e.preventDefault()),!1}},newSelection:function(e){return J(R.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:Re,support:!0===T.touchSupport||!1===T.touchSupport?T.touchSupport:Re()},M=(w=g=m=f=0,{flipCoords:Pe,setPressed:function(e){e=ze(e),g=f=e[0],w=m=e[1]},setCurrent:function(e){e=ze(e),ne=e[0]-g,se=e[1]-w,g=e[0],w=e[1]},getOffset:function(){return[ne,se]},moveOffset:function(e){var t=e[0],e=e[1];f+t<0&&(t-=t+f),m+e<0&&(e-=e+m),C").css({position:"absolute",zIndex:240,opacity:0}),s={top:xe(),left:xe().height(C),right:xe().height(C),bottom:xe()},{update:ye,updateRaw:Ce,getShades:Ae,setBgColor:_e,enable:ke,disable:Se,resize:function(e,t){s.left.css({height:S(t)}),s.right.css({height:S(t)})},refresh:function(){(T.shade?ke:Se)(),k.isAwake()&&Ie(T.bgOpacity)},opacity:Ie}),k=function(){function e(e,t){t=Me("
").mousedown(B(e)).css({cursor:e+"-resize",position:"absolute",zIndex:t}).addClass("ord-"+e);return R.support&&t.bind("touchstart.jcrop",R.createDragger(e)),P.append(t),t}function t(){var e=M.getFixed();M.setPressed([e.x,e.y]),M.setCurrent([e.x2,e.y2]),a()}function a(e){if(l)return o(e)}function o(e){var t,a,o=M.getFixed();t=o.w,a=o.h,F.width(Math.round(t)).height(Math.round(a)),t=o.x,a=o.y,T.shade||z.css({top:S(-a),left:S(-t)}),F.css({top:S(a),left:S(t)}),T.shade&&O.updateRaw(o),l||(F.show(),T.shade?O.opacity(pe):r(pe,!0),l=!0),(e?T.onSelect:T.onChange).call(D,q(o))}function r(e,t,a){(l||t)&&(T.bgFade&&!a?A.animate({opacity:e},{queue:!1,duration:T.fadeTime}):A.css("opacity",e))}function i(){if(p=!0,T.allowResize)return P.show(),!0}function n(){p=!1,P.hide()}function s(e){(e?(te=!0,n):(te=!1,i))()}var l,d=370,c={},u={},h={},p=!1;if(T.dragEdges&&Me.isArray(T.createDragbars))for(var f=T.createDragbars,m=0;m").css({position:"absolute",opacity:T.borderOpacity}).addClass(I(x)),ue.append(x),x)}Me(document).bind("touchstart.jcrop-ios",function(e){Me(e.currentTarget).hasClass("jcrop-tracker")&&e.stopPropagation()});var _=U().mousedown(B("move")).css({cursor:"move",position:"absolute",zIndex:360});return R.support&&_.bind("touchstart.jcrop",R.createDragger("move")),ue.append(_),n(),{updateVisible:a,update:o,release:function(){n(),F.hide(),T.shade?O.opacity(1):r(1),l=!1,T.onRelease.call(D)},refresh:t,isAwake:function(){return l},setCursor:function(e){_.css("cursor",e)},enableHandles:i,enableOnly:function(){p=!0},showHandles:function(){p&&P.show()},disableHandles:n,animMode:s,setBgOpacity:r,done:function(){s(!1),t()}}}(),_=(oe=function(){},re=function(){},(ie=T.trackDocument)||h.mousemove(ge).mouseup(be).mouseout(be),A.before(h),{activateHandlers:function(e,t,a){return o=!0,oe=e,re=t,e=a,h.css({zIndex:450}),e?Me(document).bind("touchmove.jcrop",ve).bind("touchend.jcrop",we):ie&&Me(document).bind("mousemove.jcrop",ge).bind("mouseup.jcrop",be),!1},setCursor:function(e){h.css("cursor",e)}}),fe=(r=Me('').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),ae=Me("
").css({position:"absolute",overflow:"hidden"}).append(r),T.keySupport&&(r.keydown(function(e){if(e.ctrlKey||e.metaKey)return!0;var t=!!e.shiftKey?10:1;switch(e.keyCode){case 37:me(e,-t,0);break;case 39:me(e,t,0);break;case 38:me(e,0,-t);break;case 40:me(e,0,t);break;case 27:T.allowSelect&&k.release();break;case 9:return!0}return!1}).blur(function(e){r.hide()}),(le||!T.fixedSupport?(r.css({position:"absolute",left:"-20px"}),ae.append(r)):r).insertBefore(A)),{watchKeys:function(){T.keySupport&&(r.show(),r.focus())}});function me(e,t,a){T.allowMove&&(M.moveOffset([t,a]),k.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function ge(e){return oe(a(e)),!1}function be(e){return e.preventDefault(),e.stopPropagation(),o&&(o=!1,re(a(e)),k.isAwake()&&T.onSelect.call(D,q(M.getFixed())),h.css({zIndex:290}),Me(document).unbind(".jcrop"),oe=function(){},re=function(){}),!1}function ve(e){return oe(a(R.cfilter(e))),!1}function we(e){return be(R.cfilter(e))}function ye(){return Ce(M.getFixed())}function Ce(e){s.top.css({left:S(e.x),width:S(e.w),height:S(e.y)}),s.bottom.css({top:S(e.y2),left:S(e.x),width:S(e.w),height:S(C-e.y2)}),s.right.css({left:S(e.x2),width:S(y-e.x2)}),s.left.css({width:S(e.x)})}function xe(){return Me("
").css({position:"absolute",backgroundColor:T.shadeColor||T.bgColor}).appendTo(n)}function ke(){i||(i=!0,n.insertBefore(A),ye(),k.setBgOpacity(1,0,1),z.hide(),_e(T.shadeColor||T.bgColor,1),k.isAwake()?Ie(T.bgOpacity,1):Ie(1,1))}function _e(e,t){Q(Ae(),e,t)}function Se(){i&&(n.remove(),z.show(),i=!1,k.isAwake()?k.setBgOpacity(T.bgOpacity,1,1):(k.setBgOpacity(1,1,1),k.disableHandles()),Q(c,0,1))}function Ie(e,t){i&&(T.bgFade&&!t?n.animate({opacity:1-e},{queue:!1,duration:T.fadeTime}):n.css({opacity:1-e}))}function Ae(){return n.children()}function Te(){var e,t,a,o,r,i,n,s,l,d,c,u,h;return T.aspectRatio?(t=T.aspectRatio,a=T.minSize[0]/b,o=T.maxSize[0]/b,r=T.maxSize[1]/v,i=g-f,n=w-m,s=Math.abs(i),l=Math.abs(n),0===o&&(o=10*y),0==r&&(r=10*C),s/lp&&(g=0Z&&(w=0y&&(e[0]=y),e[1]>C&&(e[1]=C),[Math.round(e[0]),Math.round(e[1])]}function Pe(e,t,a,o){var r=e,i=a,n=t,s=o;return a{var u=a(9755),h=a(4614).default;a(1703),a(6647),a(8309),a(2564),function(){var i,a,p,n,r,o,e,t,s,l={version:"2.3.3",name:"jQuery-runner"},d=u;if(!d||!d.fn)throw new Error("["+l.name+"] jQuery or jQuery-like library is required for this plugin to work");function c(e,t,a){var o;if(!(this instanceof c))return new c(e,t,a);this.items=e,o=this.id=r(),this.settings=d.extend({},this.settings,t),n[o]=this,e.each(function(e,t){d(t).data("runner",o)}),this.value(this.settings.startAt),(a||this.settings.autostart)&&this.start()}n={},p=function(e){return(e<10?"0":"")+e},e=1,r=function(){return"runner"+e++},o=(t=this)["r"+(s="equestAnimationFrame")]||t["webkitR"+s]||t["mozR"+s]||t["msR"+s]||function(e){return setTimeout(e,30)},c.prototype.running=!(a=function(e,t){var a,o,r,i,n,s,l,d=["",":",":","."],c=o="",u=(t=t||{}).milliseconds,h=(i=[36e5,6e4,1e3,10]).length;for(e<(n=0)&&(e=Math.abs(e),o="-"),a=s=0,l=i.length;s=a)&&(this.total=a,this.finished=!0,this.stop(),this.fire("runnerFinish")),this.value(this.total),this.updating=!1)},c.prototype.fire=function(e){this.items.trigger(e,this.info())},c.prototype.start=function(){var e,t;this.running||(this.running=!0,this.startTime&&!this.finished||this.reset(),this.lastTime=d.now(),t=this,o(e=function(){t.running&&(t.update(),o(e))}),this.fire("runnerStart"))},c.prototype.stop=function(){this.running&&(this.running=!1,this.update(),this.fire("runnerStop"))},c.prototype.toggle=function(){this.running?this.stop():this.start()},c.prototype.lap=function(){var e=this.lastTime,t=e-this.lapTime;return this.settings.countdown&&(t=-t),(this.running||t)&&(this.lastLap=t,this.lapTime=e),e=this.format(this.lastLap),this.fire("runnerLap"),e},c.prototype.reset=function(e){e&&this.stop(),e=d.now(),"number"!=typeof this.settings.startAt||this.settings.countdown||(e-=this.settings.startAt),this.startTime=this.lapTime=this.lastTime=e,this.total=this.settings.startAt,this.value(this.total),this.finished=!1,this.fire("runnerReset")},c.prototype.info=function(){var e=this.lastLap||0;return{running:this.running,finished:this.finished,time:this.total,formattedTime:this.format(this.total),startTime:this.startTime,lapTime:e,formattedLapTime:this.format(e),settings:this.settings}},i=c,d.fn.runner=function(e,t,a){var o,r;switch("object"===h(e=e||"init")&&(a=t,t=e,e="init"),r=!!(o=this.data("runner"))&&n[o],e){case"init":new i(this,t,a);break;case"info":if(r)return r.info();break;case"reset":r&&r.reset(t);break;case"lap":if(r)return r.lap();break;case"start":case"stop":case"toggle":if(r)return r[e]();break;case"version":return l.version;default:d.error("["+l.name+"] Method "+e+" does not exist")}return this},d.fn.runner.format=a}.call(window)},4883:()=>{tinymce.addI18n("pt_BR",{Redo:"Refazer",Undo:"Desfazer",Cut:"Recortar",Copy:"Copiar",Paste:"Colar","Select all":"Selecionar tudo","New document":"Novo documento",Ok:"Ok",Cancel:"Cancelar","Visual aids":"Ajuda visual",Bold:"Negrito",Italic:"Itálico",Underline:"Sublinhar",Strikethrough:"Riscar",Superscript:"Sobrescrito",Subscript:"Subscrever","Clear formatting":"Limpar formatação","Align left":"Alinhar à esquerda","Align center":"Centralizar","Align right":"Alinhar à direita",Justify:"Justificar","Bullet list":"Lista não ordenada","Numbered list":"Lista ordenada","Decrease indent":"Diminuir recuo","Increase indent":"Aumentar recuo",Close:"Fechar",Formats:"Formatos","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"Seu navegador não suporta acesso direto à área de transferência. Por favor use os atalhos Ctrl+X - C - V do teclado",Headers:"Cabeçalhos","Header 1":"Cabeçalho 1","Header 2":"Cabeçalho 2","Header 3":"Cabeçalho 3","Header 4":"Cabeçalho 4","Header 5":"Cabeçalho 5","Header 6":"Cabeçalho 6",Headings:"Cabeçalhos","Heading 1":"Cabeçalho 1","Heading 2":"Cabeçalho 2","Heading 3":"Cabeçalho 3","Heading 4":"Cabeçalho 4","Heading 5":"Cabeçalho 5","Heading 6":"Cabeçalho 6",Preformatted:"Preformatado",Div:"Container",Pre:"Pre",Code:"Código",Paragraph:"Parágrafo",Blockquote:"Aspas",Inline:"Em linha",Blocks:"Blocos","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"O comando colar está agora em modo texto plano. O conteúdo será colado como texto plano até você desligar esta opção.","Font Family":"Fonte","Font Sizes":"Tamanho",Class:"Classe","Browse for an image":"Procure uma imagem",OR:"OU","Drop an image here":"Arraste uma imagem aqui",Upload:"Carregar",Block:"Bloco",Align:"Alinhamento",Default:"Padrão",Circle:"Círculo",Disc:"Disco",Square:"Quadrado","Lower Alpha":"a. b. c. ...","Lower Greek":"α. β. γ. ...","Lower Roman":"i. ii. iii. ...","Upper Alpha":"A. B. C. ...","Upper Roman":"I. II. III. ...",Anchor:"Âncora",Name:"Nome",Id:"Id","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"Id deve começar com uma letra, seguido apenas por letras, números, traços, pontos, dois pontos ou sublinhados.","You have unsaved changes are you sure you want to navigate away?":"Você tem mudanças não salvas. Você tem certeza que deseja sair?","Restore last draft":"Restaurar último rascunho","Special character":"Caracteres especiais","Source code":"Código fonte","Insert/Edit code sample":"Inserir/Editar código de exemplo",Language:"Idioma","Code sample":"Exemplo de código",Color:"Cor",R:"R",G:"G",B:"B","Left to right":"Da esquerda para a direita","Right to left":"Da direita para a esquerda",Emoticons:"Emoticons","Document properties":"Propriedades do documento",Title:"Título",Keywords:"Palavras-chave",Description:"Descrição",Robots:"Robôs",Author:"Autor",Encoding:"Codificação",Fullscreen:"Tela cheia",Action:"Ação",Shortcut:"Atalho",Help:"Ajuda",Address:"Endereço","Focus to menubar":"Foco no menu","Focus to toolbar":"Foco na barra de ferramentas","Focus to element path":"Foco no caminho do elemento","Focus to contextual toolbar":"Foco na barra de ferramentas contextual","Insert link (if link plugin activated)":"Inserir link (se o plugin de link estiver ativado)","Save (if save plugin activated)":"Salvar (se o plugin de salvar estiver ativado)","Find (if searchreplace plugin activated)":"Procurar (se o plugin de procurar e substituir estiver ativado)","Plugins installed ({0}):":"Plugins instalados ({0}):","Premium plugins:":"Plugins premium:","Learn more...":"Saiba mais...","You are using {0}":"Você está usando {0}",Plugins:"Plugins","Handy Shortcuts":"Atalhos úteis","Horizontal line":"Linha horizontal","Insert/edit image":"Inserir/editar imagem","Image description":"Inserir descrição",Source:"Endereço da imagem",Dimensions:"Dimensões","Constrain proportions":"Manter proporções",General:"Geral",Advanced:"Avançado",Style:"Estilo","Vertical space":"Espaçamento vertical","Horizontal space":"Espaçamento horizontal",Border:"Borda","Insert image":"Inserir imagem",Image:"Imagem","Image list":"Lista de Imagens","Rotate counterclockwise":"Girar em sentido horário","Rotate clockwise":"Girar em sentido anti-horário","Flip vertically":"Virar verticalmente","Flip horizontally":"Virar horizontalmente","Edit image":"Editar imagem","Image options":"Opções de Imagem","Zoom in":"Aumentar zoom","Zoom out":"Diminuir zoom",Crop:"Cortar",Resize:"Redimensionar",Orientation:"Orientação",Brightness:"Brilho",Sharpen:"Aumentar nitidez",Contrast:"Contraste","Color levels":"Níveis de cor",Gamma:"Gama",Invert:"Inverter",Apply:"Aplicar",Back:"Voltar","Insert date/time":"Inserir data/hora","Date/time":"data/hora","Insert link":"Inserir link","Insert/edit link":"Inserir/editar link","Text to display":"Texto para mostrar",Url:"Url",Target:"Alvo",None:"Nenhum","New window":"Nova janela","Remove link":"Remover link",Anchors:"Âncoras",Link:"Link","Paste or type a link":"Cole ou digite um Link","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"A URL que você informou parece ser um link externo. Deseja incluir o prefixo http://?","Link list":"Lista de Links","Insert video":"Inserir vídeo","Insert/edit video":"Inserir/editar vídeo","Insert/edit media":"Inserir/editar imagem","Alternative source":"Fonte alternativa",Poster:"Autor","Paste your embed code below:":"Insira o código de incorporação abaixo:",Embed:"Incorporar",Media:"imagem","Nonbreaking space":"Espaço não separável","Page break":"Quebra de página","Paste as text":"Colar como texto",Preview:"Pré-visualizar",Print:"Imprimir",Save:"Salvar",Find:"Localizar","Replace with":"Substituir por",Replace:"Substituir","Replace all":"Substituir tudo",Prev:"Anterior",Next:"Próximo","Find and replace":"Localizar e substituir","Could not find the specified string.":"Não foi possível encontrar o termo especificado","Match case":"Diferenciar maiúsculas e minúsculas","Whole words":"Palavras inteiras",Spellcheck:"Corretor ortográfico",Ignore:"Ignorar","Ignore all":"Ignorar tudo",Finish:"Finalizar","Add to Dictionary":"Adicionar ao Dicionário","Insert table":"Inserir tabela","Table properties":"Propriedades da tabela","Delete table":"Excluir tabela",Cell:"Célula",Row:"Linha",Column:"Coluna","Cell properties":"Propriedades da célula","Merge cells":"Agrupar células","Split cell":"Dividir célula","Insert row before":"Inserir linha antes","Insert row after":"Inserir linha depois","Delete row":"Excluir linha","Row properties":"Propriedades da linha","Cut row":"Recortar linha","Copy row":"Copiar linha","Paste row before":"Colar linha antes","Paste row after":"Colar linha depois","Insert column before":"Inserir coluna antes","Insert column after":"Inserir coluna depois","Delete column":"Excluir coluna",Cols:"Colunas",Rows:"Linhas",Width:"Largura",Height:"Altura","Cell spacing":"Espaçamento da célula","Cell padding":"Espaçamento interno da célula",Caption:"Legenda",Left:"Esquerdo",Center:"Centro",Right:"Direita","Cell type":"Tipo de célula",Scope:"Escopo",Alignment:"Alinhamento","H Align":"Alinhamento H","V Align":"Alinhamento V",Top:"Superior",Middle:"Meio",Bottom:"Inferior","Header cell":"Célula cabeçalho","Row group":"Agrupar linha","Column group":"Agrupar coluna","Row type":"Tipo de linha",Header:"Cabeçalho",Body:"Corpo",Footer:"Rodapé","Border color":"Cor da borda","Insert template":"Inserir modelo",Templates:"Modelos",Template:"Modelo","Text color":"Cor do texto","Background color":"Cor do fundo","Custom...":"Personalizado...","Custom color":"Cor personalizada","No color":"Nenhuma cor","Table of Contents":"índice de Conteúdo","Show blocks":"Mostrar blocos","Show invisible characters":"Exibir caracteres invisíveis","Words: {0}":"Palavras: {0}","{0} words":"{0} palavras",File:"Arquivo",Edit:"Editar",Insert:"Inserir",View:"Visualizar",Format:"Formatar",Table:"Tabela",Tools:"Ferramentas","Powered by {0}":"Distribuído por {0}","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Área de texto formatado. Pressione ALT-F9 para exibir o menu, ALT-F10 para exibir a barra de ferramentas ou ALT-0 para exibir a ajuda"})},6746:(e,t,a)=>{"use strict";a(6992),a(8674),a(9601),a(7727),a(3734),a(6688),a(5476),a(2466),a(2526),a(4414),a(2993),a(13);var o=a(381),r=(a(7971),a(7575)),r=a.n(r),r=(a(8860),a(6890),a(7490),a(8190),a(4400),a(2682),a(6552),a(8619),a(4883),window.tinymce=r(),window.initTextRichEditor=function(e){var t=1{if(!t){for(var r=1/0,i=0;iu.O[e](t[l]))?t.splice(l--,1):(s=!1,oo;i--)d[i]=d[i-1];d[i]=[t,a,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),u.j=172,c={172:0},u.O.j=e=>0===c[e],t=(e,t)=>{var a,o,r,[i,n,s]=t,l=0;if(i.some(e=>0!==c[e])){for(a in n)u.o(n,a)&&(u.m[a]=n[a]);s&&(r=s(u))}for(e&&e(t);lu(6746));u.O(t)})(); \ No newline at end of file diff --git a/sapl/static/sapl/frontend/js/global.e8c9c610.js.LICENSE.txt b/sapl/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt similarity index 100% rename from sapl/static/sapl/frontend/js/global.e8c9c610.js.LICENSE.txt rename to sapl/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt diff --git a/sapl/static/sapl/frontend/js/global.f01dd32a.js.gz b/sapl/static/sapl/frontend/js/global.f01dd32a.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..faa7ddbb4d8c87530b4a01d0bc964659dedf3088 GIT binary patch literal 14090 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 Date: Mon, 17 Oct 2022 15:08:35 -0400 Subject: [PATCH 10/80] fix: verifica se existe dp atualizador em compilacao_filters.nota_automatica() --- sapl/compilacao/templatetags/compilacao_filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/compilacao/templatetags/compilacao_filters.py b/sapl/compilacao/templatetags/compilacao_filters.py index 201e0d62c..cc21b8eb7 100644 --- a/sapl/compilacao/templatetags/compilacao_filters.py +++ b/sapl/compilacao/templatetags/compilacao_filters.py @@ -82,7 +82,7 @@ def dispositivo_desativado(dispositivo, inicio_vigencia, fim_vigencia): @register.simple_tag def nota_automatica(dispositivo, ta_pub_list): - if dispositivo.ta_publicado: + if dispositivo.ta_publicado and dispositivo.dispositivo_atualizador is not None and dispositivo.dispositivo_atualizador.dispositivo_pai is not None: d = dispositivo.dispositivo_atualizador.dispositivo_pai if d.auto_inserido: From c04ead18538aa6f3f7c0916c1d18d6a474f32406 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Tue, 18 Oct 2022 12:16:11 -0300 Subject: [PATCH 11/80] Release: 3.1.163-RC8 --- docker/docker-compose.yaml | 2 +- sapl/settings.py | 2 +- sapl/templates/base.html | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 4ad60bd78..3732d10b0 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -32,7 +32,7 @@ services: networks: - sapl-net sapl: - image: interlegis/sapl:3.1.163-RC7 + image: interlegis/sapl:3.1.163-RC8 # build: # context: ../ # dockerfile: ./docker/Dockerfile diff --git a/sapl/settings.py b/sapl/settings.py index 1d9061618..e5ddda482 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,7 +41,7 @@ ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login/?next=' -SAPL_VERSION = '3.1.163-RC7' +SAPL_VERSION = '3.1.163-RC8' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/sapl/templates/base.html b/sapl/templates/base.html index 026bf99fe..8821fa138 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -194,7 +194,7 @@ Desenvolvido pelo Interlegis em software livre e aberto. - Release: 3.1.163-RC7 + Release: 3.1.163-RC8

diff --git a/setup.py b/setup.py index 0fd1272d0..304e68a3f 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ install_requires = [ ] setup( name='interlegis-sapl', - version='3.1.163-RC7', + version='3.1.163-RC8', packages=find_packages(), include_package_data=True, license='GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007', From e3e958ab44e62f97609c9bfffc2d7070765a748c Mon Sep 17 00:00:00 2001 From: cristian-longhi Date: Thu, 20 Oct 2022 10:05:34 -0300 Subject: [PATCH 12/80] =?UTF-8?q?Permite=20exibi=C3=A7=C3=A3o=20do=20voto?= =?UTF-8?q?=20no=20painel=20com=20vota=C3=A7=C3=A3o=20ainda=20aberta=20(#3?= =?UTF-8?q?615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/forms.py | 7 +++++++ .../migrations/0055_appconfig_mostrar_voto.py | 18 +++++++++++++++++ sapl/base/models.py | 4 ++++ sapl/painel/views.py | 20 ++++++++++++------- sapl/templates/base/layouts.yaml | 2 +- sapl/templates/painel/index.html | 3 ++- 6 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 sapl/base/migrations/0055_appconfig_mostrar_voto.py diff --git a/sapl/base/forms.py b/sapl/base/forms.py index ca9083d98..f6475e269 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -1557,6 +1557,12 @@ class ConfiguracoesAppForm(ModelForm): label=_('Mostrar brasão da Casa no painel?'), required=False) + mostrar_voto = forms.BooleanField( + help_text=_('Se selecionado, exibe qual é o voto, e não apenas a indicação de que já votou, ' + 'com a votação ainda aberta.'), + label=_('Mostrar voto do Parlamentar no painel durante a votação?'), + required=False) + google_recaptcha_site_key = forms.CharField( label=AppConfig._meta.get_field( 'google_recaptcha_site_key').verbose_name, @@ -1596,6 +1602,7 @@ class ConfiguracoesAppForm(ModelForm): 'cronometro_ordem', 'cronometro_consideracoes', 'mostrar_brasao_painel', + 'mostrar_voto', 'receber_recibo_proposicao', 'assinatura_ata', 'estatisticas_acesso_normas', diff --git a/sapl/base/migrations/0055_appconfig_mostrar_voto.py b/sapl/base/migrations/0055_appconfig_mostrar_voto.py new file mode 100644 index 000000000..1d4527639 --- /dev/null +++ b/sapl/base/migrations/0055_appconfig_mostrar_voto.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.28 on 2022-10-05 18:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0054_auto_20220921_1217'), + ] + + operations = [ + migrations.AddField( + model_name='appconfig', + name='mostrar_voto', + field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Exibir voto do Parlamentar antes de encerrar a votação?'), + ), + ] diff --git a/sapl/base/models.py b/sapl/base/models.py index 8dc7b7c70..9b8f79faa 100644 --- a/sapl/base/models.py +++ b/sapl/base/models.py @@ -233,6 +233,10 @@ class AppConfig(models.Model): default=False, verbose_name=_('Mostrar brasão da Casa no painel?')) + mostrar_voto = models.BooleanField( + verbose_name=_('Exibir voto do Parlamentar antes de encerrar a votação?'), + choices=YES_NO_CHOICES, default=False) + # MÓDULO ESTATÍSTICAS DE ACESSO estatisticas_acesso_normas = models.CharField( max_length=1, diff --git a/sapl/painel/views.py b/sapl/painel/views.py index 7f36fa8be..a4c9e2da3 100644 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -446,7 +446,7 @@ def response_nenhuma_materia(response): return JsonResponse(response) -def get_votos(response, materia): +def get_votos(response, materia, mostrar_voto): logger = logging.getLogger(__name__) if type(materia) == OrdemDia: if materia.tipo_votacao != 4: @@ -492,8 +492,13 @@ def get_votos(response, materia): for i, p in enumerate(response['presentes']): try: logger.info("Tentando obter votos do parlamentar (id={}).".format(p['parlamentar_id'])) - if votos_parlamentares.get(parlamentar_id=p['parlamentar_id']).voto: - response['presentes'][i]['voto'] = 'Voto Informado' + voto = votos_parlamentares.get(parlamentar_id=p['parlamentar_id']).voto + + if voto: + if mostrar_voto: + response['presentes'][i]['voto'] = voto + else: + response['presentes'][i]['voto'] = 'Voto Informado' except ObjectDoesNotExist: # logger.error("Votos do parlamentar (id={}) não encontrados. Retornado vazio." # .format(p['parlamentar_id'])) @@ -563,7 +568,8 @@ def get_dados_painel(request, pk): 'cronometro_ordem': get_cronometro_status(request, 'ordem'), 'cronometro_consideracoes': get_cronometro_status(request, 'consideracoes'), 'status_painel': sessao.painel_aberto, - 'brasao': brasao + 'brasao': brasao, + 'mostrar_voto': app_config.mostrar_voto } ordem_dia = get_materia_aberta(pk) @@ -574,11 +580,11 @@ def get_dados_painel(request, pk): if ordem_dia: return JsonResponse(get_votos( get_presentes(pk, response, ordem_dia), - ordem_dia)) + ordem_dia, app_config.mostrar_voto)) elif expediente: return JsonResponse(get_votos( get_presentes(pk, response, expediente), - expediente)) + expediente, app_config.mostrar_voto)) # Caso não tenha nenhuma aberta, # a matéria a ser mostrada no Painel deve ser a última votada @@ -614,7 +620,7 @@ def get_dados_painel(request, pk): if ordem_expediente: return JsonResponse(get_votos( get_presentes(pk, response, ordem_expediente), - ordem_expediente)) + ordem_expediente, app_config.mostrar_voto)) # Retorna que não há nenhuma matéria já votada ou aberta return response_nenhuma_materia(get_presentes(pk, response, None)) diff --git a/sapl/templates/base/layouts.yaml b/sapl/templates/base/layouts.yaml index b918af8a7..6ff5ebe44 100644 --- a/sapl/templates/base/layouts.yaml +++ b/sapl/templates/base/layouts.yaml @@ -48,7 +48,7 @@ AppConfig: {% trans 'Módulo Painel' %}: - cronometro_discurso cronometro_aparte - cronometro_ordem cronometro_consideracoes - - mostrar_brasao_painel + - mostrar_brasao_painel mostrar_voto {% trans 'Estatísticas de acesso' %}: - estatisticas_acesso_normas diff --git a/sapl/templates/painel/index.html b/sapl/templates/painel/index.html index 1cb2e2c83..c9a7d813f 100644 --- a/sapl/templates/painel/index.html +++ b/sapl/templates/painel/index.html @@ -281,11 +281,12 @@ var presentes_list = data["presentes"]; if (data["status_painel"] == true) { + mostrar_voto = data["mostrar_voto"]; presentes.append('

Mês: {{ mes }}

+

Mês: {{ mes }}

+
+
Um total de acessos {{normas_count_mes|lookup:mes}} nas {{normas|length}} mais acessadas.
+
+
Posição
'); $.each(presentes_list, function (index, parlamentar) { - if (parlamentar.voto == 'Voto Informado'){ + if (parlamentar.voto == 'Voto Informado' && mostrar_voto == false){ $('#parlamentares_list').append(' - {% for materia in object_list %} + {% for materia_em_tramitacao in object_list %} - - + + {% endfor %} diff --git a/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html b/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html index 421e6a745..da4172b0b 100644 --- a/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html +++ b/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html @@ -7,7 +7,7 @@

Fim de Prazo de Tramitações

PARÂMETROS DE PESQUISA:
-  Período: {{ data_tramitacao }}
+  Período: {{ data_fim_prazo }}
 Tipo de matéria: {{ tipo }}
 Status atual: {{ tramitacao__status }}
 Local de origem: {{ tramitacao__unidade_tramitacao_local }}
@@ -18,7 +18,7 @@ {% else %}


{% endif %} -
' + parlamentar.nome + ' ' + From eb81706371722e197f74d07108884f37da8b3025 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Thu, 20 Oct 2022 10:33:53 -0300 Subject: [PATCH 13/80] HOT-FIX: Fixes #3617 --- .../migrations/0029_auto_20221019_2041.py | 17 +++++++++++++++++ sapl/comissoes/models.py | 2 +- sapl/comissoes/views.py | 1 - 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sapl/comissoes/migrations/0029_auto_20221019_2041.py diff --git a/sapl/comissoes/migrations/0029_auto_20221019_2041.py b/sapl/comissoes/migrations/0029_auto_20221019_2041.py new file mode 100644 index 000000000..abd175497 --- /dev/null +++ b/sapl/comissoes/migrations/0029_auto_20221019_2041.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.28 on 2022-10-19 23:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('comissoes', '0028_auto_20220807_2257'), + ] + + operations = [ + migrations.AlterModelOptions( + name='reuniao', + options={'ordering': ('-data', '-nome'), 'verbose_name': 'Reunião de Comissão', 'verbose_name_plural': 'Reuniões de Comissão'}, + ), + ] diff --git a/sapl/comissoes/models.py b/sapl/comissoes/models.py index 5c6a67d8a..75381e3a2 100644 --- a/sapl/comissoes/models.py +++ b/sapl/comissoes/models.py @@ -258,7 +258,7 @@ class Reuniao(models.Model): class Meta: verbose_name = _('Reunião de Comissão') verbose_name_plural = _('Reuniões de Comissão') - ordering = ('numero', 'comissao') + ordering = ('-data', '-nome') def __str__(self): return self.nome diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py index 0c9329f05..5d3e450c2 100644 --- a/sapl/comissoes/views.py +++ b/sapl/comissoes/views.py @@ -212,7 +212,6 @@ class ReuniaoCrud(MasterDetailCrud): class BaseMixin(MasterDetailCrud.BaseMixin): list_field_names = ['data', 'nome', 'tema', 'upload_ata'] - ordering = '-data' class DetailView(MasterDetailCrud.DetailView): template_name = "comissoes/reuniao_detail.html" From 563f871cda11f91022174f033e07f5dfb800ab27 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Thu, 20 Oct 2022 12:05:50 -0300 Subject: [PATCH 14/80] Remove lib PyGraphViz --- requirements/dev-requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 64308a0b2..2d38a76cd 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -7,4 +7,3 @@ ipdb==0.13.3 pdbpp==0.9.2 pip-review==0.4 pipdeptree==0.10.1 -pygraphviz==1.3.1 From 9d8df1a100cc7a1f8584c4f37506e1d650a64562 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 20 Oct 2022 13:18:13 -0300 Subject: [PATCH 15/80] =?UTF-8?q?hotfix:=20ajuste=20paste=5Fas=5Ftext=20em?= =?UTF-8?q?=20compila=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compilacao/js/old/compilacao_edit.js | 2 +- frontend/webpack-stats.json | 568 +++++++++--------- .../frontend/js/compilacao.1c9473f1.js.gz | Bin 6738 -> 0 bytes ...cao.1c9473f1.js => compilacao.d68d2b28.js} | 2 +- .../frontend/js/compilacao.d68d2b28.js.gz | Bin 0 -> 6739 bytes 5 files changed, 286 insertions(+), 286 deletions(-) delete mode 100644 sapl/static/sapl/frontend/js/compilacao.1c9473f1.js.gz rename sapl/static/sapl/frontend/js/{compilacao.1c9473f1.js => compilacao.d68d2b28.js} (99%) create mode 100644 sapl/static/sapl/frontend/js/compilacao.d68d2b28.js.gz diff --git a/frontend/src/__apps/compilacao/js/old/compilacao_edit.js b/frontend/src/__apps/compilacao/js/old/compilacao_edit.js index 7eabb0d7a..8ab884033 100644 --- a/frontend/src/__apps/compilacao/js/old/compilacao_edit.js +++ b/frontend/src/__apps/compilacao/js/old/compilacao_edit.js @@ -245,7 +245,7 @@ window.DispositivoEdit = function () { if (editortype !== 'construct') { dpt_form.html(data) if (editortype === 'tinymce') { - window.initTextRichEditor(null, false, true) + window.initTextRichEditor(null, false, false) } // OptionalCustomFrontEnd().init() } diff --git a/frontend/webpack-stats.json b/frontend/webpack-stats.json index 058d04525..a32e5c1e7 100644 --- a/frontend/webpack-stats.json +++ b/frontend/webpack-stats.json @@ -1,20 +1,15 @@ { "status": "done", "assets": { - "fonts/fa-brands-400.f5defc2e.ttf": { - "name": "fonts/fa-brands-400.f5defc2e.ttf", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-brands-400.f5defc2e.ttf", - "publicPath": "/static/sapl/frontend/fonts/fa-brands-400.f5defc2e.ttf" - }, "fonts/fa-brands-400.86c7e1fa.woff2": { "name": "fonts/fa-brands-400.86c7e1fa.woff2", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-brands-400.86c7e1fa.woff2", "publicPath": "/static/sapl/frontend/fonts/fa-brands-400.86c7e1fa.woff2" }, - "fonts/fa-solid-900.64d5644d.woff2": { - "name": "fonts/fa-solid-900.64d5644d.woff2", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2", - "publicPath": "/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2" + "fonts/fa-brands-400.f5defc2e.ttf": { + "name": "fonts/fa-brands-400.f5defc2e.ttf", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-brands-400.f5defc2e.ttf", + "publicPath": "/static/sapl/frontend/fonts/fa-brands-400.f5defc2e.ttf" }, "fonts/fa-regular-400.e0550912.woff2": { "name": "fonts/fa-regular-400.e0550912.woff2", @@ -26,6 +21,11 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf", "publicPath": "/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf" }, + "fonts/fa-solid-900.64d5644d.woff2": { + "name": "fonts/fa-solid-900.64d5644d.woff2", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2", + "publicPath": "/static/sapl/frontend/fonts/fa-solid-900.64d5644d.woff2" + }, "fonts/fa-solid-900.f418d876.ttf": { "name": "fonts/fa-solid-900.f418d876.ttf", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-solid-900.f418d876.ttf", @@ -71,10 +71,10 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/compilacao.f4baf459.css", "publicPath": "/static/sapl/frontend/css/compilacao.f4baf459.css" }, - "js/compilacao.1c9473f1.js": { - "name": "js/compilacao.1c9473f1.js", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js", - "publicPath": "/static/sapl/frontend/js/compilacao.1c9473f1.js" + "js/compilacao.d68d2b28.js": { + "name": "js/compilacao.d68d2b28.js", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/compilacao.d68d2b28.js", + "publicPath": "/static/sapl/frontend/js/compilacao.d68d2b28.js" }, "css/chunk-vendors.9904f9d0.css": { "name": "css/chunk-vendors.9904f9d0.css", @@ -86,6 +86,171 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js", "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js" }, + "audio/ring.mp3": { + "name": "audio/ring.mp3", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/audio/ring.mp3", + "publicPath": "/static/sapl/frontend/audio/ring.mp3" + }, + "img/arrow.png": { + "name": "img/arrow.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/arrow.png", + "publicPath": "/static/sapl/frontend/img/arrow.png" + }, + "img/authenticated.png": { + "name": "img/authenticated.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/authenticated.png", + "publicPath": "/static/sapl/frontend/img/authenticated.png" + }, + "img/avatar.png": { + "name": "img/avatar.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/avatar.png", + "publicPath": "/static/sapl/frontend/img/avatar.png" + }, + "img/beta.png": { + "name": "img/beta.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/beta.png", + "publicPath": "/static/sapl/frontend/img/beta.png" + }, + "img/bg.png": { + "name": "img/bg.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/bg.png", + "publicPath": "/static/sapl/frontend/img/bg.png" + }, + "img/brasao_transp.gif": { + "name": "img/brasao_transp.gif", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/brasao_transp.gif", + "publicPath": "/static/sapl/frontend/img/brasao_transp.gif" + }, + "img/down_arrow_select.jpg": { + "name": "img/down_arrow_select.jpg", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg", + "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg" + }, + "img/etiqueta.png": { + "name": "img/etiqueta.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/etiqueta.png", + "publicPath": "/static/sapl/frontend/img/etiqueta.png" + }, + "img/favicon.ico": { + "name": "img/favicon.ico", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/favicon.ico", + "publicPath": "/static/sapl/frontend/img/favicon.ico" + }, + "img/file.png": { + "name": "img/file.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/file.png", + "publicPath": "/static/sapl/frontend/img/file.png" + }, + "img/hand-note.png": { + "name": "img/hand-note.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/hand-note.png", + "publicPath": "/static/sapl/frontend/img/hand-note.png" + }, + "img/icon_comissoes.png": { + "name": "img/icon_comissoes.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_comissoes.png", + "publicPath": "/static/sapl/frontend/img/icon_comissoes.png" + }, + "img/icon_delete_white.png": { + "name": "img/icon_delete_white.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_delete_white.png", + "publicPath": "/static/sapl/frontend/img/icon_delete_white.png" + }, + "img/icon_materia_legislativa.png": { + "name": "img/icon_materia_legislativa.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_materia_legislativa.png", + "publicPath": "/static/sapl/frontend/img/icon_materia_legislativa.png" + }, + "img/icon_mesa_diretora.png": { + "name": "img/icon_mesa_diretora.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_mesa_diretora.png", + "publicPath": "/static/sapl/frontend/img/icon_mesa_diretora.png" + }, + "img/icon_normas_juridicas.png": { + "name": "img/icon_normas_juridicas.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas.png", + "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas.png" + }, + "img/icon_normas_juridicas_destaque.png": { + "name": "img/icon_normas_juridicas_destaque.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas_destaque.png", + "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas_destaque.png" + }, + "img/icon_parlamentares.png": { + "name": "img/icon_parlamentares.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_parlamentares.png", + "publicPath": "/static/sapl/frontend/img/icon_parlamentares.png" + }, + "img/icon_pautas.png": { + "name": "img/icon_pautas.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_pautas.png", + "publicPath": "/static/sapl/frontend/img/icon_pautas.png" + }, + "img/icon_plenarias.png": { + "name": "img/icon_plenarias.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_plenarias.png", + "publicPath": "/static/sapl/frontend/img/icon_plenarias.png" + }, + "img/icon_relatorios.png": { + "name": "img/icon_relatorios.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_relatorios.png", + "publicPath": "/static/sapl/frontend/img/icon_relatorios.png" + }, + "img/icon_save_white.png": { + "name": "img/icon_save_white.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_save_white.png", + "publicPath": "/static/sapl/frontend/img/icon_save_white.png" + }, + "img/lexml.gif": { + "name": "img/lexml.gif", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/lexml.gif", + "publicPath": "/static/sapl/frontend/img/lexml.gif" + }, + "img/logo.png": { + "name": "img/logo.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo.png", + "publicPath": "/static/sapl/frontend/img/logo.png" + }, + "img/logo_cc.png": { + "name": "img/logo_cc.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_cc.png", + "publicPath": "/static/sapl/frontend/img/logo_cc.png" + }, + "img/logo_interlegis.png": { + "name": "img/logo_interlegis.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_interlegis.png", + "publicPath": "/static/sapl/frontend/img/logo_interlegis.png" + }, + "img/manual.png": { + "name": "img/manual.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/manual.png", + "publicPath": "/static/sapl/frontend/img/manual.png" + }, + "img/pdflogo.png": { + "name": "img/pdflogo.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/pdflogo.png", + "publicPath": "/static/sapl/frontend/img/pdflogo.png" + }, + "img/perfil.png": { + "name": "img/perfil.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/perfil.png", + "publicPath": "/static/sapl/frontend/img/perfil.png" + }, + "img/search-gray.png": { + "name": "img/search-gray.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search-gray.png", + "publicPath": "/static/sapl/frontend/img/search-gray.png" + }, + "img/search.png": { + "name": "img/search.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search.png", + "publicPath": "/static/sapl/frontend/img/search.png" + }, + "img/user.png": { + "name": "img/user.png", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/user.png", + "publicPath": "/static/sapl/frontend/img/user.png" + }, "js/skins/content/dark/content.css": { "name": "js/skins/content/dark/content.css", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.css", @@ -306,210 +471,55 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css" }, - "audio/ring.mp3": { - "name": "audio/ring.mp3", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/audio/ring.mp3", - "publicPath": "/static/sapl/frontend/audio/ring.mp3" - }, - "img/arrow.png": { - "name": "img/arrow.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/arrow.png", - "publicPath": "/static/sapl/frontend/img/arrow.png" + "js/chunk-vendors.874df7f4.js.LICENSE.txt": { + "name": "js/chunk-vendors.874df7f4.js.LICENSE.txt", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt", + "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt" }, - "img/authenticated.png": { - "name": "img/authenticated.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/authenticated.png", - "publicPath": "/static/sapl/frontend/img/authenticated.png" + "js/global.f01dd32a.js.LICENSE.txt": { + "name": "js/global.f01dd32a.js.LICENSE.txt", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt", + "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt" }, - "img/avatar.png": { - "name": "img/avatar.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/avatar.png", - "publicPath": "/static/sapl/frontend/img/avatar.png" + "fonts/fa-v4compatibility.7e7e1dad.ttf.gz": { + "name": "fonts/fa-v4compatibility.7e7e1dad.ttf.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz", + "publicPath": "/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz" }, - "img/beta.png": { - "name": "img/beta.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/beta.png", - "publicPath": "/static/sapl/frontend/img/beta.png" + "js/parlamentar.25e7f0fa.js.gz": { + "name": "js/parlamentar.25e7f0fa.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz", + "publicPath": "/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz" }, - "img/bg.png": { - "name": "img/bg.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/bg.png", - "publicPath": "/static/sapl/frontend/img/bg.png" + "css/painel.e2b9504e.css.gz": { + "name": "css/painel.e2b9504e.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/painel.e2b9504e.css.gz", + "publicPath": "/static/sapl/frontend/css/painel.e2b9504e.css.gz" }, - "img/brasao_transp.gif": { - "name": "img/brasao_transp.gif", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/brasao_transp.gif", - "publicPath": "/static/sapl/frontend/img/brasao_transp.gif" + "js/painel.7aa779e9.js.gz": { + "name": "js/painel.7aa779e9.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/painel.7aa779e9.js.gz", + "publicPath": "/static/sapl/frontend/js/painel.7aa779e9.js.gz" }, - "img/down_arrow_select.jpg": { - "name": "img/down_arrow_select.jpg", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg", - "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg" + "js/compilacao.d68d2b28.js.gz": { + "name": "js/compilacao.d68d2b28.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/compilacao.d68d2b28.js.gz", + "publicPath": "/static/sapl/frontend/js/compilacao.d68d2b28.js.gz" }, - "img/etiqueta.png": { - "name": "img/etiqueta.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/etiqueta.png", - "publicPath": "/static/sapl/frontend/img/etiqueta.png" + "js/global.f01dd32a.js.gz": { + "name": "js/global.f01dd32a.js.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.gz", + "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.gz" }, - "img/favicon.ico": { - "name": "img/favicon.ico", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/favicon.ico", - "publicPath": "/static/sapl/frontend/img/favicon.ico" + "css/compilacao.f4baf459.css.gz": { + "name": "css/compilacao.f4baf459.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/compilacao.f4baf459.css.gz", + "publicPath": "/static/sapl/frontend/css/compilacao.f4baf459.css.gz" }, - "img/file.png": { - "name": "img/file.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/file.png", - "publicPath": "/static/sapl/frontend/img/file.png" - }, - "img/hand-note.png": { - "name": "img/hand-note.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/hand-note.png", - "publicPath": "/static/sapl/frontend/img/hand-note.png" - }, - "img/icon_comissoes.png": { - "name": "img/icon_comissoes.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_comissoes.png", - "publicPath": "/static/sapl/frontend/img/icon_comissoes.png" - }, - "img/icon_delete_white.png": { - "name": "img/icon_delete_white.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_delete_white.png", - "publicPath": "/static/sapl/frontend/img/icon_delete_white.png" - }, - "img/icon_materia_legislativa.png": { - "name": "img/icon_materia_legislativa.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_materia_legislativa.png", - "publicPath": "/static/sapl/frontend/img/icon_materia_legislativa.png" - }, - "img/icon_mesa_diretora.png": { - "name": "img/icon_mesa_diretora.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_mesa_diretora.png", - "publicPath": "/static/sapl/frontend/img/icon_mesa_diretora.png" - }, - "img/icon_normas_juridicas.png": { - "name": "img/icon_normas_juridicas.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas.png", - "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas.png" - }, - "img/icon_normas_juridicas_destaque.png": { - "name": "img/icon_normas_juridicas_destaque.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_normas_juridicas_destaque.png", - "publicPath": "/static/sapl/frontend/img/icon_normas_juridicas_destaque.png" - }, - "img/icon_parlamentares.png": { - "name": "img/icon_parlamentares.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_parlamentares.png", - "publicPath": "/static/sapl/frontend/img/icon_parlamentares.png" - }, - "img/icon_pautas.png": { - "name": "img/icon_pautas.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_pautas.png", - "publicPath": "/static/sapl/frontend/img/icon_pautas.png" - }, - "img/icon_plenarias.png": { - "name": "img/icon_plenarias.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_plenarias.png", - "publicPath": "/static/sapl/frontend/img/icon_plenarias.png" - }, - "img/icon_relatorios.png": { - "name": "img/icon_relatorios.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_relatorios.png", - "publicPath": "/static/sapl/frontend/img/icon_relatorios.png" - }, - "img/icon_save_white.png": { - "name": "img/icon_save_white.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/icon_save_white.png", - "publicPath": "/static/sapl/frontend/img/icon_save_white.png" - }, - "img/lexml.gif": { - "name": "img/lexml.gif", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/lexml.gif", - "publicPath": "/static/sapl/frontend/img/lexml.gif" - }, - "img/logo.png": { - "name": "img/logo.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo.png", - "publicPath": "/static/sapl/frontend/img/logo.png" - }, - "img/logo_cc.png": { - "name": "img/logo_cc.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_cc.png", - "publicPath": "/static/sapl/frontend/img/logo_cc.png" - }, - "img/logo_interlegis.png": { - "name": "img/logo_interlegis.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/logo_interlegis.png", - "publicPath": "/static/sapl/frontend/img/logo_interlegis.png" - }, - "img/manual.png": { - "name": "img/manual.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/manual.png", - "publicPath": "/static/sapl/frontend/img/manual.png" - }, - "img/pdflogo.png": { - "name": "img/pdflogo.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/pdflogo.png", - "publicPath": "/static/sapl/frontend/img/pdflogo.png" - }, - "img/perfil.png": { - "name": "img/perfil.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/perfil.png", - "publicPath": "/static/sapl/frontend/img/perfil.png" - }, - "img/search-gray.png": { - "name": "img/search-gray.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search-gray.png", - "publicPath": "/static/sapl/frontend/img/search-gray.png" - }, - "img/search.png": { - "name": "img/search.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/search.png", - "publicPath": "/static/sapl/frontend/img/search.png" - }, - "img/user.png": { - "name": "img/user.png", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/user.png", - "publicPath": "/static/sapl/frontend/img/user.png" - }, - "js/chunk-vendors.874df7f4.js.LICENSE.txt": { - "name": "js/chunk-vendors.874df7f4.js.LICENSE.txt", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt", - "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt" - }, - "js/global.f01dd32a.js.LICENSE.txt": { - "name": "js/global.f01dd32a.js.LICENSE.txt", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt", - "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.LICENSE.txt" - }, - "fonts/fa-v4compatibility.7e7e1dad.ttf.gz": { - "name": "fonts/fa-v4compatibility.7e7e1dad.ttf.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz", - "publicPath": "/static/sapl/frontend/fonts/fa-v4compatibility.7e7e1dad.ttf.gz" - }, - "js/global.f01dd32a.js.gz": { - "name": "js/global.f01dd32a.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/global.f01dd32a.js.gz", - "publicPath": "/static/sapl/frontend/js/global.f01dd32a.js.gz" - }, - "css/painel.e2b9504e.css.gz": { - "name": "css/painel.e2b9504e.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/painel.e2b9504e.css.gz", - "publicPath": "/static/sapl/frontend/css/painel.e2b9504e.css.gz" - }, - "js/parlamentar.25e7f0fa.js.gz": { - "name": "js/parlamentar.25e7f0fa.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz", - "publicPath": "/static/sapl/frontend/js/parlamentar.25e7f0fa.js.gz" - }, - "js/painel.7aa779e9.js.gz": { - "name": "js/painel.7aa779e9.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/painel.7aa779e9.js.gz", - "publicPath": "/static/sapl/frontend/js/painel.7aa779e9.js.gz" - }, - "js/compilacao.1c9473f1.js.gz": { - "name": "js/compilacao.1c9473f1.js.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js.gz", - "publicPath": "/static/sapl/frontend/js/compilacao.1c9473f1.js.gz" + "img/down_arrow_select.jpg.gz": { + "name": "img/down_arrow_select.jpg.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg.gz", + "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg.gz" }, "js/skins/content/dark/content.css.gz": { "name": "js/skins/content/dark/content.css.gz", @@ -521,21 +531,16 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/dark/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/dark/content.min.css.gz" }, - "js/skins/content/default/content.css.gz": { - "name": "js/skins/content/default/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/content/default/content.css.gz" - }, - "css/compilacao.f4baf459.css.gz": { - "name": "css/compilacao.f4baf459.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/compilacao.f4baf459.css.gz", - "publicPath": "/static/sapl/frontend/css/compilacao.f4baf459.css.gz" - }, "js/skins/content/default/content.min.css.gz": { "name": "js/skins/content/default/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/default/content.min.css.gz" }, + "js/skins/content/default/content.css.gz": { + "name": "js/skins/content/default/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/default/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/content/default/content.css.gz" + }, "js/skins/content/document/content.css.gz": { "name": "js/skins/content/document/content.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/document/content.css.gz", @@ -561,41 +566,41 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.css.gz" }, - "js/skins/content/tinymce-5-dark/content.min.css.gz": { - "name": "js/skins/content/tinymce-5-dark/content.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.min.css.gz" - }, "js/skins/content/writer/content.css.gz": { "name": "js/skins/content/writer/content.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/writer/content.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/writer/content.css.gz" }, + "js/skins/content/tinymce-5-dark/content.min.css.gz": { + "name": "js/skins/content/tinymce-5-dark/content.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/content/tinymce-5-dark/content.min.css.gz" + }, "js/skins/content/writer/content.min.css.gz": { "name": "js/skins/content/writer/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/content/writer/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/content/writer/content.min.css.gz" }, - "js/skins/ui/oxide/content.css.gz": { - "name": "js/skins/ui/oxide/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.css.gz" - }, "js/skins/ui/oxide/content.inline.css.gz": { "name": "js/skins/ui/oxide/content.inline.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.inline.css.gz" }, - "js/skins/ui/oxide/content.inline.min.css.gz": { - "name": "js/skins/ui/oxide/content.inline.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz" + "js/skins/ui/oxide/content.css.gz": { + "name": "js/skins/ui/oxide/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.css.gz" }, "js/skins/ui/oxide/content.min.css.gz": { "name": "js/skins/ui/oxide/content.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.min.css.gz" }, + "js/skins/ui/oxide/content.inline.min.css.gz": { + "name": "js/skins/ui/oxide/content.inline.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/content.inline.min.css.gz" + }, "js/skins/ui/oxide/skin.shadowdom.css.gz": { "name": "js/skins/ui/oxide/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.shadowdom.css.gz", @@ -616,11 +621,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.css.gz" }, - "js/skins/ui/oxide/skin.css.gz": { - "name": "js/skins/ui/oxide/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz" - }, "js/skins/ui/oxide-dark/content.inline.min.css.gz": { "name": "js/skins/ui/oxide-dark/content.inline.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/content.inline.min.css.gz", @@ -641,56 +641,61 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.css.gz" }, + "js/skins/ui/oxide/skin.css.gz": { + "name": "js/skins/ui/oxide/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide/skin.css.gz" + }, "js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz": { "name": "js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.shadowdom.min.css.gz" }, - "js/skins/ui/tinymce-5/content.css.gz": { - "name": "js/skins/ui/tinymce-5/content.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.css.gz" + "js/skins/ui/tinymce-5/content.inline.min.css.gz": { + "name": "js/skins/ui/tinymce-5/content.inline.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz" }, "js/skins/ui/tinymce-5/content.inline.css.gz": { "name": "js/skins/ui/tinymce-5/content.inline.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.css.gz" }, - "js/skins/ui/tinymce-5/content.inline.min.css.gz": { - "name": "js/skins/ui/tinymce-5/content.inline.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.inline.min.css.gz" - }, - "js/skins/ui/oxide-dark/skin.min.css.gz": { - "name": "js/skins/ui/oxide-dark/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.min.css.gz" + "js/skins/ui/tinymce-5/content.css.gz": { + "name": "js/skins/ui/tinymce-5/content.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.css.gz" }, - "js/skins/ui/oxide-dark/skin.css.gz": { - "name": "js/skins/ui/oxide-dark/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.css.gz" + "js/skins/ui/tinymce-5/content.min.css.gz": { + "name": "js/skins/ui/tinymce-5/content.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz" }, "js/skins/ui/tinymce-5/skin.shadowdom.css.gz": { "name": "js/skins/ui/tinymce-5/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.css.gz" }, + "js/skins/ui/oxide-dark/skin.min.css.gz": { + "name": "js/skins/ui/oxide-dark/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.min.css.gz" + }, "js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz": { "name": "js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.shadowdom.min.css.gz" }, - "js/skins/ui/tinymce-5/content.min.css.gz": { - "name": "js/skins/ui/tinymce-5/content.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/content.min.css.gz" - }, "js/skins/ui/tinymce-5-dark/content.inline.css.gz": { "name": "js/skins/ui/tinymce-5-dark/content.inline.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.inline.css.gz" }, + "js/skins/ui/oxide-dark/skin.css.gz": { + "name": "js/skins/ui/oxide-dark/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/oxide-dark/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/oxide-dark/skin.css.gz" + }, "js/skins/ui/tinymce-5-dark/content.css.gz": { "name": "js/skins/ui/tinymce-5-dark/content.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.css.gz", @@ -706,16 +711,6 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/content.min.css.gz" }, - "js/skins/ui/tinymce-5/skin.min.css.gz": { - "name": "js/skins/ui/tinymce-5/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz" - }, - "js/skins/ui/tinymce-5/skin.css.gz": { - "name": "js/skins/ui/tinymce-5/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz" - }, "js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz": { "name": "js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.css.gz", @@ -726,31 +721,36 @@ "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.gz", "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.gz" }, - "js/skins/ui/tinymce-5-dark/skin.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/skin.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz" - }, - "img/down_arrow_select.jpg.gz": { - "name": "img/down_arrow_select.jpg.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/img/down_arrow_select.jpg.gz", - "publicPath": "/static/sapl/frontend/img/down_arrow_select.jpg.gz" - }, - "js/skins/ui/tinymce-5-dark/skin.min.css.gz": { - "name": "js/skins/ui/tinymce-5-dark/skin.min.css.gz", - "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz", - "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz" + "js/skins/ui/tinymce-5/skin.css.gz": { + "name": "js/skins/ui/tinymce-5/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.css.gz" }, "js/chunk-vendors.874df7f4.js.LICENSE.txt.gz": { "name": "js/chunk-vendors.874df7f4.js.LICENSE.txt.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt.gz", "publicPath": "/static/sapl/frontend/js/chunk-vendors.874df7f4.js.LICENSE.txt.gz" }, + "js/skins/ui/tinymce-5/skin.min.css.gz": { + "name": "js/skins/ui/tinymce-5/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5/skin.min.css.gz" + }, + "js/skins/ui/tinymce-5-dark/skin.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/skin.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.css.gz" + }, "fonts/fa-regular-400.3edb9004.ttf.gz": { "name": "fonts/fa-regular-400.3edb9004.ttf.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf.gz", "publicPath": "/static/sapl/frontend/fonts/fa-regular-400.3edb9004.ttf.gz" }, + "js/skins/ui/tinymce-5-dark/skin.min.css.gz": { + "name": "js/skins/ui/tinymce-5-dark/skin.min.css.gz", + "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz", + "publicPath": "/static/sapl/frontend/js/skins/ui/tinymce-5-dark/skin.min.css.gz" + }, "css/global.45591136.css.gz": { "name": "css/global.45591136.css.gz", "path": "/home/leandro/desenvolvimento/envs/sapl/sapl/static/sapl/frontend/css/global.45591136.css.gz", @@ -800,7 +800,7 @@ "css/chunk-vendors.9904f9d0.css", "js/chunk-vendors.874df7f4.js", "css/compilacao.f4baf459.css", - "js/compilacao.1c9473f1.js" + "js/compilacao.d68d2b28.js" ] }, "publicPath": "/static/sapl/frontend/" diff --git a/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js.gz b/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js.gz deleted file mode 100644 index 09be795cb75ac281d2b30019c5ac09e9e3775cf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6738 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 diff --git a/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js b/sapl/static/sapl/frontend/js/compilacao.d68d2b28.js similarity index 99% rename from sapl/static/sapl/frontend/js/compilacao.1c9473f1.js rename to sapl/static/sapl/frontend/js/compilacao.d68d2b28.js index b6fc1085c..707fb379d 100644 --- a/sapl/static/sapl/frontend/js/compilacao.1c9473f1.js +++ b/sapl/static/sapl/frontend/js/compilacao.d68d2b28.js @@ -1 +1 @@ -(()=>{var r,c,t,i={4248:(t,e,i)=>{var o=i(9755),l=(i(2564),i(7327),i(1539),i(9826),i(1038),i(8783),i(1249),i(4916),i(3123),window.$);window.DispositivoEdit=function(){var d,n="textarea";if(!(this instanceof window.DispositivoEdit))return d=d||new window.DispositivoEdit;d=this,window.DispositivoEdit=function(){return d},d.bindActionsEditorType=function(t){n=this.getAttribute("editortype"),window.SetCookie("editortype",n,30);var e=l(this).closest(".dpt").attr("pk");d.clearEditSelected(),d.triggerBtnDptEdit(e),t.preventDefault()},d.bindActionsClick=function(t){var e=this.getAttribute("pk"),i={action:this.getAttribute("action"),tipo_pk:this.getAttribute("tipo_pk"),perfil_pk:this.getAttribute("perfil_pk"),variacao:this.getAttribute("variacao"),pk_bloco:this.getAttribute("pk_bloco")},e=e+"/refresh";d.waitShow(),l.get(e,i).done(function(t){d.clearEditSelected(),null!=t.pk&&d.message(t)}).fail(d.waitHide).always(d.waitHide)},d.clearEditSelected=function(){l(".dpt-selected > .dpt-form").html(""),l(".dpt-actions, .dpt-actions-bottom").html(""),window.tinymce.remove(),l(".dpt-selected").removeClass("dpt-selected")},d.editDispositivo=function(t){var e,t=t.target.classList.contains("dpt-link")?t.target:t.target.parentElement.classList.contains("dpt-link")?t.target.parentElement:null;t&&t.getAttribute("href")&&0 .dpt-form").html("")},500)},d.get_form_base=function(){var t=l(this);t.addClass("dpt-selected"),t.children().filter(".dpt-form").find("form").submit(d.onSubmitEditFormBase),d.scrollTo(t),t.off("get_form_base");t.find(".btn-fechar").on("click",function(t){d.clearEditSelected(),t.preventDefault()});var e=t.find(".btns-excluir");t.find(".dpt-actions-bottom").first().append(e),e.find(".btn-outline-danger").on("click",d.bindActionsClick)},d.get_form_alteracao=function(){var e=l(this),t=(e.off("get_form_alteracao"),l(".dpt-actions, .dpt-actions-bottom").html(""),e.children().filter(".dpt-form").children().first()),i=t[0].id_dispositivo_search_form.value;window.DispositivoSearch({url_form:i,text_button:"Selecionar",autostart:!0}),d.scrollTo(e),t.submit(d.onSubmitFormRegistraAlteracao),e.find(".btn-fechar").on("click",function(t){d.clearEditSelected(),d.triggerBtnDptEdit(e.attr("pk")),t.preventDefault()})},d.get_form_inclusao=function(){var e=l(this),t=(e.off("get_form_inclusao"),l(".dpt-actions, .dpt-actions-bottom").html(""),e.children().filter(".dpt-form").children().first()),i=t[0].id_dispositivo_search_form.value;window.DispositivoSearch({url_form:i,text_button:"Selecionar",post_selected:d.allowed_inserts_registro_inclusao,params_post_selected:{pk_bloco:e.attr("pk")},autostart:!0}),d.scrollTo(e),t.submit(d.onSubmitFormRegistraInclusao),e.find(".btn-fechar").on("click",function(t){d.clearEditSelected(),d.triggerBtnDptEdit(e.attr("pk")),t.preventDefault()})},d.get_form_revogacao=function(){var t=l(this),e=(t.off("get_form_revogacao"),l(".dpt-actions, .dpt-actions-bottom").html(""),t.children().filter(".dpt-form").children().first()),i=e[0].id_dispositivo_search_form.value;window.DispositivoSearch({url_form:i,text_button:"Selecionar",autostart:!0}),d.scrollTo(t),e.submit(d.onSubmitFormRegistraRevogacao),t.find(".btn-fechar").on("click",function(){d.clearEditSelected(),d.triggerBtnDptEdit(t.attr("pk"))})},d.allowed_inserts_registro_inclusao=function(t){var e=l("#id"+t.pk_bloco+" input[name='dispositivo_base_para_inclusao']");0!==e.length&&(e=e[0].value,t={action:"get_actions_allowed_inserts_registro_inclusao",pk_bloco:t.pk_bloco},e=e+"/refresh",d.waitShow(),l.get(e,t).done(function(t){l(".allowed_inserts").html(t),l(".allowed_inserts").find(".btn-action").on("click",d.bindActionsClick)}).fail(d.waitHide).always(d.waitHide))},d.loadActionsEdit=function(e){var t=e.attr("pk");l.get(t+"/refresh?action=get_actions").done(function(t){e.find(".dpt-actions").first().html(t),e.find(".btn-action").on("click",d.bindActionsClick),e.find(".btn-compila").on("click",d.loadFormsCompilacao),e.find(".btn-editor-type").on("click",d.bindActionsEditorType),"construct"===n&&(e.find(".btn-group-inserts").first().addClass("open show"),e.find(".btn-group-inserts ul").first().addClass("show")),e.find(".btn-group-inserts button").mouseenter(function(t){e.find(".btn-group-inserts ul").removeClass("show"),e.find(".btn-group-inserts").removeClass("open show"),l(this.parentElement).addClass("open show"),l(this.parentElement).find("ul").addClass("show")}),e.find(".btn-group-inserts").mouseleave(function(t){e.find(".btn-group-inserts ul").removeClass("show"),e.find(".btn-group-inserts").removeClass("open show")}),d.gc()})},d.loadForm=function(e,i){var t=e.attr("pk"),o=e.children().filter(".dpt-form");1===o.length&&l.get(t+"/refresh?action="+i).done(function(t){"construct"!==n&&(o.html(t),"tinymce"===n&&window.initTextRichEditor(null,!1,!0)),e.trigger(i)}).always(function(){d.waitHide()})},d.loadFormsCompilacao=function(t){var e=l(this).closest(".dpt"),i=this.getAttribute("action");e.on(i,d[i]),d.loadForm(e,i)},d.modalMessage=function(t,e,i){return null!==t&&""!==t&&(l("#modal-message #message").html(t),l("#modal-message").modal("show"),l("#modal-message, #modal-message .alert button").off(),l("#modal-message .alert").removeClass("alert-success alert-info alert-warning alert-danger alert-danger"),l("#modal-message .alert").addClass(e),null!=i&&l("#modal-message").on("hidden.bs.modal",i),l("#modal-message .alert button").on("click",function(){l("#modal-message").modal("hide")}),!0)},d.message=function(t){var e,i;void 0!==t.message?t.message.modal?d.modalMessage(t.message.value,"alert-"+t.message.type,function(){d.waitShow(),d.refreshScreenFocusPk(t)}):(d.refreshScreenFocusPk(t),"message"in t&&((e=l(".cp-notify")).removeClass("hide"),(i=e.find(".message")).html(t.message.value),i.removeClass("bg-primary bg-success bg-info bg-warning bg-danger").addClass("bg-"+t.message.type),setTimeout(function(){e.addClass("hide")},t.message.time||3e3))):d.refreshScreenFocusPk(t)},d.offClicks=function(){l(".btn-dpt-edit").off()},d.onClicks=function(t){t=null==t?l(".btn-dpt-edit"):l(t).find(".btn-dpt-edit");t.on("click",d.editDispositivo)},d.onSubmitFormRegistraAlteracao=function(t){var e,i;void 0===this.dispositivo_alterado?d.modalMessage("Nenhum dispositivo selecionado","alert-info"):(e=void 0===this.dispositivo_alterado.length?[this.dispositivo_alterado]:Array.from(this.dispositivo_alterado),e={csrfmiddlewaretoken:this.csrfmiddlewaretoken.value,dispositivo_alterado:e.filter(function(t,e,i){return t.checked}).map(function(t){return t.value}),formtype:"get_form_alteracao"},i=l(this).closest(".dpt").attr("pk")+"/refresh",d.waitShow(),l.post(i,e).done(function(t){d.clearEditSelected(),null!=t.pk?d.message(t):alert("Erro na resposta!")}).always(function(){d.waitHide()})),null!=t&&t.preventDefault()},d.onSubmitFormRegistraInclusao=function(t){var e={csrfmiddlewaretoken:this.csrfmiddlewaretoken.value,dispositivo_base_para_inclusao:this.dispositivo_base_para_inclusao.value,formtype:"get_form_inclusao"},i=l(this).closest(".dpt").attr("pk")+"/refresh";d.waitShow(),l.post(i,e).done(function(t){d.clearEditSelected(),null!=t.pk?d.message(t):alert("Erro na resposta!")}).always(function(){d.waitHide()}),null!=t&&t.preventDefault()},d.onSubmitFormRegistraRevogacao=function(t){var e,i;void 0===this.dispositivo_revogado?d.modalMessage("Nenhum dispositivo selecionado","alert-info"):(e=void 0===this.dispositivo_revogado.length?[this.dispositivo_revogado]:Array.from(this.dispositivo_revogado),e={csrfmiddlewaretoken:this.csrfmiddlewaretoken.value,dispositivo_revogado:e.filter(function(t,e,i){return t.checked}).map(function(t){return t.value}),revogacao_em_bloco:this.revogacao_em_bloco.value,formtype:"get_form_revogacao"},i=l(this).closest(".dpt").attr("pk")+"/refresh",d.waitShow(),l.post(i,e).done(function(t){d.clearEditSelected(),null!=t.pk?d.message(t):alert("Erro na resposta!")}).always(function(t){d.waitHide()})),null!=t&&t.preventDefault()},d.onSubmitEditFormBase=function(t){var i=this,e="",o="",n="",a=window.tinymce.get("id_texto"),s=window.tinymce.get("id_texto_atualizador"),e=null!=a?a.getContent():this.id_texto.value,a=(null!=s?o=s.getContent():"id_texto_atualizador"in this&&(o=this.id_texto_atualizador.value),"visibilidade"in this&&(n=this.visibilidade.value),{csrfmiddlewaretoken:this.csrfmiddlewaretoken.value,texto:e,texto_atualizador:o,visibilidade:n,formtype:"get_form_base"}),s=l(this).closest(".dpt").attr("pk")+"/refresh";d.waitShow(),l.post(s,a).done(function(t){var e;"string"==typeof t?(e=l(i).closest(".dpt"),e=l("#"+e.replaceWith(t).attr("id")),d.onClicks(e),d.waitHide()):(d.clearEditSelected(),null!=t.pk?d.message(t):alert("Erro na resposta!"))}).always(function(){d.waitHide()}),null!=t&&t.preventDefault()},d.refreshContent=function(i,o){var n;0===i.length?d.waitHide():(n=i.shift(),l.get(n+"/refresh").done(function(t){var e=l("#id"+n).closest(".dpt"),e=l("#"+e.replaceWith(t).attr("id"));d.onClicks(e),d.reloadFunctionsDraggables(),0 .dpt-text.btn-dpt-edit");(e=0===e.length?l("#id"+t+" > .dpt-actions-fixed > .btn-dpt-edit"):e).first().trigger("click")},d.waitHide=function(){l("#wait_message").addClass("displaynone")},d.waitShow=function(){l("#wait_message").removeClass("displaynone")},d.init=function(){l(".dpt-actions-fixed").first().css("opacity","1"),null!==(n=window.ReadCookie("editortype"))&&""!==n||(n="textarea",window.SetCookie("editortype",n,30)),d.offClicks(),d.onClicks(),d.reloadFunctionsDraggables();var t=location.href.split("#");2===t.length&&""!==t[1]&&d.triggerBtnDptEdit(t[1]),l("main").click(function(t){t.target!==this&&t.target!==this.firstElementChild||d.clearEditSelected()}),d.waitHide()},d.init()},l(document).ready(function(){0{"use strict";i(6992),i(8674),i(9601),i(7727),i(9554),i(1539),i(4747),i(3710),i(2130),i(9550),i(2772),i(8221),i(9826),i(7327),i(8862),i(2564),i(4916),i(3123),i(1058);var o=i(9755),f=window.$;function m(t){f(t).append('
')}var n={SetCookie:function(t,e,i){var o=new Date,n=new Date;null!==i&&0!==i||(i=1),n.setTime(o.getTime()+864e5*i),document.cookie=t+"="+escape(e)+";expires="+n.toGMTString()},ReadCookie:function(t){var e,i=" "+document.cookie,o=i.indexOf(" "+t+"=");return-1===(o=-1===o?i.indexOf(";"+t+"="):o)||""===t?"":(-1===(e=i.indexOf(";",o+1))&&(e=i.length),unescape(i.substring(o+t.length+2,e)))},insertWaitAjax:m,InitViewTAs:function(){setTimeout(function(){var t=location.href.split("#");if(2===t.length)try{o("html, body").animate({scrollTop:o("#dptt"+t[1]).offset().top-window.innerHeight/9},0)}catch(t){}},100),o("#btn_font_menos").click(function(){o(".dpt").css("font-size","-=1")}),o("#btn_font_mais").click(function(){o(".dpt").css("font-size","+=1")}),o(".dpt.bloco_alteracao .dpt").each(function(){var t=parseInt(o(this).attr("nivel"));o(this).css("z-index",15-t)}),o(".cp-linha-vigencias > li:not(:first-child):not(:last-child) > a").click(function(t){o(".cp-linha-vigencias > li").removeClass("active"),o(this).closest("li").addClass("active"),t.preventDefault()}),o("main").click(function(t){t.target!==this&&t.target!==this.firstElementChild||o(".cp-linha-vigencias > li").removeClass("active")})},DispositivoSearch:function(d){f(function(){var u={},s=f("body").children("#container_ds");0'),f("body").prepend(s),f('[data-sapl-ta="DispositivoSearch"]').each(function(){function e(t){var e;"checkbox"===r?((e=a.find('input[name="ta_select_all"]')).off(),e.on("change",function(t){f(this).closest("ul").find('input[name="'+c+'"]').prop("checked",this.checked)})):((e=a.find("input")).off(),e.attr("type","hidden"),f('').insertBefore(e).append(f('')).on("click",function(){(2===f(this).closest("ul").find("li").length?f(this).closest("ul"):f(this).closest("li")).remove()}))}function o(t){var e=f('select[name="tipo_ta"]').val(),i=f('select[name="tipo_model"]').val(),o=f('input[name="num_ta"]').val(),n=f('input[name="ano_ta"]').val(),a=f('input[name="tipo_resultado"]:checked').val(),s=f('input[name="rotulo_dispositivo"]').val(),d=f('input[name="texto_dispositivo"]').val(),l=f('select[name="max_results"]').val();0'),a.prepend(t),f("
- {{materia.tipo.descricao}} - {{materia.tipo.sigla}} {{materia.numero}}/{{materia.ano}} - {{materia.ementa}} + {{materia_em_tramitacao.materia.tipo.descricao}} - {{materia_em_tramitacao.materia.tipo.sigla}} {{materia_em_tramitacao.materia.numero}}/{{materia_em_tramitacao.materia.ano}} +
+ + Data de Fim de Prazo: {{materia_em_tramitacao.tramitacao.data_fim_prazo}} + +
+ {{materia_em_tramitacao.materia.ementa}} + + {% if not tramitacao__status or not tramitacao__unidade_tramitacao_destino %} + +
+ Local Atual: {{ materia_em_tramitacao.materia.tramitacao_set.first.unidade_tramitacao_destino }} +
+ Status: {{ materia_em_tramitacao.materia.tramitacao_set.first.status }} +
+ Texto da Ação: {{ materia_em_tramitacao.materia.tramitacao_set.first.texto }} +
+ {% endif %} +

Foram encontradas {{object_list|length}} matérias com esses parâmetros.

+
@@ -26,12 +26,29 @@ - {% for materia in object_list %} + {% for materia_em_tramitacao in object_list %} + - {% endfor %} @@ -39,4 +56,4 @@ {% else %}

{% endif %} -{% endblock content %} +{% endblock content %} diff --git a/sapl/templates/relatorios/relatorio_materias_em_tramitacao.html b/sapl/templates/relatorios/relatorio_materias_em_tramitacao.html index 8ca3de094..fda232f95 100644 --- a/sapl/templates/relatorios/relatorio_materias_em_tramitacao.html +++ b/sapl/templates/relatorios/relatorio_materias_em_tramitacao.html @@ -51,4 +51,4 @@ {% else %}

Nenhum documento encontrado com essas especificações

{% endif %} -{% endblock content %} +{% endblock content %} From ea06eded6407a3cb814c6fa3e69636b1172d03aa Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Mon, 29 May 2023 16:50:35 -0300 Subject: [PATCH 47/80] impl: add campo para script do google analytics --- sapl/base/forms.py | 10 ++++++- ...7_appconfig_google_analytics_id_metrica.py | 18 ++++++++++++ sapl/base/models.py | 7 ++++- sapl/templates/base.html | 29 ++++++++++++++----- sapl/templates/base/layouts.yaml | 1 + 5 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 sapl/base/migrations/0057_appconfig_google_analytics_id_metrica.py diff --git a/sapl/base/forms.py b/sapl/base/forms.py index e5ff871c4..a197fc8de 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -1620,6 +1620,12 @@ class ConfiguracoesAppForm(ModelForm): max_length=256, required=False) + google_analytics_id_metrica = forms.CharField( + label=AppConfig._meta.get_field( + 'google_analytics_id_metrica').verbose_name, + max_length=256, + required=False) + class Meta: model = AppConfig fields = ['documentos_administrativos', @@ -1648,8 +1654,10 @@ class ConfiguracoesAppForm(ModelForm): 'tramitacao_documento', 'google_recaptcha_site_key', 'google_recaptcha_secret_key', + 'google_analytics_id_metrica', 'sapl_as_sapn', - 'identificacao_de_documentos'] + 'identificacao_de_documentos', + ] def __init__(self, *args, **kwargs): super(ConfiguracoesAppForm, self).__init__(*args, **kwargs) diff --git a/sapl/base/migrations/0057_appconfig_google_analytics_id_metrica.py b/sapl/base/migrations/0057_appconfig_google_analytics_id_metrica.py new file mode 100644 index 000000000..7f6623fc6 --- /dev/null +++ b/sapl/base/migrations/0057_appconfig_google_analytics_id_metrica.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0056_auto_20221118_1330'), + ] + + operations = [ + migrations.AddField( + model_name='appconfig', + name='google_analytics_id_metrica', + field=models.CharField(default='', max_length=256, verbose_name='ID da Métrica do Google Analytics'), + ), + ] diff --git a/sapl/base/models.py b/sapl/base/models.py index e60ad589d..43b8ab349 100644 --- a/sapl/base/models.py +++ b/sapl/base/models.py @@ -234,7 +234,8 @@ class AppConfig(models.Model): verbose_name=_('Mostrar brasão da Casa no painel?')) mostrar_voto = models.BooleanField( - verbose_name=_('Exibir voto do Parlamentar antes de encerrar a votação?'), + verbose_name=_( + 'Exibir voto do Parlamentar antes de encerrar a votação?'), choices=YES_NO_CHOICES, default=False) # MÓDULO ESTATÍSTICAS DE ACESSO @@ -259,6 +260,10 @@ class AppConfig(models.Model): verbose_name=_('Chave privada gerada pelo Google Recaptcha'), max_length=256, default='') + google_analytics_id_metrica = models.CharField( + verbose_name=_('ID da Métrica do Google Analytics'), + max_length=256, default='') + class Meta: verbose_name = _('Configurações da Aplicação') verbose_name_plural = _('Configurações da Aplicação') diff --git a/sapl/templates/base.html b/sapl/templates/base.html index ea96d3035..cfb3096b5 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -264,14 +264,6 @@ {% block extra_js %}{% endblock extra_js %} - - {% if not DEBUG %} - - - {% endif %} - + + + {% if not DEBUG %} + + + + {% if "google_analytics_id_metrica"|get_config_attr %} + + + + {% endif %} + {% endif %} + + {% endblock foot_js %} diff --git a/sapl/templates/base/layouts.yaml b/sapl/templates/base/layouts.yaml index 6ff5ebe44..077bff9e7 100644 --- a/sapl/templates/base/layouts.yaml +++ b/sapl/templates/base/layouts.yaml @@ -52,6 +52,7 @@ AppConfig: {% trans 'Estatísticas de acesso' %}: - estatisticas_acesso_normas + - google_analytics_id_metrica {% trans 'Segurança' %}: - google_recaptcha_site_key google_recaptcha_secret_key From 4c8df2aeb8ba123559c3e43c7031cc69c1b4249e Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Mon, 29 May 2023 16:51:03 -0300 Subject: [PATCH 48/80] add migrate de ano novo --- .../migrations/0018_auto_20230529_1641.py | 17 ++++++++++ .../migrations/0082_auto_20230529_1641.py | 33 +++++++++++++++++++ .../migrations/0044_auto_20230529_1641.py | 29 ++++++++++++++++ .../migrations/0042_auto_20230529_1641.py | 18 ++++++++++ .../migrations/0044_auto_20230529_1641.py | 23 +++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 sapl/audiencia/migrations/0018_auto_20230529_1641.py create mode 100644 sapl/materia/migrations/0082_auto_20230529_1641.py create mode 100644 sapl/norma/migrations/0044_auto_20230529_1641.py create mode 100644 sapl/parlamentares/migrations/0042_auto_20230529_1641.py create mode 100644 sapl/protocoloadm/migrations/0044_auto_20230529_1641.py diff --git a/sapl/audiencia/migrations/0018_auto_20230529_1641.py b/sapl/audiencia/migrations/0018_auto_20230529_1641.py new file mode 100644 index 000000000..98df068ec --- /dev/null +++ b/sapl/audiencia/migrations/0018_auto_20230529_1641.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('audiencia', '0017_audienciapublica_ano'), + ] + + operations = [ + migrations.AlterModelOptions( + name='audienciapublica', + options={'ordering': ['ano', 'numero', 'nome', 'tipo'], 'verbose_name': 'Audiência Pública', 'verbose_name_plural': 'Audiências Públicas'}, + ), + ] diff --git a/sapl/materia/migrations/0082_auto_20230529_1641.py b/sapl/materia/migrations/0082_auto_20230529_1641.py new file mode 100644 index 000000000..191ea28a2 --- /dev/null +++ b/sapl/materia/migrations/0082_auto_20230529_1641.py @@ -0,0 +1,33 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0081_auto_20220321_0934'), + ] + + operations = [ + migrations.AlterField( + model_name='materialegislativa', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano'), + ), + migrations.AlterField( + model_name='materialegislativa', + name='ano_origem_externa', + field=models.PositiveSmallIntegerField(blank=True, choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], null=True, verbose_name='Ano'), + ), + migrations.AlterField( + model_name='numeracao', + name='ano_materia', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano'), + ), + migrations.AlterField( + model_name='proposicao', + name='ano', + field=models.PositiveSmallIntegerField(blank=True, choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], default=None, null=True, verbose_name='Ano'), + ), + ] diff --git a/sapl/norma/migrations/0044_auto_20230529_1641.py b/sapl/norma/migrations/0044_auto_20230529_1641.py new file mode 100644 index 000000000..a09ee4816 --- /dev/null +++ b/sapl/norma/migrations/0044_auto_20230529_1641.py @@ -0,0 +1,29 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations, models +import sapl.norma.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('norma', '0043_viewnormasestatisticas'), + ] + + operations = [ + migrations.AlterField( + model_name='anexonormajuridica', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano'), + ), + migrations.AlterField( + model_name='normaestatisticas', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], default=sapl.norma.models.get_ano_atual, verbose_name='Ano'), + ), + migrations.AlterField( + model_name='normajuridica', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano'), + ), + ] diff --git a/sapl/parlamentares/migrations/0042_auto_20230529_1641.py b/sapl/parlamentares/migrations/0042_auto_20230529_1641.py new file mode 100644 index 000000000..d941d0424 --- /dev/null +++ b/sapl/parlamentares/migrations/0042_auto_20230529_1641.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('parlamentares', '0041_parlamentar_telefone_celular'), + ] + + operations = [ + migrations.AlterField( + model_name='parlamentar', + name='telefone_celular', + field=models.CharField(blank=True, max_length=50, verbose_name='Telefone Celular'), + ), + ] diff --git a/sapl/protocoloadm/migrations/0044_auto_20230529_1641.py b/sapl/protocoloadm/migrations/0044_auto_20230529_1641.py new file mode 100644 index 000000000..6b7396677 --- /dev/null +++ b/sapl/protocoloadm/migrations/0044_auto_20230529_1641.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.28 on 2023-05-29 19:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('protocoloadm', '0043_auto_20220919_1705'), + ] + + operations = [ + migrations.AlterField( + model_name='documentoadministrativo', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano'), + ), + migrations.AlterField( + model_name='protocolo', + name='ano', + field=models.PositiveSmallIntegerField(choices=[(2024, 2024), (2023, 2023), (2022, 2022), (2021, 2021), (2020, 2020), (2019, 2019), (2018, 2018), (2017, 2017), (2016, 2016), (2015, 2015), (2014, 2014), (2013, 2013), (2012, 2012), (2011, 2011), (2010, 2010), (2009, 2009), (2008, 2008), (2007, 2007), (2006, 2006), (2005, 2005), (2004, 2004), (2003, 2003), (2002, 2002), (2001, 2001), (2000, 2000), (1999, 1999), (1998, 1998), (1997, 1997), (1996, 1996), (1995, 1995), (1994, 1994), (1993, 1993), (1992, 1992), (1991, 1991), (1990, 1990), (1989, 1989), (1988, 1988), (1987, 1987), (1986, 1986), (1985, 1985), (1984, 1984), (1983, 1983), (1982, 1982), (1981, 1981), (1980, 1980), (1979, 1979), (1978, 1978), (1977, 1977), (1976, 1976), (1975, 1975), (1974, 1974), (1973, 1973), (1972, 1972), (1971, 1971), (1970, 1970), (1969, 1969), (1968, 1968), (1967, 1967), (1966, 1966), (1965, 1965), (1964, 1964), (1963, 1963), (1962, 1962), (1961, 1961), (1960, 1960), (1959, 1959), (1958, 1958), (1957, 1957), (1956, 1956), (1955, 1955), (1954, 1954), (1953, 1953), (1952, 1952), (1951, 1951), (1950, 1950), (1949, 1949), (1948, 1948), (1947, 1947), (1946, 1946), (1945, 1945), (1944, 1944), (1943, 1943), (1942, 1942), (1941, 1941), (1940, 1940), (1939, 1939), (1938, 1938), (1937, 1937), (1936, 1936), (1935, 1935), (1934, 1934), (1933, 1933), (1932, 1932), (1931, 1931), (1930, 1930), (1929, 1929), (1928, 1928), (1927, 1927), (1926, 1926), (1925, 1925), (1924, 1924), (1923, 1923), (1922, 1922), (1921, 1921), (1920, 1920), (1919, 1919), (1918, 1918), (1917, 1917), (1916, 1916), (1915, 1915), (1914, 1914), (1913, 1913), (1912, 1912), (1911, 1911), (1910, 1910), (1909, 1909), (1908, 1908), (1907, 1907), (1906, 1906), (1905, 1905), (1904, 1904), (1903, 1903), (1902, 1902), (1901, 1901), (1900, 1900), (1899, 1899), (1898, 1898), (1897, 1897), (1896, 1896), (1895, 1895), (1894, 1894), (1893, 1893), (1892, 1892), (1891, 1891), (1890, 1890)], verbose_name='Ano do Protocolo'), + ), + ] From 5e7da2348b46d3d664d6ee18d095dc1d36071ce9 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Mon, 29 May 2023 16:58:00 -0300 Subject: [PATCH 49/80] =?UTF-8?q?fix:=20for=C3=A7a=20periodo=20de=20busca?= =?UTF-8?q?=20no=20relatorio=20audit=20log=20(#3639)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: joao --- sapl/base/views.py | 64 +++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index 2ca3289ff..88bc57943 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -43,12 +43,12 @@ from sapl.base.forms import (AutorForm, TipoAutorForm, AutorFilterSet, Recuperar OperadorAutorForm, LoginForm, SaplSearchForm) from sapl.base.models import AuditLog, Autor, TipoAutor, OperadorAutor from sapl.comissoes.models import Comissao, Reuniao -from sapl.crud.base import CrudAux, make_pagination, Crud,\ +from sapl.crud.base import CrudAux, make_pagination, Crud, \ ListWithSearchForm, MasterDetailCrud from sapl.materia.models import (Anexada, Autoria, DocumentoAcessorio, MateriaEmTramitacao, MateriaLegislativa, Proposicao, StatusTramitacao, TipoDocumento, TipoMateriaLegislativa, UnidadeTramitacao, MateriaAssunto) -from sapl.norma.models import NormaJuridica, TipoNormaJuridica,\ +from sapl.norma.models import NormaJuridica, TipoNormaJuridica, \ NormaEstatisticas, ViewNormasEstatisticas from sapl.parlamentares.models import ( Filiacao, Legislatura, Mandato, Parlamentar, SessaoLegislativa) @@ -240,15 +240,15 @@ class AutorCrud(CrudAux): url_base = full_url[:full_url.find('sistema') - 1] mensagem = ( - "Este e-mail foi utilizado para fazer cadastro no " + - "SAPL com o perfil de Autor. Agora você pode " + - "criar/editar/enviar Proposições.\n" + - "Seu nome de usuário é: " + - self.request.POST['username'] + "\n" - "Caso você não tenha feito este cadastro, por favor " + - "ignore esta mensagem. Caso tenha, clique " + - "no link abaixo\n" + url_base + - reverse('sapl.base:confirmar_email', kwargs=kwargs)) + "Este e-mail foi utilizado para fazer cadastro no " + + "SAPL com o perfil de Autor. Agora você pode " + + "criar/editar/enviar Proposições.\n" + + "Seu nome de usuário é: " + + self.request.POST['username'] + "\n" + "Caso você não tenha feito este cadastro, por favor " + + "ignore esta mensagem. Caso tenha, clique " + + "no link abaixo\n" + url_base + + reverse('sapl.base:confirmar_email', kwargs=kwargs)) remetente = settings.EMAIL_SEND_USER destinatario = [user.email] send_mail(assunto, mensagem, remetente, destinatario, @@ -399,7 +399,7 @@ class RelatorioDocumentosAcessoriosView(RelatorioMixin, FilterView): if not data_final: data_final = "Data Final não definida" context['periodo'] = ( - data_inicial + ' - ' + data_final + data_inicial + ' - ' + data_final ) return context @@ -424,8 +424,8 @@ class RelatorioAtasView(RelatorioMixin, FilterView): context['show_results'] = show_results_filter_set(qr) context['periodo'] = ( - self.request.GET['data_inicio_0'] + - ' - ' + self.request.GET['data_inicio_1']) + self.request.GET['data_inicio_0'] + + ' - ' + self.request.GET['data_inicio_1']) return context @@ -945,9 +945,9 @@ class RelatorioMateriasPorAnoAutorTipoView(RelatorioMixin, FilterView): 'autor', 'materia__tipo__sigla', 'materia__tipo__descricao').annotate( - total=Count('materia__tipo')).order_by( - 'autor', - 'materia__tipo') + total=Count('materia__tipo')).order_by( + 'autor', + 'materia__tipo') autores_ids = set([i['autor'] for i in autorias]) @@ -1050,8 +1050,8 @@ class RelatorioMateriasPorAutorView(RelatorioMixin, FilterView): else: context['autor'] = '' context['periodo'] = ( - self.request.GET['data_apresentacao_0'] + - ' - ' + self.request.GET['data_apresentacao_1']) + self.request.GET['data_apresentacao_0'] + + ' - ' + self.request.GET['data_apresentacao_1']) return context @@ -1171,12 +1171,12 @@ class RelatorioNormasVigenciaView(RelatorioMixin, FilterView): context['vigencia'] = 'Vigente' context['quant_vigente'] = len(context['object_list']) context['quant_nao_vigente'] = context['quant_total'] - \ - context['quant_vigente'] + context['quant_vigente'] else: context['vigencia'] = 'Não vigente' context['quant_nao_vigente'] = len(context['object_list']) context['quant_vigente'] = context['quant_total'] - \ - context['quant_nao_vigente'] + context['quant_nao_vigente'] qr = self.request.GET.copy() context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' @@ -1687,7 +1687,7 @@ class ListarParlMandatosIntersecaoView(PermissionRequiredMixin, ListView): def parlamentares_duplicados(): return [parlamentar for parlamentar in Parlamentar.objects.values( 'nome_parlamentar').order_by('nome_parlamentar').annotate(count=Count( - 'nome_parlamentar')).filter(count__gt=1)] + 'nome_parlamentar')).filter(count__gt=1)] class ListarParlamentaresDuplicadosView(PermissionRequiredMixin, ListView): @@ -1724,10 +1724,10 @@ def get_estatistica(request): datas = [ materias.order_by( '-data_ultima_atualizacao').values_list('data_ultima_atualizacao', flat=True) - .exclude(data_ultima_atualizacao__isnull=True).first(), + .exclude(data_ultima_atualizacao__isnull=True).first(), normas.order_by( '-data_ultima_atualizacao').values_list('data_ultima_atualizacao', flat=True) - .exclude(data_ultima_atualizacao__isnull=True).first() + .exclude(data_ultima_atualizacao__isnull=True).first() ] max_data = max(datas) if datas[0] and datas[1] else next( @@ -2076,7 +2076,8 @@ class AppConfigCrud(CrudAux): except ValidationError as e: form.add_error('receber_recibo_proposicao', e) msg = _( - "Não foi possível mudar a configuração porque a Proposição {} não possui texto original vinculado!".format(prop)) + "Não foi possível mudar a configuração porque a Proposição {} não possui texto original vinculado!".format( + prop)) messages.error(self.request, msg) return super().form_invalid(form) return super().form_valid(form) @@ -2299,6 +2300,13 @@ class PesquisarAuditLogView(PermissionRequiredMixin, FilterView): return context def get(self, request, *args, **kwargs): + timefilter = request.GET.get('timestamp', None) + + if not timefilter: + newgetrequest = request.GET.copy() + newgetrequest['timestamp'] = 'week' + request.GET = newgetrequest + super(PesquisarAuditLogView, self).get(request) data = self.filterset.data @@ -2362,7 +2370,6 @@ class LogotipoView(RedirectView): def filtro_campos(dicionario): - chaves_desejadas = ['ementa', 'ano', 'numero', @@ -2385,7 +2392,6 @@ def filtro_campos(dicionario): def pesquisa_textual(request): - if 'q' not in request.GET: return JsonResponse({'total': 0, 'resultados': []}) @@ -2510,7 +2516,7 @@ class RelatorioNormasPorAutorView(RelatorioMixin, FilterView): else: context['autor'] = '' context['periodo'] = ( - self.request.GET['data_0'] + - ' - ' + self.request.GET['data_1']) + self.request.GET['data_0'] + + ' - ' + self.request.GET['data_1']) return context From 28941ca789d151e05a972edcabd70b78f463e897 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Mon, 29 May 2023 16:58:26 -0300 Subject: [PATCH 50/80] feat: adiciona a coluna assunto na list de correspondencias do expediente do dia (#3640) Co-authored-by: joao --- sapl/sessao/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 4ad940c96..683b1477c 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -5191,7 +5191,7 @@ class CorrespondenciaCrud(MasterDetailCrud): class BaseMixin(MasterDetailCrud.BaseMixin): list_field_names = ['numero_ordem', - ('documento__data', 'documento__interessado'), 'documento'] + ('documento__data', 'documento__interessado'), 'documento', 'documento__assunto'] def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) From eb20eb6d1d33f2ca2ede63229a6ccfbfe424f9a6 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Mon, 29 May 2023 16:59:32 -0300 Subject: [PATCH 51/80] feat: Script to find and extract codified images pasted into text fields using the tinyMCE editor (#3643) Co-authored-by: joao --- ...trai_imagens_codificadas_de_campo_texto.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 scripts/extrai_imagens_codificadas_de_campo_texto.py diff --git a/scripts/extrai_imagens_codificadas_de_campo_texto.py b/scripts/extrai_imagens_codificadas_de_campo_texto.py new file mode 100644 index 000000000..762608e34 --- /dev/null +++ b/scripts/extrai_imagens_codificadas_de_campo_texto.py @@ -0,0 +1,57 @@ +import os +import base64 +import re +from django.apps import apps +from django.core.files.base import ContentFile +from django.core.files.storage import default_storage + + +def extract_images(app_name, model_name, field_name, object_id=None): + # Expressão regular para identificar a propriedade 'src' da imagem em base64 + image_data_re = re.compile(r'src=\"data:image/(?P[a-z]+);base64,(?P[^"]+)\"') + + try: + Model = apps.get_model(app_name, model_name) + except LookupError: + print(f'O modelo "{model_name}" no aplicativo "{app_name}" não existe.') + return + + # Obter todos os objetos ou um objeto específico + if object_id is None: + objects = Model.objects.all() + else: + objects = [Model.objects.get(id=object_id)] + + for obj in objects: + new_text = getattr(obj, field_name) # cópia do texto original + for match in image_data_re.finditer(new_text): + image_data = match.group('data') + image_type = match.group('type') + + # Decodifica os dados da imagem em base64 + decoded_image = base64.b64decode(image_data) + # Cria um objeto Django ContentFile para a imagem decodificada + image_file = ContentFile(decoded_image) + # Constroi um nome de arquivo + filename = f'{obj.id}_{match.start()}.{image_type}' + + # Caminho personalizado para salvar o arquivo + # Exemplo: sapl/public/dispositivo/123 + # todo: verificar se isso pode causar problemas com o armazenamento padrão + folder_path = os.path.join('sapl', 'public', model_name.lower(), str(obj.id)) + + # Salva o arquivo de imagem no armazenamento + path = default_storage.save(os.path.join(folder_path, filename), image_file) + + # Substitui a propriedade 'src' da imagem pelos dados da imagem pela URL da imagem salva + new_text = new_text.replace(match.group(), f'src="{default_storage.url(path)}"') + print(f'Imagem salva em {path}') + + # Atualiza o campo com o novo texto + print(f'Novo texto: {new_text}') + setattr(obj, field_name, new_text) + obj.save() + +# Exemplo de uso: +# extract_images('compilacao', 'Dispositivo', 'texto') +# extract_images('compilacao', 'Dispositivo', 'texto', object_id=123) From 00030b6757a4909f11acfb5c80950b0b3f016888 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Tue, 30 May 2023 14:35:09 -0300 Subject: [PATCH 52/80] =?UTF-8?q?refactor:=20altera=20t=C3=ADtulo=20do=20l?= =?UTF-8?q?ink=20e=20descri=C3=A7=C3=A3o=20de=20relat=C3=B3rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/templates/base/relatorios_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/templates/base/relatorios_list.html b/sapl/templates/base/relatorios_list.html index 61ec100ca..8fe5535fe 100644 --- a/sapl/templates/base/relatorios_list.html +++ b/sapl/templates/base/relatorios_list.html @@ -41,8 +41,8 @@
- - + + From 86099552ecf07eeaa7f0d6367fcbc3968d107051 Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 18 Jun 2023 12:27:35 -0700 Subject: [PATCH 53/80] Altera nome completo para nome parlamentar em ata (#3645) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (a exceção de assinaturas) OSTicket: https://suporte.interlegis.leg.br/scp/tickets.php?id=50504 --- .../templates/sessao/blocos_ata/lista_presenca_ordem_dia.html | 2 +- sapl/templates/sessao/blocos_ata/lista_presenca_sessao.html | 4 ++-- sapl/templates/sessao/blocos_ata/mesa_diretora.html | 2 +- sapl/templates/sessao/blocos_ata/oradores_expediente.html | 2 +- sapl/templates/sessao/blocos_ata/oradores_explicacoes.html | 2 +- sapl/templates/sessao/blocos_ata/oradores_ordemdia.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html b/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html index 58729609c..e33b3344c 100644 --- a/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html +++ b/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html @@ -5,7 +5,7 @@ {% if presenca_ordem %} Lista de Presença na Ordem do Dia: {% for p in presenca_ordem %} - {{p.nome_completo}} / {% if p|filiacao_data_filter:object.data_inicio %} {{ p|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{p.nome_parlamentar}} / {% if p|filiacao_data_filter:object.data_inicio %} {{ p|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if not forloop.last %} ; {% endif %} {% endfor %} {% endif %} diff --git a/sapl/templates/sessao/blocos_ata/lista_presenca_sessao.html b/sapl/templates/sessao/blocos_ata/lista_presenca_sessao.html index f015f3a3a..be2ebfacc 100644 --- a/sapl/templates/sessao/blocos_ata/lista_presenca_sessao.html +++ b/sapl/templates/sessao/blocos_ata/lista_presenca_sessao.html @@ -5,7 +5,7 @@ {% if presenca_sessao %} Lista de Presença na Sessão: {% for p in presenca_sessao %} - {{p.nome_completo}} / {% if p|filiacao_data_filter:object.data_inicio %} {{ p|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{p.nome_parlamentar}} / {% if p|filiacao_data_filter:object.data_inicio %} {{ p|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if not forloop.last %} ; {% endif %} {% endfor %} {% endif %} @@ -14,7 +14,7 @@ {% if justificativa_ausencia %} Justificativas de Ausências na Sessão: {% for j in justificativa_ausencia %} - {{j.parlamentar.nome_completo}} / {{ j.tipo_ausencia }} + {{j.parlamentar.nome_parlamentar}} / {{ j.tipo_ausencia }} {% if not forloop.last %} ; {% endif %} {% endfor %} {% endif %} diff --git a/sapl/templates/sessao/blocos_ata/mesa_diretora.html b/sapl/templates/sessao/blocos_ata/mesa_diretora.html index 88177d01e..6cc675354 100644 --- a/sapl/templates/sessao/blocos_ata/mesa_diretora.html +++ b/sapl/templates/sessao/blocos_ata/mesa_diretora.html @@ -6,7 +6,7 @@ Mesa Diretora: {% for m in mesa %} {{m.cargo}}: - {{m.parlamentar.nome_completo}} / {% if m.parlamentar|filiacao_data_filter:object.data_inicio %} {{ m.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{m.parlamentar.nome_parlamentar}} / {% if m.parlamentar|filiacao_data_filter:object.data_inicio %} {{ m.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if not forloop.last %} ; {% endif %} {% endfor %} {% endif %} diff --git a/sapl/templates/sessao/blocos_ata/oradores_expediente.html b/sapl/templates/sessao/blocos_ata/oradores_expediente.html index 102b627e1..b86e81694 100644 --- a/sapl/templates/sessao/blocos_ata/oradores_expediente.html +++ b/sapl/templates/sessao/blocos_ata/oradores_expediente.html @@ -5,7 +5,7 @@ {% if oradores %} Oradores do Expediente: {% for o in oradores %} - {{o.numero_ordem}} - {{o.parlamentar.nome_completo}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{o.numero_ordem}} - {{o.parlamentar.nome_parlamentar}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if o.url_discurso %} - URL Vídeo: {{o.url_discurso}} {% endif %} {% if o.observacao %} - Observação: {{o.observacao}} {% endif %} {% if not forloop.last %} ; {% endif %} diff --git a/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html b/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html index dd1a61e70..373196724 100644 --- a/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html +++ b/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html @@ -5,7 +5,7 @@ {% if oradores_explicacoes %} Oradores das Explicações Pessoais: {% for o in oradores_explicacoes %} - {{o.numero_ordem}} - {{o.parlamentar.nome_completo}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{o.numero_ordem}} - {{o.parlamentar.nome_parlamentar}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if o.observacao %} - {{o.observacao}} {% endif %} {% if not forloop.last %} ; {% endif %} {% endfor %} diff --git a/sapl/templates/sessao/blocos_ata/oradores_ordemdia.html b/sapl/templates/sessao/blocos_ata/oradores_ordemdia.html index eb50ec971..99336e214 100644 --- a/sapl/templates/sessao/blocos_ata/oradores_ordemdia.html +++ b/sapl/templates/sessao/blocos_ata/oradores_ordemdia.html @@ -5,7 +5,7 @@ {% if oradores_ordemdia %} Oradores da Ordem do Dia: {% for o in oradores_ordemdia %} - {{o.numero_ordem}} - {{o.parlamentar.nome_completo}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} + {{o.numero_ordem}} - {{o.parlamentar.nome_parlamentar}} / {% if o.parlamentar|filiacao_data_filter:object.data_inicio %} {{ o.parlamentar|filiacao_data_filter:object.data_inicio }} {% else %} Sem partido {% endif %} {% if o.url_discurso %} - URL Vídeo: {{o.url_discurso}} {% endif %} {% if o.observacao %} - Observação: {{o.observacao}} {% endif %} {% if not forloop.last %} ; {% endif %} From 8876c52686c30851e9629f7093a5e5c489f3326a Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 18 Jun 2023 12:27:46 -0700 Subject: [PATCH 54/80] =?UTF-8?q?Adiciona=20link=20para=20texto=20original?= =?UTF-8?q?=20em=20Sess=C3=A3o=20Plen=C3=A1ria=20(#3644)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/sessao/views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 683b1477c..7657489d1 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -254,6 +254,14 @@ def customize_link_materia(context, pk, has_permission, is_expediente): # idUnica para cada materia idAutor = "autor" + str(i) idAutores = "autores" + str(i) + link_texto_original = '' + if materia.texto_original: + link_texto_original = f""" + + + Texto original + + """ title_materia = f"""
{row[1][0]}
Processo: {numeracao}
@@ -261,6 +269,7 @@ def customize_link_materia(context, pk, has_permission, is_expediente): Protocolo: {num_protocolo}
Turno: {turno}
+ {link_texto_original}
""" # Na linha abaixo, o segundo argumento é None para não colocar From 2e5cdf9190efecdc691818750db82a64a573c2ef Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Sun, 18 Jun 2023 12:42:54 -0700 Subject: [PATCH 55/80] =?UTF-8?q?Adiciona=20documenta=C3=A7=C3=A3o=20autom?= =?UTF-8?q?=C3=A1tica=20de=20mudan=C3=A7as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 80051e9d1..d76d7817d 100755 --- a/release.sh +++ b/release.sh @@ -68,7 +68,8 @@ function set_rc_version { function commit_and_push { echo "committing..." - git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html + git changelog --tag $FINAL_VERSION -x >> CHANGES.md + git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html CHANGES.md git commit -m "Release: $FINAL_VERSION" git tag $FINAL_VERSION From 958ea9de42151f88e7d541b7d981031f74915372 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Sun, 18 Jun 2023 14:45:49 -0700 Subject: [PATCH 56/80] Add options to abort release generation --- release.sh | 70 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 17 deletions(-) diff --git a/release.sh b/release.sh index d76d7817d..be10e03f2 100755 --- a/release.sh +++ b/release.sh @@ -4,6 +4,10 @@ ## Versioning info: [major].[minor].[patch][-RC[num]], example: 3.1.159, 3.1.159-RC1 ## +## IMPORTANT: requires gh and git-extras commands installed +## Currently only runs on MacOS because of sed issue on lines 41 to 47 (see double quotes after -i) +## + # TODO: verificar porque só pega versões superiores (3.1.200 ao invés de 3.1.200-RC9) # VERSION=`git describe --tags --abbrev=0` @@ -11,6 +15,11 @@ VERSION_PATTERN='([0-9]+)\.([0-9]+)\.([0-9]+)(-RC[0-9]+)?' SED_AWKWARD_PATTERN="[0-9]+\.[0-9]+\.[0-9]+(-RC[0-9]+){0,1}" +# Define colors +green_color='\033[0;32m' +red_color='\033[0;31m' +reset_color='\033[0m' + LATEST_VERSION=$(git tag | egrep $VERSION_PATTERN | sort --version-sort | tail -1) MAJOR_VERSION=$(echo $LATEST_VERSION | cut -d"-" -f1) MAJOR_TAG_CREATED=$(git tag | egrep $MAJOR_VERSION"$") @@ -30,9 +39,10 @@ FINAL_VERSION= function change_files { + # TODO: figure out better way of getting latest version OLD_VERSION=$(grep -E 'interlegis/sapl:'$VERSION_PATTERN docker/docker-compose.yaml | cut -d':' -f3) - echo "Atualizando de "$OLD_VERSION" para "$FINAL_VERSION + echo "Updating from "$OLD_VERSION" to "$FINAL_VERSION"" sed -E -i "" "s|$OLD_VERSION|$FINAL_VERSION|g" docker/docker-compose.yaml @@ -61,38 +71,64 @@ function set_rc_version { fi FINAL_VERSION=$NEXT_RC_VERSION +## DEBUG +# echo "OLD_VERSION: $OLD_VERSION" +# echo "FINAL_VERSION: $FINAL_VERSION" +} - echo "OLD_VERSION: $OLD_VERSION" - echo "FINAL_VERSION: $FINAL_VERSION" +# Function to display Yes/No prompt with colored message +prompt_yes_no() { + while true; do + echo -e "${green_color}$1 (y/n): ${reset_color}\c" + read answer + case $answer in + [Yy]* ) return 0;; + [Nn]* ) return 1;; + * ) echo -e "${red_color}Please answer 'yes' or 'no'.${reset_color}";; + esac + done } function commit_and_push { - echo "committing..." + echo -e "${green_color}Committing new release $FINAL_VERSION...${color_reset}" git changelog --tag $FINAL_VERSION -x >> CHANGES.md git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html CHANGES.md - git commit -m "Release: $FINAL_VERSION" - git tag $FINAL_VERSION - - echo "================================================================================" - echo " Versão criada e gerada localmente." - echo "Para enviar pro github execute..." - echo "git push origin 3.1.x" - echo "git push origin "$FINAL_VERSION - echo "================================================================================" - echo "done." + if prompt_yes_no "${green_color}Do you want to commit SAPL $FINAL_VERSION release locally?${reset_color}"; then + git commit -m "Release: $FINAL_VERSION" + git tag $FINAL_VERSION + echo -e "${green_color}Commit and tag created locally!${color_reset}" + else + git reset --hard HEAD + echo -e "${red_color}Aborting release creation!${color_reset}" + return + fi + + echo -e "${red_color}### BEFORE PROCEEDING, MAKE SURE THE NEW VERSION NUMBER AND CHANGES ARE CORRECT!${color_reset}" + echo -e "${green_color}Release: $FINAL_VERSION${reset_color}" + if prompt_yes_no "${green_color}Do you want to publish SAPL $FINAL_VERSION release on Github?${reset_color}"; then + echo -e "${green_color}Publishing $FINAL_VERSION on Github...${reset_color}" + current_date=$(date +%Y-%m-%d) + git push origin 3.1.x + gh release create $FINAL_VERSION --repo interlegis/sapl --title "Release: $FINAL_VERSION" --notes "Release notes for $FINAL_VERSION in CHANGES.md file. Release date: $current_date" + echo -e "${green_color}Done.${reset_color}" + else + echo -e "${red_color}Publishing aborted.${reset_color}" + fi + echo "${green_color}Done.${green_color}" + echo -e "${green_color}================================================================================${color_reset}" } case "$1" in --latest) git fetch - echo $LATEST_VERSION + echo -e "${green_color}$LATEST_VERSION${reset_color}" exit 0 ;; --major) git fetch set_major_version - echo "generating major release: "$FINAL_VERSION + echo -e "${green_color}Creating MAJOR release: "$FINAL_VERSION"${reset_color}" # git tag $FINAL_VERSION change_files commit_and_push @@ -101,7 +137,7 @@ case "$1" in --rc) git fetch set_rc_version - echo "generating release candidate: "$FINAL_VERSION + echo -e "${green_color}Creating RELEASE CANDIDATE (RC): "$FINAL_VERSION"${reset_color}" # git tag $FINAL_VERSION change_files commit_and_push From 23adf66eaec6a20e34b07b06617a91e1ee465848 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Sun, 18 Jun 2023 14:46:19 -0700 Subject: [PATCH 57/80] Release: 3.1.163-RC13 --- CHANGES.md | 18 ++++++++++++++++++ docker/docker-compose.yaml | 2 +- sapl/settings.py | 2 +- sapl/templates/base.html | 2 +- setup.py | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 000000000..82d73fd96 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,18 @@ + +3.1.163-RC13 / 2023-06-18 +========================= + + * Add options to abort release generation + * Adiciona documentação automática de mudanças + * Adiciona link para texto original em Sessão Plenária (#3644) + * Altera nome completo para nome parlamentar em ata (#3645) + * refactor: altera título do link e descrição de relatório + * feat: Script to find and extract codified images pasted into text fields using the tinyMCE editor (#3643) + * feat: adiciona a coluna assunto na list de correspondencias do expediente do dia (#3640) + * fix: força periodo de busca no relatorio audit log (#3639) + * add migrate de ano novo + * impl: add campo para script do google analytics + * refactor: corrige relatório alinhando a proposta da nomenclatura + * hot-fix: corrige inicialização de variável + * fix: ativa filtro que estava comentado para debug + * impl: captura de assinaturas eletrônicas em matérias diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 6a1dfc632..8e14b5c9e 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -32,7 +32,7 @@ services: networks: - sapl-net sapl: - image: interlegis/sapl:3.1.163-RC12 + image: interlegis/sapl:3.1.163-RC13 # build: # context: ../ # dockerfile: ./docker/Dockerfile diff --git a/sapl/settings.py b/sapl/settings.py index 451c0d694..10ebf5e28 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,7 +41,7 @@ ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login/?next=' -SAPL_VERSION = '3.1.163-RC12' +SAPL_VERSION = '3.1.163-RC13' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/sapl/templates/base.html b/sapl/templates/base.html index cfb3096b5..cd56e0e52 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -194,7 +194,7 @@ Desenvolvido pelo Interlegis em software livre e aberto. - Release: 3.1.163-RC12 + Release: 3.1.163-RC13

diff --git a/setup.py b/setup.py index 9b58a3f45..5fd1b6d88 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ install_requires = [ ] setup( name='interlegis-sapl', - version='3.1.163-RC12', + version='3.1.163-RC13', packages=find_packages(), include_package_data=True, license='GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007', From 55c03639cc0f27aaf1f0c9f7348fb6f95d886236 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Mon, 19 Jun 2023 16:34:24 -0300 Subject: [PATCH 58/80] hot-fix: desconecta signal pre_save no migrate --- sapl/base/receivers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sapl/base/receivers.py b/sapl/base/receivers.py index 5405d7b10..4f5c052f5 100644 --- a/sapl/base/receivers.py +++ b/sapl/base/receivers.py @@ -10,7 +10,7 @@ from django.core import serializers from django.core.files.uploadedfile import InMemoryUploadedFile, UploadedFile from django.db.models.fields.files import FileField from django.db.models.signals import post_delete, post_save, \ - post_migrate, pre_save + post_migrate, pre_save, pre_migrate from django.db.utils import DEFAULT_DB_ALIAS from django.dispatch import receiver from django.utils import timezone @@ -465,3 +465,8 @@ def signed_files_extraction_function(sender, instance, **kwargs): def signed_files_extraction_pre_save_signal(sender, instance, **kwargs): signed_files_extraction_function(sender, instance, **kwargs) + + +@receiver(pre_migrate, dispatch_uid='disconnect_signals_pre_migrate') +def disconnect_signals_pre_migrate(*args, **kwargs): + pre_save.disconnect(dispatch_uid='signed_files_extraction_pre_save_signal') From 9f5614384ae06d3fc9f2cbe99e8f51ea3d439e09 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Sun, 25 Jun 2023 19:37:11 -0300 Subject: [PATCH 59/80] feat: Torna o campo Data Nascimento de Parlamentares sensivel (#3648) Co-authored-by: joao --- sapl/api/serializers.py | 2 +- .../templates/parlamentares/parlamentar_perfil_publico.html | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sapl/api/serializers.py b/sapl/api/serializers.py index c48eefb7d..903051d10 100644 --- a/sapl/api/serializers.py +++ b/sapl/api/serializers.py @@ -86,7 +86,7 @@ class ParlamentarSerializerPublic(SaplSerializerMixin): class Meta: model = Parlamentar - exclude = ["cpf", "rg", "fax", + exclude = ["cpf", "rg", "fax", "data_nascimento", "endereco_residencia", "municipio_residencia", "uf_residencia", "cep_residencia", "situacao_militar", "telefone_residencia", "titulo_eleitor", "fax_residencia"] diff --git a/sapl/templates/parlamentares/parlamentar_perfil_publico.html b/sapl/templates/parlamentares/parlamentar_perfil_publico.html index ce2dad1d1..de3018ca4 100644 --- a/sapl/templates/parlamentares/parlamentar_perfil_publico.html +++ b/sapl/templates/parlamentares/parlamentar_perfil_publico.html @@ -35,12 +35,6 @@ -
-
-

Data de Nascimento:   {{object.data_nascimento|default_if_none:"Não informado"}}

-
-
-

Telefone:   {{object.telefone|default_if_none:"Não informado"}}

From 3f14fecde730c1c81d045d6a398ea2271591593f Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Wed, 28 Jun 2023 18:36:33 -0700 Subject: [PATCH 60/80] HOT-FIX: conserta changelog --- docker/docker-compose.yaml | 2 +- release.sh | 13 +++++++++---- sapl/settings.py | 2 +- sapl/templates/base.html | 2 +- setup.py | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 8e14b5c9e..08c85bdbc 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -32,7 +32,7 @@ services: networks: - sapl-net sapl: - image: interlegis/sapl:3.1.163-RC13 + image: interlegis/sapl:3.1.163-RC14 # build: # context: ../ # dockerfile: ./docker/Dockerfile diff --git a/release.sh b/release.sh index be10e03f2..fa901eb25 100755 --- a/release.sh +++ b/release.sh @@ -20,7 +20,7 @@ green_color='\033[0;32m' red_color='\033[0;31m' reset_color='\033[0m' -LATEST_VERSION=$(git tag | egrep $VERSION_PATTERN | sort --version-sort | tail -1) +LATEST_VERSION=$(git tag | egrep $VERSION_PATTERN | sort --version-sort -r | head -1) MAJOR_VERSION=$(echo $LATEST_VERSION | cut -d"-" -f1) MAJOR_TAG_CREATED=$(git tag | egrep $MAJOR_VERSION"$") @@ -51,6 +51,7 @@ function change_files { sed -E -i "" "s|$OLD_VERSION|$FINAL_VERSION|g" sapl/templates/base.html sed -E -i "" "s|$OLD_VERSION|$FINAL_VERSION|g" sapl/settings.py + } function set_major_version { @@ -91,8 +92,12 @@ prompt_yes_no() { function commit_and_push { echo -e "${green_color}Committing new release $FINAL_VERSION...${color_reset}" - git changelog --tag $FINAL_VERSION -x >> CHANGES.md - git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html CHANGES.md + git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html + git changelog --tag $FINAL_VERSION --prune-old -x > latest_changes.tmp + cat /tmp/latest_changes.md CHANGES.md > CHANGES.tmp + mv CHANGES.tmp CHANGES.md + git add CHANGES.md + rm latest_changes.tmp if prompt_yes_no "${green_color}Do you want to commit SAPL $FINAL_VERSION release locally?${reset_color}"; then git commit -m "Release: $FINAL_VERSION" @@ -144,7 +149,7 @@ case "$1" in exit 0 ;; --top) - git tag | sort --version-sort | tail "-$2" + git tag | sort --version-sort -r | head "-$2" exit 0 ;; diff --git a/sapl/settings.py b/sapl/settings.py index 10ebf5e28..34b9b1848 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,7 +41,7 @@ ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login/?next=' -SAPL_VERSION = '3.1.163-RC13' +SAPL_VERSION = '3.1.163-RC14' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/sapl/templates/base.html b/sapl/templates/base.html index cd56e0e52..d15523313 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -194,7 +194,7 @@ Desenvolvido pelo Interlegis em software livre e aberto. - Release: 3.1.163-RC13 + Release: 3.1.163-RC14

diff --git a/setup.py b/setup.py index 5fd1b6d88..defc83b89 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ install_requires = [ ] setup( name='interlegis-sapl', - version='3.1.163-RC13', + version='3.1.163-RC14', packages=find_packages(), include_package_data=True, license='GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007', From 462c835b7a0270c141736ab37b4858b3b269024e Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Wed, 28 Jun 2023 19:19:29 -0700 Subject: [PATCH 61/80] Release: 3.1.163-RC14 --- CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 82d73fd96..7c77095ca 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ +3.1.163-RC14 / 2023-06-28 +========================= + + * HOT-FIX: conserta changelog + * feat: Torna o campo Data Nascimento de Parlamentares sensivel (#3648) + * hot-fix: desconecta signal pre_save no migrate + 3.1.163-RC13 / 2023-06-18 ========================= From 059f5f16aada2305da3f2fc9b0ae3e69be6236c4 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Fri, 30 Jun 2023 20:29:32 -0300 Subject: [PATCH 62/80] feat: Adiciona funcionalidade de baixar lista de documentos acessorios de um documento administrativo (#3650) Co-authored-by: joao --- sapl/protocoloadm/urls.py | 5 +- sapl/protocoloadm/views.py | 75 ++++++++++++++++++- ...documentoacessorioadministrativo_list.html | 12 +++ 3 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html diff --git a/sapl/protocoloadm/urls.py b/sapl/protocoloadm/urls.py index ab3dcefeb..05c787897 100644 --- a/sapl/protocoloadm/urls.py +++ b/sapl/protocoloadm/urls.py @@ -27,7 +27,8 @@ from sapl.protocoloadm.views import (AcompanhamentoDocumentoView, TramitacaoEmLoteAdmView, apaga_protocolos_view, VinculoDocAdminMateriaCrud, - VinculoDocAdminMateriaEmLoteView) + VinculoDocAdminMateriaEmLoteView, + get_pdf_docacessorios) from .apps import AppConfig @@ -51,6 +52,8 @@ urlpatterns_documento_administrativo = [ name='anexado_em_lote'), url(r'^docadm/(?P\d+)/vinculo-em-lote', VinculoDocAdminMateriaEmLoteView.as_view(), name='vinculodocadminmateria_em_lote'), + url(r'^docadm/documentoacessorioadministrativo/pdf/(?P\d+)$', get_pdf_docacessorios, + name='merge_docacessorios') ] urlpatterns_protocolo = [ diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 2b1346f7b..38ffcf42a 100755 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -1,9 +1,13 @@ +import os +import time from datetime import datetime import logging +from io import BytesIO from random import choice import re from string import ascii_letters, digits +from PyPDF4 import PdfFileMerger from braces.views import FormValidMessageMixin from django.conf import settings from django.contrib import messages @@ -16,7 +20,7 @@ from django.db import transaction from django.db.models import Max, Q from django.http import Http404, HttpResponse, JsonResponse from django.http.response import HttpResponseRedirect -from django.shortcuts import redirect +from django.shortcuts import redirect, get_object_or_404 from django.shortcuts import render from django.urls import reverse from django.utils import timezone @@ -43,7 +47,7 @@ from sapl.relatorios.views import relatorio_doc_administrativos from sapl.utils import (create_barcode, get_base_url, get_client_ip, get_mime_type_from_file_extension, lista_anexados, show_results_filter_set, mail_service_configured, from_date_to_datetime_utc, - google_recaptcha_configured) + google_recaptcha_configured, get_tempfile_dir) from .forms import (AcompanhamentoDocumentoForm, AnexadoEmLoteFilterSet, AnexadoForm, AnularProtocoloAdmForm, compara_tramitacoes_doc, @@ -58,7 +62,7 @@ from .forms import (AcompanhamentoDocumentoForm, AnexadoEmLoteFilterSet, Anexado from .models import (Anexado, AcompanhamentoDocumento, DocumentoAcessorioAdministrativo, DocumentoAdministrativo, StatusTramitacaoAdministrativo, TipoDocumentoAdministrativo, TramitacaoAdministrativo) - +from ..settings import MEDIA_ROOT TipoDocumentoAdministrativoCrud = CrudAux.build( TipoDocumentoAdministrativo, '') @@ -118,6 +122,71 @@ def doc_texto_integral(request, pk): raise Http404 +def get_pdf_docacessorios(request, pk): + documento_administrativo = get_object_or_404(DocumentoAdministrativo, pk=pk) + logger = logging.getLogger(__name__) + username = 'Usuário anônimo' if request.user.is_anonymous else request.user.username + try: + external_name, data = create_pdf_docacessorios(documento_administrativo) + logger.info( + "user= {}. Gerou o pdf compilado de documento acessorios".format(username)) + except FileNotFoundError: + logger.error("user= {}.Não há arquivos cadastrados".format(username)) + msg = _('Não há arquivos cadastrados nesses documentos acessórios.') + messages.add_message(request, messages.ERROR, msg) + return redirect(reverse('sapl.materia:documentoacessorio_list', + kwargs={'pk': pk})) + except Exception as e: + logger.error("user= {}.Um erro inesperado ocorreu na criação do pdf de documentos acessorios: {}" + .format(username, str(e))) + msg = _('Um erro inesperado ocorreu. Entre em contato com o suporte do SAPL.') + messages.add_message(request, messages.ERROR, msg) + return redirect(reverse('sapl.materia:documentoacessorio_list', + kwargs={'pk': pk})) + + if not data: + msg = _('Não há nenhum documento acessório PDF cadastrado.') + messages.add_message(request, messages.ERROR, msg) + return redirect(reverse('sapl.materia:documentoacessorio_list', + kwargs={'pk': pk})) + + response = HttpResponse(data, content_type='application/pdf') + response['Content-Disposition'] = ('attachment; filename="%s"' + % external_name) + return response + + +def create_pdf_docacessorios(docadministrativo): + """ + Creates a unified in memory PDF file + """ + logger = logging.getLogger(__name__) + docs = docadministrativo.documentoacessorioadministrativo_set. \ + all().values_list('arquivo', flat=True) + if not docs: + return None, None + + docs_path = [os.path.join(MEDIA_ROOT, i) + for i in docs if i.lower().endswith('pdf')] + if not docs_path: + raise FileNotFoundError( + "Não há arquivos PDF cadastrados em documentos acessorios.") + logger.info("Gerando compilado PDF de documentos acessorios com {} documentos" + .format(docs_path)) + + merger = PdfFileMerger() + for f in docs_path: + merger.append(fileobj=f) + + data = BytesIO() + merger.write(data) + merger.close() + + external_name = "docadm_{}_{}_docacessorios.pdf".format( + docadministrativo.numero, docadministrativo.ano) + return external_name, data.getvalue() + + class AcompanhamentoConfirmarView(TemplateView): logger = logging.getLogger(__name__) diff --git a/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html b/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html new file mode 100644 index 000000000..6c68a934e --- /dev/null +++ b/sapl/templates/protocoloadm/documentoacessorioadministrativo_list.html @@ -0,0 +1,12 @@ +{% extends "crud/list.html" %} +{% load i18n %} +{% load common_tags %} + +{% block base_content %} + {{ block.super }} + +{% endblock base_content%} \ No newline at end of file From f045e5ebd556a8a3ebd426b0db23fca1d1264e58 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Mon, 17 Jul 2023 19:29:43 -0700 Subject: [PATCH 63/80] Hot-fix: endpoint do prometheus endpoint URL --- sapl/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/urls.py b/sapl/urls.py index 5f5c2e30f..0481a246b 100644 --- a/sapl/urls.py +++ b/sapl/urls.py @@ -69,7 +69,7 @@ urlpatterns += [ path("robots.txt", TemplateView.as_view( template_name="robots.txt", content_type="text/plain")), - path('prometheus/', include('django_prometheus.urls')), + path(r'', include('django_prometheus.urls')), ] From 8262a192abe83a9729c06c673a13e6aec02bd048 Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:55:14 -0700 Subject: [PATCH 64/80] Remove redirect de URLs (#3652) --- sapl/redireciona_urls/__init__.py | 0 sapl/redireciona_urls/apps.py | 8 - sapl/redireciona_urls/exceptions.py | 13 - sapl/redireciona_urls/tests.py | 712 ----------------------- sapl/redireciona_urls/urls.py | 85 --- sapl/redireciona_urls/views.py | 858 ---------------------------- sapl/settings.py | 1 - sapl/test_urls.py | 27 - sapl/urls.py | 3 - 9 files changed, 1707 deletions(-) delete mode 100644 sapl/redireciona_urls/__init__.py delete mode 100644 sapl/redireciona_urls/apps.py delete mode 100644 sapl/redireciona_urls/exceptions.py delete mode 100644 sapl/redireciona_urls/tests.py delete mode 100644 sapl/redireciona_urls/urls.py delete mode 100644 sapl/redireciona_urls/views.py diff --git a/sapl/redireciona_urls/__init__.py b/sapl/redireciona_urls/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/sapl/redireciona_urls/apps.py b/sapl/redireciona_urls/apps.py deleted file mode 100644 index 8ee8742bc..000000000 --- a/sapl/redireciona_urls/apps.py +++ /dev/null @@ -1,8 +0,0 @@ -from django import apps -from django.utils.translation import ugettext_lazy as _ - - -class AppConfig(apps.AppConfig): - name = 'sapl.redireciona_urls' - label = 'redireciona_urls' - verbose_name = _('Redirecionador de URLs') diff --git a/sapl/redireciona_urls/exceptions.py b/sapl/redireciona_urls/exceptions.py deleted file mode 100644 index e1a994bcb..000000000 --- a/sapl/redireciona_urls/exceptions.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.utils.translation import ugettext as _ - - -class UnknownUrlNameError(Exception): - - def __init__(self, url_name): - self.url_name = url_name - - def __str__(self): - return repr( - _("Funcionalidade") - + " '%s' " % (self.url_name) - + _("pode ter sido removida ou movida para outra url.")) diff --git a/sapl/redireciona_urls/tests.py b/sapl/redireciona_urls/tests.py deleted file mode 100644 index 5a0e8b98f..000000000 --- a/sapl/redireciona_urls/tests.py +++ /dev/null @@ -1,712 +0,0 @@ -from django.test import TestCase -from django.urls import reverse - - -MovedPermanentlyHTTPStatusCode = 301 -EMPTY_STRING = '' - - -class RedirecionaURLsTests(TestCase): - - def test_redireciona_index_SAPL(self): - response = self.client.get(reverse( - 'sapl.redireciona_urls:redireciona_sapl_index') - ) - url_e = reverse('sapl.base:sapl_index') - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaParlamentarTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_parlamentar' - - def test_redireciona_parlamentar_list(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.parlamentares:parlamentar_list') - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_parlamentar_list_por_legislatura(self): - numero_legislatura = 123 - - url = reverse(self.url_pattern) - url_e = reverse('sapl.parlamentares:parlamentar_list') - - url = "%s%s" % ( - url, - "?hdn_num_legislatura=%s" % (numero_legislatura) - ) - url_e = "%s%s" % (url_e, "?pk=%s" % numero_legislatura) - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_parlamentar_detail(self): - url = reverse(self.url_pattern) - pk_parlamentar = 21 - url = "%s%s" % (url, "?cod_parlamentar=%s" % (pk_parlamentar)) - url_e = reverse( - 'sapl.parlamentares:parlamentar_detail', - kwargs={'pk': pk_parlamentar} - ) - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaComissaoTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_comissao' - - def test_redireciona_comissao_detail(self): - url = reverse(self.url_pattern) - pk_comissao = 21 - url = "%s%s" % (url, "?cod_comissao=%s" % (pk_comissao)) - url_e = reverse( - 'sapl.comissoes:comissao_detail', - kwargs={'pk': pk_comissao} - ) - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_comissao_list(self): - url = reverse(self.url_pattern) - url_e = reverse( - 'sapl.comissoes:comissao_list') - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaPautaSessaoTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_pauta_sessao_' - - def test_redireciona_pauta_sessao_detail(self): - url = reverse(self.url_pattern) - pk_pauta_sessao = 21 - url = "%s%s" % (url, "?cod_sessao_plen=%s" % (pk_pauta_sessao)) - url_e = reverse( - 'sapl.sessao:pauta_sessao_detail', - kwargs={'pk': pk_pauta_sessao} - ) - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_pauta_sessao_list(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_pauta') - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_pauta_sessao_list_por_dat_sessao_sel(self): - - url = reverse(self.url_pattern) - - ano_s_p = "2016" - mes_s_p = "05" - dia_s_p = "14" - data_s_p = "%s/%s/%s" % (dia_s_p, mes_s_p, ano_s_p) - - url = "%s%s" % (url, "?dat_sessao_sel=%s" % data_s_p) - - url_e = reverse('sapl.sessao:pesquisar_pauta') - - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (ano_s_p) - args_e += "&data_inicio__month=%s" % (mes_s_p.lstrip("0")) - args_e += "&data_inicio__day=%s" % (dia_s_p.lstrip("0")) - args_e += "&tipo=&salvar=Pesquisar" - - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaMesaDiretoraTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_mesa_diretora' - - def test_redireciona_mesa_diretora(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.parlamentares:mesa_diretora') - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaMesaDiretoraParlamentarTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_mesa_diretora_parlamentar' - - def test_redireciona_mesa_diretora_parlamentar(self): - url = reverse(self.url_pattern) - pk_parlamentar = 21 - url = "%s%s" % (url, "?cod_parlamentar=%s" % (pk_parlamentar)) - url_e = reverse( - 'sapl.parlamentares:parlamentar_detail', - kwargs={'pk': pk_parlamentar} - ) - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaNormasJuridicasListTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_norma_juridica_pesquisa' - - def test_redireciona_norma_juridica_pesquisa_sem_parametros(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.norma:norma_pesquisa') - - tipo_norma = EMPTY_STRING - numero_norma = EMPTY_STRING - ano_norma = EMPTY_STRING - periodo_inicial_aprovacao = EMPTY_STRING - periodo_final_aprovacao = EMPTY_STRING - periodo_inicial_publicacao = EMPTY_STRING - periodo_final_publicacao = EMPTY_STRING - ementa_norma = EMPTY_STRING - assuntos_norma = EMPTY_STRING - - args = EMPTY_STRING - args += "?lst_tip_norma=%s" % (tipo_norma) - args += "&txt_numero=%s" % (numero_norma) - args += "&txt_ano=%s" % (ano_norma) - args += "&dt_norma=%s" % (periodo_inicial_aprovacao) - args += "&dt_norma2=%s" % (periodo_final_aprovacao) - args += "&dt_public=%s" % (periodo_inicial_publicacao) - args += "&dt_public2=%s" % (periodo_final_publicacao) - args += "&txt_assunto=%s" % (ementa_norma) - args += "&lst_assunto_norma=%s" % (assuntos_norma) - args += "&salvar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - args_e = EMPTY_STRING - args_e += "?tipo=%s" % (tipo_norma) - args_e += "&numero=%s" % (numero_norma) - args_e += "&ano=%s" % (ano_norma) - args_e += "&data_0=%s" % (periodo_inicial_aprovacao) - args_e += "&data_1=%s" % (periodo_final_aprovacao) - args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) - args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) - args_e += "&ementa=%s" % (ementa_norma) - args_e += "&assuntos=%s" % (assuntos_norma) - args_e += "&salvar=%s" % ('Pesquisar') - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_norma_juridica_pesquisa_por_tipo(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.norma:norma_pesquisa') - - tipo_norma = '4' - numero_norma = EMPTY_STRING - ano_norma = EMPTY_STRING - periodo_inicial_aprovacao = EMPTY_STRING - periodo_final_aprovacao = EMPTY_STRING - periodo_inicial_publicacao = EMPTY_STRING - periodo_final_publicacao = EMPTY_STRING - ementa_norma = EMPTY_STRING - assuntos_norma = EMPTY_STRING - - args = EMPTY_STRING - args += "?lst_tip_norma=%s" % (tipo_norma) - args += "&txt_numero=%s" % (numero_norma) - args += "&txt_ano=%s" % (ano_norma) - args += "&dt_norma=%s" % (periodo_inicial_aprovacao) - args += "&dt_norma2=%s" % (periodo_final_aprovacao) - args += "&dt_public=%s" % (periodo_inicial_publicacao) - args += "&dt_public2=%s" % (periodo_final_publicacao) - args += "&txt_assunto=%s" % (ementa_norma) - args += "&lst_assunto_norma=%s" % (assuntos_norma) - args += "&salvar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - args_e = EMPTY_STRING - args_e += "?tipo=%s" % (tipo_norma) - args_e += "&numero=%s" % (numero_norma) - args_e += "&ano=%s" % (ano_norma) - args_e += "&data_0=%s" % (periodo_inicial_aprovacao) - args_e += "&data_1=%s" % (periodo_final_aprovacao) - args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) - args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) - args_e += "&ementa=%s" % (ementa_norma) - args_e += "&assuntos=%s" % (assuntos_norma) - args_e += "&salvar=%s" % ('Pesquisar') - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_norma_juridica_pesquisa_por_ano(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.norma:norma_pesquisa') - - tipo_norma = EMPTY_STRING - numero_norma = EMPTY_STRING - ano_norma = '2010' - periodo_inicial_aprovacao = EMPTY_STRING - periodo_final_aprovacao = EMPTY_STRING - periodo_inicial_publicacao = EMPTY_STRING - periodo_final_publicacao = EMPTY_STRING - ementa_norma = EMPTY_STRING - assuntos_norma = EMPTY_STRING - - args = EMPTY_STRING - args += "?lst_tip_norma=%s" % (tipo_norma) - args += "&txt_numero=%s" % (numero_norma) - args += "&txt_ano=%s" % (ano_norma) - args += "&dt_norma=%s" % (periodo_inicial_aprovacao) - args += "&dt_norma2=%s" % (periodo_final_aprovacao) - args += "&dt_public=%s" % (periodo_inicial_publicacao) - args += "&dt_public2=%s" % (periodo_final_publicacao) - args += "&txt_assunto=%s" % (ementa_norma) - args += "&lst_assunto_norma=%s" % (assuntos_norma) - args += "&salvar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - args_e = EMPTY_STRING - args_e += "?tipo=%s" % (tipo_norma) - args_e += "&numero=%s" % (numero_norma) - args_e += "&ano=%s" % (ano_norma) - args_e += "&data_0=%s" % (periodo_inicial_aprovacao) - args_e += "&data_1=%s" % (periodo_final_aprovacao) - args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) - args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) - args_e += "&ementa=%s" % (ementa_norma) - args_e += "&assuntos=%s" % (assuntos_norma) - args_e += "&salvar=%s" % ('Pesquisar') - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaNormasJuridicasDetailTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_norma_juridica_detail' - - def test_redireciona_norma_juridica_detail(self): - url = reverse(self.url_pattern) - - pk_norma = 120 - - args = EMPTY_STRING - args += "?cod_norma=%s" % (pk_norma) - url = "%s%s" % (url, args) - - url_e = reverse( - 'sapl.norma:normajuridica_detail', - kwargs={ - 'pk': pk_norma} - ) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_norma_juridica_detail_sem_parametros(self): - url = reverse(self.url_pattern) - - pk_norma = EMPTY_STRING - - args = EMPTY_STRING - args += "?cod_norma=%s" % (pk_norma) - url = "%s%s" % (url, args) - - url_e = reverse('sapl.norma:norma_pesquisa') - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaSessaoPlenariaTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_sessao_plenaria_' - - def test_redireciona_sessao_plenaria_detail(self): - url = reverse(self.url_pattern) - pk_sessao_plenaria = 258 - url = "%s%s" % (url, "?cod_sessao_plen=%s" % (pk_sessao_plenaria)) - url_e = reverse( - 'sapl.sessao:sessaoplenaria_detail', - kwargs={'pk': pk_sessao_plenaria} - ) - - response = self.client.get(url) - - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_sessao_plenaria_list_sem_parametro(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_sessao') - - year = EMPTY_STRING - month = EMPTY_STRING - day = EMPTY_STRING - tipo_sessao = EMPTY_STRING - - args = EMPTY_STRING - args += "?ano_sessao_sel=%s" % (year) - args += "&mes_sessao_sel=%s" % (month) - args += "&dia_sessao_sel=%s" % (day) - args += "&tip_sessao_sel=%s" % (tipo_sessao) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (year) - args_e += "&data_inicio__month=%s" % (month) - args_e += "&data_inicio__day=%s" % (day) - args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_sessao_plenaria_list_sem_tipo(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_sessao') - - year = '2015' - month = '04' - day = '06' - tipo_sessao = EMPTY_STRING - - args = EMPTY_STRING - args += "?ano_sessao_sel=%s" % (year) - args += "&mes_sessao_sel=%s" % (month) - args += "&dia_sessao_sel=%s" % (day) - args += "&tip_sessao_sel=%s" % (tipo_sessao) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (year) - args_e += "&data_inicio__month=%s" % (month) - args_e += "&data_inicio__day=%s" % (day) - args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_sessao_plenaria_list_sem_tipo_e_ano(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_sessao') - - year = EMPTY_STRING - month = '04' - day = '06' - tipo_sessao = EMPTY_STRING - - args = EMPTY_STRING - args += "?ano_sessao_sel=%s" % (year) - args += "&mes_sessao_sel=%s" % (month) - args += "&dia_sessao_sel=%s" % (day) - args += "&tip_sessao_sel=%s" % (tipo_sessao) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (year) - args_e += "&data_inicio__month=%s" % (month) - args_e += "&data_inicio__day=%s" % (day) - args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_sessao_plenaria_list_sem_ano(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_sessao') - - year = EMPTY_STRING - month = '04' - day = '06' - tipo_sessao = '4' - - args = EMPTY_STRING - args += "?ano_sessao_sel=%s" % (year) - args += "&mes_sessao_sel=%s" % (month) - args += "&dia_sessao_sel=%s" % (day) - args += "&tip_sessao_sel=%s" % (tipo_sessao) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (year) - args_e += "&data_inicio__month=%s" % (month) - args_e += "&data_inicio__day=%s" % (day) - args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url_e = "%s%s" % (url_e, args_e) - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_sessao_plenaria_list_sem_mes_dia(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.sessao:pesquisar_sessao') - - year = '2015' - month = EMPTY_STRING - day = EMPTY_STRING - tipo_sessao = '4' - - args = EMPTY_STRING - args += "?ano_sessao_sel=%s" % (year) - args += "&mes_sessao_sel=%s" % (month) - args += "&dia_sessao_sel=%s" % (day) - args += "&tip_sessao_sel=%s" % (tipo_sessao) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args_e = EMPTY_STRING - args_e += "?data_inicio__year=%s" % (year) - args_e += "&data_inicio__month=%s" % (month) - args_e += "&data_inicio__day=%s" % (day) - args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url_e = "%s%s" % (url_e, args_e) - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaHistoricoTramitacoesListTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_historico_tramitacoes' - - def test_redireciona_historico_tramitacoes_sem_parametros(self): - args_e = EMPTY_STRING - args = EMPTY_STRING - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:historico_tramitacoes') - - inicio_dt_tramitacao = EMPTY_STRING - fim_dt_tramitacao = EMPTY_STRING - tipo_materia = EMPTY_STRING - unidade_local_tramitacao = EMPTY_STRING - status_tramitacao = EMPTY_STRING - - args += "?txt_dat_inicio_periodo=%s" % (inicio_dt_tramitacao) - args += "&txt_dat_fim_periodo=%s" % (fim_dt_tramitacao) - args += "&lst_tip_materia=%s" % (tipo_materia) - args += "&lst_cod_unid_tram_dest=%s" % (unidade_local_tramitacao) - args += "&lst_status=%s" % (status_tramitacao) - args += "&btn_materia_pesquisar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - inicio_dt_tramitacao = inicio_dt_tramitacao.lstrip("0") - fim_dt_tramitacao = fim_dt_tramitacao.lstrip("0") - tipo_materia = tipo_materia.lstrip("0") - unidade_local_tramitacao = unidade_local_tramitacao.lstrip("0") - status_tramitacao = status_tramitacao.lstrip("0") - - if ( - (inicio_dt_tramitacao != EMPTY_STRING) or - (fim_dt_tramitacao != EMPTY_STRING) or - (tipo_materia != EMPTY_STRING) or - (unidade_local_tramitacao != EMPTY_STRING) or - (status_tramitacao != EMPTY_STRING)): - args_e += "?tramitacao__data_tramitacao_0=%s" % ( - inicio_dt_tramitacao) - args_e += "&tramitacao__data_tramitacao_1=%s" % ( - fim_dt_tramitacao) - args_e += "&tipo=%s" % (tipo_materia) - args_e += "&tramitacao__unidade_tramitacao_local=%s" % ( - unidade_local_tramitacao) - args_e += "&tramitacao__status=%s" % (status_tramitacao) - args_e += "&salvar=%s" % ('Pesquisar') - - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_historico_tramitacoes(self): - args = EMPTY_STRING - args_e = EMPTY_STRING - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:historico_tramitacoes') - - inicio_dt_tramitacao = '12/07/2000' - fim_dt_tramitacao = '26/05/2017' - unidade_local_tramitacao = '0' - tipo_materia = '0' - status_tramitacao = '0' - - args += "?txt_dat_inicio_periodo=%s" % (inicio_dt_tramitacao) - args += "&txt_dat_fim_periodo=%s" % (fim_dt_tramitacao) - args += "&lst_tip_materia=%s" % (tipo_materia) - args += "&lst_cod_unid_tram_dest=%s" % (unidade_local_tramitacao) - args += "&lst_status=%s" % (status_tramitacao) - args += "&btn_materia_pesquisar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - inicio_dt_tramitacao = inicio_dt_tramitacao.lstrip("0") - fim_dt_tramitacao = fim_dt_tramitacao.lstrip("0") - tipo_materia = tipo_materia.lstrip("0") - unidade_local_tramitacao = unidade_local_tramitacao.lstrip("0") - status_tramitacao = status_tramitacao.lstrip("0") - - if ( - (inicio_dt_tramitacao != EMPTY_STRING) or - (fim_dt_tramitacao != EMPTY_STRING) or - (tipo_materia != EMPTY_STRING) or - (unidade_local_tramitacao != EMPTY_STRING) or - (status_tramitacao != EMPTY_STRING)): - args_e += "?tramitacao__data_tramitacao_0=%s" % ( - inicio_dt_tramitacao) - args_e += "&tramitacao__data_tramitacao_1=%s" % ( - fim_dt_tramitacao) - args_e += "&tipo=%s" % (tipo_materia) - args_e += "&tramitacao__unidade_tramitacao_local=%s" % ( - unidade_local_tramitacao) - args_e += "&tramitacao__status=%s" % (status_tramitacao) - args_e += "&salvar=%s" % ('Pesquisar') - - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaPresencaParlamentaresTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_presencaparlamentar_list' - - def test_redireciona_presenca_list_sem_parametros(self): - args_e = EMPTY_STRING - args = EMPTY_STRING - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:presenca_sessao') - - inicio_intervalo_presenca = EMPTY_STRING - fim_intervalo_presenca = EMPTY_STRING - - args += "?txt_dat_inicio=%s" % ( - inicio_intervalo_presenca) - args += "&txt_dat_fim=%s" % ( - fim_intervalo_presenca) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - inicio_intervalo_presenca = inicio_intervalo_presenca.lstrip("0") - fim_intervalo_presenca = fim_intervalo_presenca.lstrip("0") - - args_e += "?data_inicio_0=%s" % ( - inicio_intervalo_presenca) - args_e += "&data_inicio_1=%s" % ( - fim_intervalo_presenca) - args_e += "&salvar=%s" % ('Pesquisar') - - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_presenca_list(self): - args_e = EMPTY_STRING - args = EMPTY_STRING - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:presenca_sessao') - - inicio_intervalo_presenca = '01/02/2015' - fim_intervalo_presenca = '01/02/2017' - - args += "?txt_dat_inicio=%s" % ( - inicio_intervalo_presenca) - args += "&txt_dat_fim=%s" % ( - fim_intervalo_presenca) - url = "%s%s" % (url, args) - - # Remove zeros à esquerda - inicio_intervalo_presenca = inicio_intervalo_presenca.lstrip("0") - fim_intervalo_presenca = fim_intervalo_presenca.lstrip("0") - - args_e += "?data_inicio_0=%s" % ( - inicio_intervalo_presenca) - args_e += "&data_inicio_1=%s" % ( - fim_intervalo_presenca) - args_e += "&salvar=%s" % ('Pesquisar') - - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaMateriasPorAutorTests(TestCase): - url_pattern = 'sapl.redireciona_urls:redireciona_materias_por_autor_list' - - def test_redireciona_materias_por_autor_list_sem_parametros(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:materia_por_autor') - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - -class RedirecionaMateriasPorAnoAutorTipoTests(TestCase): - url_pattern = ( - 'sapl.redireciona_urls:redireciona_materia_por_ano_autor_tipo_list') - - def test_redireciona_materias_por_ano_autor_tipo_list_sem_parametros(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:materia_por_ano_autor_tipo') - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) - - def test_redireciona_materias_por_ano_autor_tipo_list(self): - url = reverse(self.url_pattern) - url_e = reverse('sapl.base:materia_por_ano_autor_tipo') - - ano = 2017 - - args = "?ano=%s" % (ano) - url = "%s%s" % (url, args) - - args_e = "?ano=%s&salvar=Pesquisar" % (ano) - url_e = "%s%s" % (url_e, args_e) - - response = self.client.get(url) - self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) - self.assertEqual(response.url, url_e) diff --git a/sapl/redireciona_urls/urls.py b/sapl/redireciona_urls/urls.py deleted file mode 100644 index f8a9aa685..000000000 --- a/sapl/redireciona_urls/urls.py +++ /dev/null @@ -1,85 +0,0 @@ -from django.conf.urls import url - -from .apps import AppConfig -from .views import (RedirecionaAtasList, RedirecionaComissao, - RedirecionaComposicaoComissao, - RedirecionaHistoricoTramitacoesList, - RedirecionaMateriaLegislativaDetail, - RedirecionaMateriaLegislativaList, - RedirecionaMateriasPorAnoAutorTipo, - RedirecionaMateriasPorAutor, RedirecionaMesaDiretoraView, - RedirecionaNormasJuridicasDetail, - RedirecionaNormasJuridicasList, - RedirecionaNormasJuridicasTextoIntegral, - RedirecionaParlamentar, RedirecionaPautaSessao, - RedirecionaPresencaParlamentares, - RedirecionaRelatoriosList, - RedirecionaRelatoriosMateriasEmTramitacaoList, - RedirecionaSAPLIndex, RedirecionaSessaoPlenaria) - -app_name = AppConfig.name -urlpatterns = [ - url(r'^default_index_html$', - RedirecionaSAPLIndex.as_view(), - name='redireciona_sapl_index'), - url(r'^consultas/parlamentar/parlamentar_', - RedirecionaParlamentar.as_view(), - name='redireciona_parlamentar'), - url(r'^consultas/comissao/comissao_', - RedirecionaComissao.as_view(), - name='redireciona_comissao'), - url(r'^consultas/comissao/composicao/composicao_index_html', - RedirecionaComposicaoComissao.as_view(), - name='redireciona_composicaio_comissao'), - url(r'^consultas/pauta_sessao/pauta_sessao_', - RedirecionaPautaSessao.as_view(), - name='redireciona_pauta_sessao_'), - url(r'^consultas/mesa_diretora/mesa_diretora_index_html', - RedirecionaMesaDiretoraView.as_view(), - name='redireciona_mesa_diretora'), - url(r'^consultas/mesa_diretora/parlamentar/parlamentar_', - RedirecionaParlamentar.as_view(), - name='redireciona_mesa_diretora_parlamentar'), - url(r'^consultas/sessao_plenaria/', - RedirecionaSessaoPlenaria.as_view(), - name='redireciona_sessao_plenaria_'), - url(r'^generico/norma_juridica_pesquisar_', - RedirecionaNormasJuridicasList.as_view(), - name='redireciona_norma_juridica_pesquisa'), - url(r'^consultas/norma_juridica/norma_juridica_mostrar_proc', - RedirecionaNormasJuridicasDetail.as_view(), - name='redireciona_norma_juridica_detail'), - url(r'^sapl_documentos/norma_juridica/(?P[0-9]+)_texto_integral', - RedirecionaNormasJuridicasTextoIntegral.as_view(), - name='redireciona_norma_juridica_texto_integral'), - url(r'^relatorios_administrativos/relatorios_administrativos_index_html$', - RedirecionaRelatoriosList.as_view(), - name='redireciona_relatorios_list'), - url(r'tramitacaoMaterias/tramitacaoMaterias', - RedirecionaRelatoriosMateriasEmTramitacaoList.as_view(), - name='redireciona_relatorio_materia_por_tramitacao'), - url(r'tramitacaoMaterias/materia_mostrar_proc$', - RedirecionaMateriaLegislativaDetail.as_view(), - name='redireciona_materialegislativa_detail_tramitacao'), - url(r'consultas/materia/materia_mostrar_proc$', - RedirecionaMateriaLegislativaDetail.as_view(), - name='redireciona_materialegislativa_detail'), - url(r'^generico/materia_pesquisar_', - RedirecionaMateriaLegislativaList.as_view(), - name='redireciona_materialegislativa_list'), - url(r'historicoTramitacoes/historicoTramitacoes', - RedirecionaHistoricoTramitacoesList.as_view(), - name='redireciona_historico_tramitacoes'), - url(r'atasSessao', - RedirecionaAtasList.as_view(), - name='redireciona_atas_list'), - url(r'presencaSessao', - RedirecionaPresencaParlamentares.as_view(), - name='redireciona_presencaparlamentar_list'), - url(r'resumoPropositurasAutor', - RedirecionaMateriasPorAutor.as_view(), - name='redireciona_materias_por_autor_list'), - url(r'propositurasAnoAutorTipo', - RedirecionaMateriasPorAnoAutorTipo.as_view(), - name='redireciona_materia_por_ano_autor_tipo_list'), -] \ No newline at end of file diff --git a/sapl/redireciona_urls/views.py b/sapl/redireciona_urls/views.py deleted file mode 100644 index 435280b3b..000000000 --- a/sapl/redireciona_urls/views.py +++ /dev/null @@ -1,858 +0,0 @@ -import logging - -from django.urls import NoReverseMatch, reverse -from django.views.generic import RedirectView - -from sapl.audiencia.apps import AppConfig as audienciaConfig -from sapl.base.apps import AppConfig as atasConfig -from sapl.comissoes.apps import AppConfig as comissoesConfig -from sapl.materia.apps import AppConfig as materiaConfig -from sapl.norma.apps import AppConfig as normaConfig -from sapl.norma.models import NormaJuridica -from sapl.parlamentares.apps import AppConfig as parlamentaresConfig -from sapl.sessao.apps import AppConfig as sessaoConfig -from .exceptions import UnknownUrlNameError - -EMPTY_STRING = '' - -presenca_sessaoConfig = relatoriosConfig = atasConfig - -app_parlamentares = parlamentaresConfig.name -app_atas = atasConfig.name -app_presenca_sessao = presenca_sessaoConfig.name -app_comissoes = comissoesConfig.name -app_materia = materiaConfig.name -app_sessao = sessaoConfig.name -app_norma = normaConfig.name -app_relatorios = relatoriosConfig.name -app_audiencia = audienciaConfig.name - -pesquisar_atas = (app_atas + ':atas') -presenca_sessao = (app_presenca_sessao + ':presenca_sessao') -parlamentar_list = (app_parlamentares + ':parlamentar_list') -parlamentar_detail = (app_parlamentares + ':parlamentar_detail') -parlamentar_mesa_diretora = (app_parlamentares + ':mesa_diretora') - -comissao_list = (app_comissoes + ':comissao_list') -comissao_detail = (app_comissoes + ':comissao_detail') - -audiencia = (app_audiencia + ':audiencia') -reuniao_detail = (app_comissoes + ':reuniao_detail') - -materialegislativa_detail = (app_materia + ':materialegislativa_detail') -materialegislativa_list = (app_materia + ':pesquisar_materia') - -pauta_sessao_list = (app_sessao + ':pesquisar_pauta') -pauta_sessao_detail = (app_sessao + ':pauta_sessao_detail') -sessao_plenaria_list = (app_sessao + ':pesquisar_sessao') -sessao_plenaria_detail = (app_sessao + ':sessaoplenaria_detail') - -norma_juridica_detail = (app_norma + ':normajuridica_detail') -norma_juridica_pesquisa = (app_norma + ':norma_pesquisa') - -relatorios_list = (app_relatorios + ':relatorios_list') -relatorio_materia_por_tramitacao = (app_relatorios + ':materia_por_tramitacao') -relatorio_materia_por_autor = (app_relatorios + ':materia_por_autor') -relatorio_materia_por_ano_autor_tipo = ( - app_relatorios + ':materia_por_ano_autor_tipo') -historico_tramitacoes = (app_relatorios + ':historico_tramitacoes') - - -def has_iframe(url, request): - - iframe = request.GET.get( - 'iframe', - EMPTY_STRING) - if iframe: - iframe_qs = ("iframe=" + iframe) - url += ("&" if "?" in url else "?") - url += iframe_qs - - return url - - -class RedirecionaSAPLIndex(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url_pattern = 'sapl.base:sapl_index' - username = self.request.user.username - try: - self.logger.info("user=" + username + ". Tentando obter url.") - url = reverse(url_pattern) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(url_pattern) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaParlamentar(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - pk_parlamentar = self.request.GET.get( - 'cod_parlamentar', - EMPTY_STRING) - username = self.request.user.username - - if pk_parlamentar: - try: - kwargs = {'pk': pk_parlamentar} - self.logger.debug("user=" + username + - ". Tentando obter url correspondente.") - url = reverse(parlamentar_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(parlamentar_detail, kwargs=kwargs) - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(parlamentar_list) - except NoReverseMatch: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(parlamentar_list) - - numero_legislatura = self.request.GET.get( - 'hdn_num_legislatura', - EMPTY_STRING) - if numero_legislatura: - args = '?pk=' + numero_legislatura - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaComissao(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - pk_comissao = self.request.GET.get('cod_comissao', EMPTY_STRING) - username = self.request.user.username - - if pk_comissao: - kwargs = {'pk': pk_comissao} - - try: - self.logger.debug("user=" + username + - ". Tentando obter url correspondente.") - url = reverse(comissao_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(comissao_detail) - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(comissao_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(comissao_list) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaComposicaoComissao(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - pk_composicao = self.request.GET.get( - 'cod_periodo_comp_sel', EMPTY_STRING) - pk_comissao = self.request.GET.get('cod_comissao', EMPTY_STRING) - username = self.request.user.username - - if pk_comissao: - kwargs = {'pk': pk_comissao} - - try: - self.logger.debug("user=" + username + - ". Tentando obter url correspondente.") - url = reverse(comissao_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(comissao_detail) - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(comissao_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(comissao_list) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaPautaSessao(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - pk_sessao_plenaria = self.request.GET.get( - 'cod_sessao_plen', - EMPTY_STRING) - username = self.request.user.username - - if pk_sessao_plenaria: - kwargs = {'pk': pk_sessao_plenaria} - try: - self.logger.debug("user=" + username + - ". Tentando obter url correspondente.") - url = reverse(pauta_sessao_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(pauta_sessao_detail) - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(pauta_sessao_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(pauta_sessao_list) - - data_sessao_plenaria = self.request.GET.get( - 'dat_sessao_sel', - EMPTY_STRING) - - if data_sessao_plenaria: - dia_s_p, mes_s_p, ano_s_p = data_sessao_plenaria.split('/') - # Remove zeros à esquerda de dia_s_p e mes_s_p - dia_s_p = dia_s_p.lstrip("0") - mes_s_p = mes_s_p.lstrip("0") - args = EMPTY_STRING - args += "?data_inicio__year=%s" % (ano_s_p) - args += "&data_inicio__month=%s" % (mes_s_p) - args += "&data_inicio__day=%s" % (dia_s_p) - args += "&tipo=&salvar=Pesquisar" - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaSessaoPlenaria(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - pk_sessao_plenaria = self.request.GET.get( - 'cod_sessao_plen', - EMPTY_STRING) - url = EMPTY_STRING - username = self.request.user.username - if pk_sessao_plenaria: - kwargs = {'pk': pk_sessao_plenaria} - try: - self.logger.debug("user=" + username + - ". Tentando obter url correspondente.") - url = reverse(sessao_plenaria_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(sessao_plenaria_detail) - - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(sessao_plenaria_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(sessao_plenaria_list) - - year = self.request.GET.get( - 'ano_sessao_sel', - EMPTY_STRING) - month = self.request.GET.get( - 'mes_sessao_sel', - EMPTY_STRING) - day = self.request.GET.get( - 'dia_sessao_sel', - EMPTY_STRING) - tipo_sessao = self.request.GET.get( - 'tip_sessao_sel', - EMPTY_STRING) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args = EMPTY_STRING - args += "?data_inicio__year=%s" % (year) - args += "&data_inicio__month=%s" % (month) - args += "&data_inicio__day=%s" % (day) - args += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaRelatoriosList(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(relatorios_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(relatorios_list) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaRelatoriosMateriasEmTramitacaoList(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(relatorio_materia_por_tramitacao) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(relatorio_materia_por_tramitacao) - - year = self.request.GET.get( - 'selAno', - EMPTY_STRING) - if year: - tramitacao_tipo = self.request.GET.get( - 'lst_tip_materia', - EMPTY_STRING) - tramitacao_unidade_local = self.request.GET.get( - 'lst_cod_unid_tram_dest', - EMPTY_STRING) - tramitacao_status = self.request.GET.get( - 'lst_status', - EMPTY_STRING) - salvar = self.request.GET.get( - 'btn_materia_pesquisar', - 'Pesquisar') - - tramitacao_tipo = tramitacao_tipo.lstrip("0") - tramitacao_unidade_local = tramitacao_unidade_local.lstrip("0") - tramitacao_status = tramitacao_status.lstrip("0") - - args = EMPTY_STRING - args += "?ano=%s" % (year) - args += "&tipo=%s" % (tramitacao_tipo) - args += "&tramitacao__unidade_tramitacao_local=%s" % ( - tramitacao_unidade_local) - args += "&tramitacao__status=%s" % (tramitacao_status) - args += "&salvar=%s" % (salvar) - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaMateriaLegislativaDetail(RedirectView): - permanent = True - - def get_redirect_url(self): - url = EMPTY_STRING - pk = self.request.GET.get('cod_materia', EMPTY_STRING) - - if pk: - kwargs = {'pk': pk} - url = reverse(materialegislativa_detail, kwargs=kwargs) - else: - url = reverse(materialegislativa_list) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaMateriaLegislativaList(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - args = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(materialegislativa_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(materialegislativa_list) - - tipo_materia = self.request.GET.get( - 'lst_tip_materia', - EMPTY_STRING) - numero_materia = self.request.GET.get( - 'txt_numero', - EMPTY_STRING) - ano_materia = self.request.GET.get( - 'txt_ano', - EMPTY_STRING) - num_protocolo_materia = self.request.GET.get( - 'txt_num_protocolo', - EMPTY_STRING) - periodo_inicial_apresentacao = self.request.GET.get( - 'dt_apres', - EMPTY_STRING) - periodo_final_apresentacao = self.request.GET.get( - 'dt_apres2', - EMPTY_STRING) - periodo_inicial_publicacao = self.request.GET.get( - 'dt_public', - EMPTY_STRING) - periodo_final_publicacao = self.request.GET.get( - 'dt_public2', - EMPTY_STRING) - tipo_autor = self.request.GET.get( - 'lst_tip_autor', - EMPTY_STRING) - ementa_materia = self.request.GET.get( - 'txt_assunto', - EMPTY_STRING) - tramitando = self.request.GET.get( - 'rad_tramitando', - EMPTY_STRING) - status_tramitacao = self.request.GET.get( - 'lst_status', - EMPTY_STRING) - - args += "?tipo=%s" % (tipo_materia) - args += "&numero=%s" % (numero_materia) - args += "&ano=%s" % (ano_materia) - args += "&numero_protocolo=%s" % (num_protocolo_materia) - args += "&data_apresentacao_0=%s" % (periodo_inicial_apresentacao) - args += "&data_apresentacao_1=%s" % (periodo_final_apresentacao) - args += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) - args += "&data_publicacao_1=%s" % (periodo_final_publicacao) - args += "&autoria__autor=%s" % (EMPTY_STRING) - args += "&autoria__autor__tipo=%s" % (tipo_autor) - args += "&relatoria__parlamentar_id=%s" % (EMPTY_STRING) - args += "&local_origem_externa=%s" % (EMPTY_STRING) - args += "&tramitacao__unidade_tramitacao_destino=%s" % (EMPTY_STRING) - args += "&tramitacao__status=%s" % (status_tramitacao) - args += "&em_tramitacao=%s" % (tramitando) - args += "&o=%s" % (EMPTY_STRING) - args += "&materiaassunto__assunto=%s" % (EMPTY_STRING) - args += "&ementa=%s" % (ementa_materia) - args += "&salvar=%s" % ('Pesquisar') # Default in both SAPL version - - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaMesaDiretoraView(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(parlamentar_mesa_diretora) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(parlamentar_mesa_diretora) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaNormasJuridicasDetail(RedirectView): - permanent = True - - def get_redirect_url(self): - url = EMPTY_STRING - pk_norma = self.request.GET.get('cod_norma', EMPTY_STRING) - - if pk_norma: - kwargs = {'pk': pk_norma} - url = reverse(norma_juridica_detail, kwargs=kwargs) - else: - url = reverse(norma_juridica_pesquisa) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaNormasJuridicasTextoIntegral(RedirectView): - permanent = False - logger = logging.getLogger(__name__) - - def get_redirect_url(self, **kwargs): - url = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug( - "user=" + username + ". Tentando obter NormaJuridica com pk={}.".format(kwargs['norma_id'])) - norma = NormaJuridica.objects.get(pk=kwargs['norma_id']) - if norma: - url = norma.texto_integral.url - except Exception as e: - self.logger.error( - "user=" + username + ". Erro ao obter NormaJuridica com pk={}. ".format(kwargs['norma_id']) + str(e)) - raise e - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaNormasJuridicasList(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - args = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(norma_juridica_pesquisa) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(norma_juridica_pesquisa) - - tipo_norma = self.request.GET.get( - 'lst_tip_norma', - EMPTY_STRING) - numero_norma = self.request.GET.get( - 'txt_numero', - EMPTY_STRING) - ano_norma = self.request.GET.get( - 'txt_ano', - EMPTY_STRING) - periodo_inicial_aprovacao = self.request.GET.get( - 'dt_norma', - EMPTY_STRING) - periodo_final_aprovacao = self.request.GET.get( - 'dt_norma2', - EMPTY_STRING) - periodo_inicial_publicacao = self.request.GET.get( - 'dt_public', - EMPTY_STRING) - periodo_final_publicacao = self.request.GET.get( - 'dt_public2', - EMPTY_STRING) - ementa_norma = self.request.GET.get( - 'txt_assunto', - EMPTY_STRING) - assuntos_norma = self.request.GET.get( - 'lst_assunto_norma', - EMPTY_STRING) - - args += "?tipo=%s" % (tipo_norma) - args += "&numero=%s" % (numero_norma) - args += "&ano=%s" % (ano_norma) - args += "&data_0=%s" % (periodo_inicial_aprovacao) - args += "&data_1=%s" % (periodo_final_aprovacao) - args += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) - args += "&data_publicacao_1=%s" % (periodo_final_publicacao) - args += "&ementa=%s" % (ementa_norma) - args += "&assuntos=%s" % (assuntos_norma) - args += "&salvar=%s" % ('Pesquisar') # Default in both SAPL version - - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaHistoricoTramitacoesList(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - args = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(historico_tramitacoes) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(historico_tramitacoes) - - inicio_intervalo_data_tramitacao = self.request.GET.get( - 'txt_dat_inicio_periodo', - EMPTY_STRING - ).lstrip("0") - fim_intervalo_data_tramitacao = self.request.GET.get( - 'txt_dat_fim_periodo', - EMPTY_STRING - ).lstrip("0") - tipo_materia = self.request.GET.get( - 'lst_tip_materia', - EMPTY_STRING - ).lstrip("0") - unidade_local_tramitacao = self.request.GET.get( - 'lst_cod_unid_tram_dest', - EMPTY_STRING - ).lstrip("0") - status_tramitacao = self.request.GET.get( - 'lst_status', - EMPTY_STRING - ).lstrip("0") - - if ( - (inicio_intervalo_data_tramitacao != EMPTY_STRING) or - (fim_intervalo_data_tramitacao != EMPTY_STRING) or - (tipo_materia != EMPTY_STRING) or - (unidade_local_tramitacao != EMPTY_STRING) or - (status_tramitacao != EMPTY_STRING)): - - args += "?tramitacao__data_tramitacao_0=%s" % ( - inicio_intervalo_data_tramitacao) - args += "&tramitacao__data_tramitacao_1=%s" % ( - fim_intervalo_data_tramitacao) - args += "&tipo=%s" % (tipo_materia) - args += "&tramitacao__unidade_tramitacao_local=%s" % ( - unidade_local_tramitacao) - args += "&tramitacao__status=%s" % (status_tramitacao) - args += "&salvar=%s" % ('Pesquisar') - - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaAtasList(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - args = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(pesquisar_atas) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(pesquisar_atas) - - inicio_intervalo_data_ata = self.request.GET.get( - 'txt_dat_inicio', - EMPTY_STRING - ).lstrip("0") - fim_intervalo_data_ata = self.request.GET.get( - 'txt_dat_fim', - EMPTY_STRING - ).lstrip("0") - - args += "?data_inicio_0=%s" % ( - inicio_intervalo_data_ata) - args += "&data_inicio_1=%s" % ( - fim_intervalo_data_ata) - args += "&salvar=%s" % ('Pesquisar') - - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaPresencaParlamentares(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - args = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(presenca_sessao) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(presenca_sessao) - - inicio_intervalo_data_presenca_parlamentar = self.request.GET.get( - 'txt_dat_inicio', - EMPTY_STRING - ).lstrip("0") - fim_intervalo_data_presenca_parlamentar = self.request.GET.get( - 'txt_dat_fim', - EMPTY_STRING - ).lstrip("0") - - args += "?data_inicio_0=%s" % ( - inicio_intervalo_data_presenca_parlamentar) - args += "&data_inicio_1=%s" % ( - fim_intervalo_data_presenca_parlamentar) - args += "&salvar=%s" % ('Pesquisar') - - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaMateriasPorAutor(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - url = EMPTY_STRING - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(relatorio_materia_por_autor) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(relatorio_materia_por_autor) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaMateriasPorAnoAutorTipo(RedirectView): - - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - url = EMPTY_STRING - ano = self.request.GET.get('ano', '') - username = self.request.user.username - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(relatorio_materia_por_ano_autor_tipo) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(relatorio_materia_por_ano_autor_tipo) - - if ano: - args = "?ano=%s" % (ano) - args += "&salvar=%s" % ('Pesquisar') - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url - - -class RedirecionaReuniao(RedirectView): - permanent = True - logger = logging.getLogger(__name__) - - def get_redirect_url(self): - - pk_reuniao = self.request.GET.get( - 'cod_comissao', - EMPTY_STRING) - url = EMPTY_STRING - username = self.request.user.username - if pk_reuniao: - kwargs = {'pk': pk_reuniao} - try: - self.logger.debug( - "user=" + username + ". Tentando obter url correspondente (pk={}).".format(kwargs['pk'])) - url = reverse(reuniao_detail, kwargs=kwargs) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(reuniao_detail) - - else: - try: - self.logger.debug("user=" + username + ". Tentando obter url.") - url = reverse(reuniao_list) - except NoReverseMatch as e: - self.logger.error("user=" + username + - ". Erro ao obter url. " + str(e)) - raise UnknownUrlNameError(reuniao_list) - - year = self.request.GET.get( - 'ano_reuniao', - EMPTY_STRING) - month = self.request.GET.get( - 'mes_reuniao', - EMPTY_STRING) - day = self.request.GET.get( - 'dia_reuniao', - EMPTY_STRING) - tipo_reuniao = self.request.GET.get( - 'tip_reuniao', - EMPTY_STRING) - - # Remove zeros à esquerda - day = day.lstrip("0") - month = month.lstrip("0") - args = EMPTY_STRING - args += "?data_inicio__year=%s" % (year) - args += "&data_inicio__month=%s" % (month) - args += "&data_inicio__day=%s" % (day) - args += "&tipo=%s&salvar=Pesquisar" % (tipo_reuniao) - url = "%s%s" % (url, args) - - url = has_iframe(url, self.request) - - return url diff --git a/sapl/settings.py b/sapl/settings.py index 34b9b1848..5517e32f1 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -61,7 +61,6 @@ SAPL_APPS = ( 'sapl.lexml', 'sapl.painel', 'sapl.protocoloadm', - 'sapl.redireciona_urls', 'sapl.compilacao', 'sapl.api', 'sapl.rules' diff --git a/sapl/test_urls.py b/sapl/test_urls.py index b01baec1b..3d317821a 100644 --- a/sapl/test_urls.py +++ b/sapl/test_urls.py @@ -175,30 +175,6 @@ apps_url_patterns_prefixs_and_users = { '/ta', '/sistema/ta', ]}, - 'redireciona_urls': { - 'prefixs': [ - '/default_index_html', - '/consultas/parlamentar/parlamentar_', - '/consultas/comissao/comissao_', - '/consultas/pauta_sessao/pauta_sessao_', - '/consultas/sessao_plenaria/', - - '/relatorios_administrativos/' - 'relatorios_administrativos_index_html', - - '/tramitacaoMaterias/tramitacaoMaterias', - '/tramitacaoMaterias/materia_mostrar_proc', - '/generico/materia_pesquisar_', - '/consultas/mesa_diretora/mesa_diretora_index_html', - '/consultas/mesa_diretora/parlamentar/parlamentar_', - '/generico/norma_juridica_pesquisar_', - '/consultas/norma_juridica/norma_juridica_mostrar_proc', - '/historicoTramitacoes/historicoTramitacoes', - '/atasSessao', - '/presencaSessao', - '/resumoPropositurasAutor', - '/propositurasAnoAutorTipo', - ]}, 'lexml': { 'prefixs': [ '/lexml', @@ -298,9 +274,6 @@ def test_urlpatterns(url_item, admin_client): Os prefixos permitidos são: %s """ % (url, app_name, prefixs) - else: - # ignorando app de redirecionamento de urls no padrão do SAPL 2.5 - pass urls_publicas_excecoes = { diff --git a/sapl/urls.py b/sapl/urls.py index 0481a246b..8cf280019 100644 --- a/sapl/urls.py +++ b/sapl/urls.py @@ -32,7 +32,6 @@ import sapl.norma.urls import sapl.painel.urls import sapl.parlamentares.urls import sapl.protocoloadm.urls -import sapl.redireciona_urls.urls import sapl.relatorios.urls import sapl.sessao.urls @@ -64,8 +63,6 @@ urlpatterns += [ url(r'^favicon\.ico$', RedirectView.as_view( url='/static/sapl/img/favicon.ico', permanent=True)), - url(r'', include(sapl.redireciona_urls.urls)), - path("robots.txt", TemplateView.as_view( template_name="robots.txt", content_type="text/plain")), From a5fac99d0cfb11b0d94a5c6a8c49d5b116d2cd40 Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:55:25 -0700 Subject: [PATCH 65/80] Move relatorios para app de relatorios (#3656) --- sapl/base/forms.py | 758 ------------- sapl/base/urls.py | 66 +- sapl/base/views.py | 1010 +---------------- sapl/relatorios/forms.py | 776 +++++++++++++ sapl/relatorios/urls.py | 58 +- sapl/relatorios/views.py | 985 +++++++++++++++- sapl/templates/navbar.yaml | 2 +- .../RelatorioAtas_filter.html | 2 +- .../RelatorioAudiencia_filter.html | 2 +- ...elatorioDataFimPrazoTramitacao_filter.html | 2 +- .../RelatorioDocumentosAcessorios_filter.html | 2 +- ...elatorioHistoricoTramitacaoAdm_filter.html | 2 +- .../RelatorioHistoricoTramitacao_filter.html | 2 +- .../RelatorioMateriasAnoAssunto.html | 0 ...latorioMateriasPorAnoAutorTipo_filter.html | 2 +- .../RelatorioMateriasPorAutor_filter.html | 2 +- ...RelatorioMateriasPorTramitacao_filter.html | 6 +- .../RelatorioNormaMes_filter.html | 2 +- .../RelatorioNormasPorAutor_filter.html | 2 +- .../RelatorioNormasVigencia_filter.html | 2 +- .../RelatorioPresencaSessao_filter.html | 2 +- .../RelatorioReuniao_filter.html | 2 +- .../{base => relatorios}/relatorios_list.html | 34 +- 23 files changed, 1863 insertions(+), 1858 deletions(-) create mode 100644 sapl/relatorios/forms.py rename sapl/templates/{base => relatorios}/RelatorioAtas_filter.html (89%) rename sapl/templates/{base => relatorios}/RelatorioAudiencia_filter.html (86%) rename sapl/templates/{base => relatorios}/RelatorioDataFimPrazoTramitacao_filter.html (94%) rename sapl/templates/{base => relatorios}/RelatorioDocumentosAcessorios_filter.html (92%) rename sapl/templates/{base => relatorios}/RelatorioHistoricoTramitacaoAdm_filter.html (93%) rename sapl/templates/{base => relatorios}/RelatorioHistoricoTramitacao_filter.html (93%) rename sapl/templates/{base => relatorios}/RelatorioMateriasAnoAssunto.html (100%) rename sapl/templates/{base => relatorios}/RelatorioMateriasPorAnoAutorTipo_filter.html (93%) rename sapl/templates/{base => relatorios}/RelatorioMateriasPorAutor_filter.html (94%) rename sapl/templates/{base => relatorios}/RelatorioMateriasPorTramitacao_filter.html (92%) rename sapl/templates/{base => relatorios}/RelatorioNormaMes_filter.html (94%) rename sapl/templates/{base => relatorios}/RelatorioNormasPorAutor_filter.html (95%) rename sapl/templates/{base => relatorios}/RelatorioNormasVigencia_filter.html (93%) rename sapl/templates/{base => relatorios}/RelatorioPresencaSessao_filter.html (96%) rename sapl/templates/{base => relatorios}/RelatorioReuniao_filter.html (87%) rename sapl/templates/{base => relatorios}/relatorios_list.html (52%) diff --git a/sapl/base/forms.py b/sapl/base/forms.py index a197fc8de..8c4b629ae 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -819,157 +819,6 @@ class OperadorAutorForm(ModelForm): self.fields['user'].widget = forms.RadioSelect() -class RelatorioDocumentosAcessoriosFilterSet(django_filters.FilterSet): - - @property - def qs(self): - parent = super(RelatorioDocumentosAcessoriosFilterSet, self).qs - return parent.distinct().order_by('-data') - - class Meta(FilterOverridesMetaMixin): - model = DocumentoAcessorio - fields = ['tipo', 'materia__tipo', 'data'] - - def __init__(self, *args, **kwargs): - super( - RelatorioDocumentosAcessoriosFilterSet, self - ).__init__(*args, **kwargs) - - self.filters['tipo'].label = 'Tipo de Documento' - self.filters['materia__tipo'].label = 'Tipo de Matéria do Documento' - self.filters['data'].label = 'Período (Data Inicial - Data Final)' - - self.form.fields['tipo'].required = True - - row0 = to_row([('tipo', 6), - ('materia__tipo', 6)]) - - row1 = to_row([('data', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisa'), - row0, row1, - buttons) - ) - - -class RelatorioAtasFilterSet(django_filters.FilterSet): - class Meta(FilterOverridesMetaMixin): - model = SessaoPlenaria - fields = ['data_inicio'] - - @property - def qs(self): - parent = super(RelatorioAtasFilterSet, self).qs - return parent.distinct().prefetch_related('tipo').exclude( - upload_ata='').order_by('-data_inicio', 'tipo', 'numero') - - def __init__(self, *args, **kwargs): - super(RelatorioAtasFilterSet, self).__init__( - *args, **kwargs) - - self.filters['data_inicio'].label = 'Período de Abertura (Inicial - Final)' - self.form.fields['data_inicio'].required = False - - row1 = to_row([('data_inicio', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Atas das Sessões Plenárias'), - row1, buttons, ) - ) - - -def ultimo_ano_com_norma(): - anos_normas = choice_anos_com_normas() - - if anos_normas: - return anos_normas[0] - return '' - - -class RelatorioNormasMesFilterSet(django_filters.FilterSet): - ano = django_filters.ChoiceFilter(required=True, - label='Ano da Norma', - choices=choice_anos_com_normas, - initial=ultimo_ano_com_norma) - - tipo = django_filters.ChoiceFilter(required=False, - label='Tipo Norma', - choices=choice_tipos_normas, - initial=0) - - class Meta: - model = NormaJuridica - fields = ['ano'] - - def __init__(self, *args, **kwargs): - super(RelatorioNormasMesFilterSet, self).__init__( - *args, **kwargs) - - self.filters['ano'].label = 'Ano' - self.form.fields['ano'].required = True - - row1 = to_row([('ano', 6), ('tipo', 6)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Normas por mês do ano.'), - row1, buttons, ) - ) - - @property - def qs(self): - parent = super(RelatorioNormasMesFilterSet, self).qs - return parent.distinct().order_by('data') - - class EstatisticasAcessoNormasForm(Form): ano = forms.ChoiceField(required=True, label='Ano de acesso', @@ -1033,502 +882,6 @@ class EstatisticasAcessoNormasForm(Form): return self.cleaned_data -class RelatorioNormasVigenciaFilterSet(django_filters.FilterSet): - ano = django_filters.ChoiceFilter(required=True, - label='Ano da Norma', - choices=choice_anos_com_normas, - initial=ultimo_ano_com_norma) - - tipo = django_filters.ChoiceFilter(required=False, - label='Tipo Norma', - choices=choice_tipos_normas, - initial=0) - - vigencia = forms.ChoiceField( - label=_('Vigência'), - choices=[(True, "Vigente"), (False, "Não vigente")], - widget=forms.RadioSelect(), - required=True, - initial=True) - - def __init__(self, *args, **kwargs): - super(RelatorioNormasVigenciaFilterSet, self).__init__( - *args, **kwargs) - - self.filters['ano'].label = 'Ano' - self.form.fields['ano'].required = True - self.form.fields['vigencia'] = self.vigencia - - row1 = to_row([('ano', 6), ('tipo', 6)]) - row2 = to_row([('vigencia', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Normas por vigência.'), - row1, row2, - buttons, ) - ) - - @property - def qs(self): - return qs_override_django_filter(self) - - -class RelatorioPresencaSessaoFilterSet(django_filters.FilterSet): - class Meta(FilterOverridesMetaMixin): - model = SessaoPlenaria - fields = ['data_inicio', - 'sessao_legislativa', - 'tipo', - 'legislatura'] - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.form.fields['exibir_ordem_dia'] = forms.BooleanField( - required=False, label='Exibir presença das Ordens do Dia') - self.form.initial['exibir_ordem_dia'] = True - - self.form.fields['exibir_somente_titular'] = forms.BooleanField( - required=False, label='Exibir somente parlamentares titulares') - self.form.initial['exibir_somente_titular'] = False - - self.form.fields['exibir_somente_ativo'] = forms.BooleanField( - required=False, label='Exibir somente parlamentares ativos') - self.form.initial['exibir_somente_ativo'] = False - - self.form.fields['legislatura'].required = True - - self.filters['data_inicio'].label = 'Período (Inicial - Final)' - - tipo_sessao_ordinaria = self.filters['tipo'].queryset.filter( - nome='Ordinária') - if tipo_sessao_ordinaria: - self.form.initial['tipo'] = tipo_sessao_ordinaria.first() - - row1 = to_row([('legislatura', 4), - ('sessao_legislativa', 4), - ('tipo', 4)]) - row2 = to_row([('exibir_ordem_dia', 12), - ('exibir_somente_titular', 12), - ('exibir_somente_ativo', 12)]) - row3 = to_row([('data_inicio', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Presença dos parlamentares nas sessões plenárias'), - row1, row2, row3, buttons, ) - ) - - @property - def qs(self): - return qs_override_django_filter(self) - - -class RelatorioHistoricoTramitacaoFilterSet(django_filters.FilterSet): - autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput()) - - @property - def qs(self): - parent = super(RelatorioHistoricoTramitacaoFilterSet, self).qs - return parent.distinct().prefetch_related('tipo').order_by('-ano', 'tipo', 'numero') - - class Meta(FilterOverridesMetaMixin): - model = MateriaLegislativa - fields = ['tipo', 'tramitacao__status', 'tramitacao__data_tramitacao', - 'tramitacao__unidade_tramitacao_local', 'tramitacao__unidade_tramitacao_destino'] - - def __init__(self, *args, **kwargs): - super(RelatorioHistoricoTramitacaoFilterSet, self).__init__( - *args, **kwargs) - - self.filters['tipo'].label = 'Tipo de Matéria' - self.filters['tramitacao__status'].label = _('Status') - self.filters['tramitacao__unidade_tramitacao_local'].label = _( - 'Unidade Local (Origem)') - self.filters['tramitacao__unidade_tramitacao_destino'].label = _( - 'Unidade Destino') - - row1 = to_row([('tramitacao__data_tramitacao', 12)]) - row2 = to_row([('tramitacao__unidade_tramitacao_local', 6), - ('tramitacao__unidade_tramitacao_destino', 6)]) - row3 = to_row( - [('tipo', 6), - ('tramitacao__status', 6)]) - - row4 = to_row([ - ('autoria__autor', 0), - (Button('pesquisar', - 'Pesquisar Autor', - css_class='btn btn-primary btn-sm'), 2), - (Button('limpar', - 'Limpar Autor', - css_class='btn btn-primary btn-sm'), 2) - ]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisar'), - row1, row2, row3, row4, - HTML(autor_label), - HTML(autor_modal), - buttons, ) - ) - - -class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): - materia__ano = django_filters.ChoiceFilter(required=False, - label='Ano da Matéria', - choices=choice_anos_com_materias) - - @property - def qs(self): - parent = super(RelatorioDataFimPrazoTramitacaoFilterSet, self).qs - return parent.distinct().prefetch_related('materia__tipo').order_by('tramitacao__data_fim_prazo', 'materia__tipo', 'materia__numero') - - class Meta(FilterOverridesMetaMixin): - model = MateriaEmTramitacao - fields = ['materia__tipo', - 'tramitacao__unidade_tramitacao_local', - 'tramitacao__unidade_tramitacao_destino', - 'tramitacao__status', - 'tramitacao__data_fim_prazo'] - - def __init__(self, *args, **kwargs): - super(RelatorioDataFimPrazoTramitacaoFilterSet, self).__init__( - *args, **kwargs) - - self.filters['materia__tipo'].label = 'Tipo de Matéria' - self.filters[ - 'tramitacao__unidade_tramitacao_local'].label = 'Unidade Local (Origem)' - self.filters['tramitacao__unidade_tramitacao_destino'].label = 'Unidade Destino' - self.filters['tramitacao__status'].label = 'Status de tramitação' - - row1 = to_row([('materia__ano', 12)]) - row2 = to_row([('tramitacao__data_fim_prazo', 12)]) - row3 = to_row([('tramitacao__unidade_tramitacao_local', 6), - ('tramitacao__unidade_tramitacao_destino', 6)]) - row4 = to_row( - [('materia__tipo', 6), - ('tramitacao__status', 6)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Tramitações'), - row1, row2, row3, row4, - buttons, ) - ) - - -class RelatorioReuniaoFilterSet(django_filters.FilterSet): - - @property - def qs(self): - parent = super(RelatorioReuniaoFilterSet, self).qs - return parent.distinct().order_by('-data', 'comissao') - - class Meta: - model = Reuniao - fields = ['comissao', 'data', - 'nome', 'tema'] - - def __init__(self, *args, **kwargs): - super(RelatorioReuniaoFilterSet, self).__init__( - *args, **kwargs) - - row1 = to_row([('data', 12)]) - row2 = to_row( - [('comissao', 4), - ('nome', 4), - ('tema', 4)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Reunião de Comissão'), - row1, row2, - buttons, ) - ) - - -class RelatorioAudienciaFilterSet(django_filters.FilterSet): - - @property - def qs(self): - parent = super(RelatorioAudienciaFilterSet, self).qs - return parent.distinct().order_by('-data', 'tipo') - - class Meta: - model = AudienciaPublica - fields = ['tipo', 'data', - 'nome'] - - def __init__(self, *args, **kwargs): - super(RelatorioAudienciaFilterSet, self).__init__( - *args, **kwargs) - - row1 = to_row([('data', 12)]) - row2 = to_row( - [('tipo', 4), - ('nome', 4)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Audiência Pública'), - row1, row2, - buttons, ) - ) - - -class RelatorioMateriasTramitacaoFilterSet(django_filters.FilterSet): - materia__ano = django_filters.ChoiceFilter(required=True, - label='Ano da Matéria', - choices=choice_anos_com_materias) - - tramitacao__unidade_tramitacao_destino = django_filters.ModelChoiceFilter( - queryset=UnidadeTramitacao.objects.all(), - label=_('Unidade Atual')) - - tramitacao__status = django_filters.ModelChoiceFilter( - queryset=StatusTramitacao.objects.all(), - label=_('Status Atual')) - - materia__autores = django_filters.ModelChoiceFilter( - label='Autor da Matéria', - queryset=Autor.objects.all()) - - @property - def qs(self): - parent = super(RelatorioMateriasTramitacaoFilterSet, self).qs - return parent.distinct().order_by( - '-materia__ano', 'materia__tipo', '-materia__numero' - ) - - class Meta: - model = MateriaEmTramitacao - fields = ['materia__ano', 'materia__tipo', - 'tramitacao__unidade_tramitacao_destino', - 'tramitacao__status', 'materia__autores'] - - def __init__(self, *args, **kwargs): - super(RelatorioMateriasTramitacaoFilterSet, self).__init__( - *args, **kwargs) - - self.filters['materia__tipo'].label = 'Tipo de Matéria' - - row1 = to_row([('materia__ano', 12)]) - row2 = to_row([('materia__tipo', 12)]) - row3 = to_row([('tramitacao__unidade_tramitacao_destino', 12)]) - row4 = to_row([('tramitacao__status', 12)]) - row5 = to_row([('materia__autores', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisa de Matéria em Tramitação'), - row1, row2, row3, row4, row5, - buttons, ) - ) - - -class RelatorioMateriasPorAnoAutorTipoFilterSet(django_filters.FilterSet): - ano = django_filters.ChoiceFilter(required=True, - label='Ano da Matéria', - choices=choice_anos_com_materias) - - class Meta: - model = MateriaLegislativa - fields = ['ano'] - - def __init__(self, *args, **kwargs): - super(RelatorioMateriasPorAnoAutorTipoFilterSet, self).__init__( - *args, **kwargs) - - row1 = to_row( - [('ano', 12)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisa de Matéria por Ano Autor Tipo'), - row1, - buttons, ) - ) - - -class RelatorioMateriasPorAutorFilterSet(django_filters.FilterSet): - autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput()) - - @property - def qs(self): - parent = super().qs - return parent.distinct().order_by('-ano', '-numero', 'tipo', 'autoria__autor', '-autoria__primeiro_autor') - - class Meta(FilterOverridesMetaMixin): - model = MateriaLegislativa - fields = ['tipo', 'data_apresentacao'] - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.filters['tipo'].label = 'Tipo de Matéria' - - row1 = to_row( - [('tipo', 12)]) - row2 = to_row( - [('data_apresentacao', 12)]) - row3 = to_row( - [('autoria__autor', 0), - (Button('pesquisar', - 'Pesquisar Autor', - css_class='btn btn-primary btn-sm'), 2), - (Button('limpar', - 'Limpar Autor', - css_class='btn btn-primary btn-sm'), 10)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisa de Matéria por Autor'), - row1, row2, - HTML(autor_label), - HTML(autor_modal), - row3, - buttons, ) - ) - - class CasaLegislativaForm(FileFieldCheckMixin, ModelForm): class Meta: @@ -1866,117 +1219,6 @@ class PartidoForm(FileFieldCheckMixin, ModelForm): return cleaned_data -class RelatorioHistoricoTramitacaoAdmFilterSet(django_filters.FilterSet): - - @property - def qs(self): - parent = super(RelatorioHistoricoTramitacaoAdmFilterSet, self).qs - return parent.distinct().prefetch_related('tipo').order_by('-ano', 'tipo', 'numero') - - class Meta(FilterOverridesMetaMixin): - model = DocumentoAdministrativo - fields = ['tipo', 'tramitacaoadministrativo__status', - 'tramitacaoadministrativo__data_tramitacao', - 'tramitacaoadministrativo__unidade_tramitacao_local', - 'tramitacaoadministrativo__unidade_tramitacao_destino'] - - def __init__(self, *args, **kwargs): - super(RelatorioHistoricoTramitacaoAdmFilterSet, self).__init__( - *args, **kwargs) - - self.filters['tipo'].label = 'Tipo de Documento' - self.filters['tramitacaoadministrativo__status'].label = _('Status') - self.filters['tramitacaoadministrativo__unidade_tramitacao_local'].label = _( - 'Unidade Local (Origem)') - self.filters['tramitacaoadministrativo__unidade_tramitacao_destino'].label = _( - 'Unidade Destino') - - row1 = to_row([('tramitacaoadministrativo__data_tramitacao', 12)]) - row2 = to_row([('tramitacaoadministrativo__unidade_tramitacao_local', 6), - ('tramitacaoadministrativo__unidade_tramitacao_destino', 6)]) - row3 = to_row( - [('tipo', 6), - ('tramitacaoadministrativo__status', 6)]) - - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_(''), - row1, row2, row3, - buttons, ) - ) - - -class RelatorioNormasPorAutorFilterSet(django_filters.FilterSet): - autorianorma__autor = django_filters.CharFilter(widget=forms.HiddenInput()) - - @property - def qs(self): - parent = super().qs - return parent.distinct().filter(autorianorma__primeiro_autor=True) \ - .order_by('autorianorma__autor', '-autorianorma__primeiro_autor', 'tipo', '-ano', '-numero') - - class Meta(FilterOverridesMetaMixin): - model = NormaJuridica - fields = ['tipo', 'data'] - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.filters['tipo'].label = 'Tipo de Norma' - - row1 = to_row( - [('tipo', 12)]) - row2 = to_row( - [('data', 12)]) - row3 = to_row( - [('autorianorma__autor', 0), - (Button('pesquisar', - 'Pesquisar Autor', - css_class='btn btn-primary btn-sm'), 2), - (Button('limpar', - 'Limpar Autor', - css_class='btn btn-primary btn-sm'), 10)]) - buttons = FormActions( - *[ - HTML(''' -
- - -
- ''') - ], - Submit('pesquisar', _('Pesquisar'), css_class='float-right', - onclick='return true;'), - css_class='form-group row justify-content-between', - ) - - self.form.helper = SaplFormHelper() - self.form.helper.form_method = 'GET' - self.form.helper.layout = Layout( - Fieldset(_('Pesquisar'), - row1, row2, - HTML(autor_label), - HTML(autor_modal), - row3, - form_actions(label='Pesquisar')) - ) - - class SaplSearchForm(ModelSearchForm): def search(self): diff --git a/sapl/base/urls.py b/sapl/base/urls.py index 7a527f102..6733a25ec 100644 --- a/sapl/base/urls.py +++ b/sapl/base/urls.py @@ -3,31 +3,22 @@ import os from django.conf.urls import include, url from django.contrib.auth import views from django.contrib.auth.decorators import permission_required - from django.views.generic.base import RedirectView, TemplateView from sapl.base.views import (AutorCrud, ConfirmarEmailView, TipoAutorCrud, get_estatistica, RecuperarSenhaEmailView, RecuperarSenhaFinalizadoView, - RecuperarSenhaConfirmaView, RecuperarSenhaCompletoView, RelatorioMateriaAnoAssuntoView, - IndexView, UserCrud) + RecuperarSenhaConfirmaView, RecuperarSenhaCompletoView, IndexView, UserCrud) from sapl.settings import MEDIA_URL, LOGOUT_REDIRECT_URL - from .apps import AppConfig -from .forms import LoginForm from .views import (LoginSapl, AlterarSenha, AppConfigCrud, CasaLegislativaCrud, - HelpTopicView, LogotipoView, RelatorioAtasView, PesquisarAuditLogView, - RelatorioAudienciaView, RelatorioDataFimPrazoTramitacaoView, RelatorioHistoricoTramitacaoView, - RelatorioMateriasPorAnoAutorTipoView, RelatorioMateriasPorAutorView, - RelatorioMateriasTramitacaoView, RelatorioPresencaSessaoView, RelatorioReuniaoView, SaplSearchView, - RelatorioNormasPublicadasMesView, RelatorioNormasVigenciaView, - EstatisticasAcessoNormas, RelatoriosListView, ListarInconsistenciasView, + HelpTopicView, LogotipoView, PesquisarAuditLogView, + SaplSearchView, + ListarInconsistenciasView, ListarProtocolosDuplicadosView, ListarProtocolosComMateriasView, ListarMatProtocoloInexistenteView, ListarParlamentaresDuplicadosView, ListarFiliacoesSemDataFiliacaoView, ListarMandatoSemDataInicioView, ListarParlMandatosIntersecaoView, ListarParlFiliacoesIntersecaoView, ListarAutoresDuplicadosView, ListarBancadaComissaoAutorExternoView, ListarLegislaturaInfindavelView, - ListarAnexadasCiclicasView, ListarAnexadosCiclicosView, pesquisa_textual, - RelatorioHistoricoTramitacaoAdmView, RelatorioDocumentosAcessoriosView, RelatorioNormasPorAutorView) - + ListarAnexadasCiclicasView, ListarAnexadosCiclicosView, pesquisa_textual) app_name = AppConfig.name @@ -68,53 +59,6 @@ urlpatterns = [ name="casa_legislativa"), url(r'^sistema/app-config/', include(AppConfigCrud.get_urls())), - # TODO mover estas telas para a app 'relatorios' - url(r'^sistema/relatorios/$', - RelatoriosListView.as_view(), name='relatorios_list'), - url(r'^sistema/relatorios/materia-por-autor$', - RelatorioMateriasPorAutorView.as_view(), name='materia_por_autor'), - url(r'^sistema/relatorios/relatorio-por-mes$', - RelatorioNormasPublicadasMesView.as_view(), name='normas_por_mes'), - url(r'^sistema/relatorios/relatorio-por-vigencia$', - RelatorioNormasVigenciaView.as_view(), name='normas_por_vigencia'), - url(r'^sistema/relatorios/estatisticas-acesso$', - EstatisticasAcessoNormas.as_view(), name='estatisticas_acesso'), - url(r'^sistema/relatorios/materia-por-ano-autor-tipo$', - RelatorioMateriasPorAnoAutorTipoView.as_view(), - name='materia_por_ano_autor_tipo'), - url(r'^sistema/relatorios/materia-por-tramitacao$', - RelatorioMateriasTramitacaoView.as_view(), - name='materia_por_tramitacao'), - url(r'^sistema/relatorios/materia-por-assunto$', - RelatorioMateriaAnoAssuntoView.as_view(), - name='materia_por_ano_assunto'), - url(r'^sistema/relatorios/historico-tramitacoes$', - RelatorioHistoricoTramitacaoView.as_view(), - name='historico_tramitacoes'), - url(r'^sistema/relatorios/data-fim-prazo-tramitacoes$', - RelatorioDataFimPrazoTramitacaoView.as_view(), - name='data_fim_prazo_tramitacoes'), - url(r'^sistema/relatorios/presenca$', - RelatorioPresencaSessaoView.as_view(), - name='presenca_sessao'), - url(r'^sistema/relatorios/atas$', - RelatorioAtasView.as_view(), - name='atas'), - url(r'^sistema/relatorios/reuniao$', - RelatorioReuniaoView.as_view(), - name='reuniao'), - url(r'^sistema/relatorios/audiencia$', - RelatorioAudienciaView.as_view(), - name='audiencia'), - url(r'^sistema/relatorios/historico-tramitacoesadm$', - RelatorioHistoricoTramitacaoAdmView.as_view(), - name='historico_tramitacoes_adm'), - url(r'^sistema/relatorios/documentos_acessorios$', - RelatorioDocumentosAcessoriosView.as_view(), - name='relatorio_documentos_acessorios'), - url(r'^sistema/relatorios/normas-por-autor$', - RelatorioNormasPorAutorView.as_view(), name='normas_por_autor'), - url(r'^email/validate/(?P[0-9A-Za-z_\-]+)/' '(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$', ConfirmarEmailView.as_view(), name='confirmar_email'), diff --git a/sapl/base/views.py b/sapl/base/views.py index 88bc57943..197a813f8 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -1,10 +1,8 @@ -from collections import OrderedDict import collections -import datetime +import collections import itertools import logging import os -import re from django.apps.registry import apps from django.contrib import messages @@ -14,11 +12,9 @@ from django.contrib.auth.models import Group from django.contrib.auth.tokens import default_token_generator from django.contrib.auth.views import (PasswordResetView, PasswordResetConfirmView, PasswordResetCompleteView, PasswordResetDoneView) -from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError +from django.core.exceptions import PermissionDenied, ValidationError from django.core.mail import send_mail -from django.db import connection -from django.db.models import Count, Q, Max, F -from django.forms.utils import ErrorList +from django.db.models import Count, Q, Max from django.http import Http404, HttpResponseRedirect, JsonResponse from django.shortcuts import redirect from django.template import TemplateDoesNotExist @@ -37,46 +33,27 @@ from haystack.views import SearchView from ratelimit.decorators import ratelimit from sapl import settings -from sapl.audiencia.models import AudienciaPublica, TipoAudienciaPublica -from sapl.base.forms import (AutorForm, TipoAutorForm, AutorFilterSet, RecuperarSenhaForm, +from sapl.base.forms import (AutorForm, TipoAutorForm, RecuperarSenhaForm, NovaSenhaForm, UserAdminForm, AuditLogFilterSet, - OperadorAutorForm, LoginForm, SaplSearchForm) -from sapl.base.models import AuditLog, Autor, TipoAutor, OperadorAutor -from sapl.comissoes.models import Comissao, Reuniao + LoginForm, SaplSearchForm) +from sapl.base.models import AuditLog, Autor, TipoAutor +from sapl.comissoes.models import Comissao from sapl.crud.base import CrudAux, make_pagination, Crud, \ - ListWithSearchForm, MasterDetailCrud -from sapl.materia.models import (Anexada, Autoria, DocumentoAcessorio, MateriaEmTramitacao, MateriaLegislativa, - Proposicao, StatusTramitacao, TipoDocumento, TipoMateriaLegislativa, UnidadeTramitacao, - MateriaAssunto) -from sapl.norma.models import NormaJuridica, TipoNormaJuridica, \ - NormaEstatisticas, ViewNormasEstatisticas + ListWithSearchForm +from sapl.materia.models import (Anexada, MateriaLegislativa, + Proposicao) +from sapl.norma.models import NormaJuridica, ViewNormasEstatisticas from sapl.parlamentares.models import ( - Filiacao, Legislatura, Mandato, Parlamentar, SessaoLegislativa) -from sapl.protocoloadm.models import (Anexado, DocumentoAdministrativo, Protocolo, StatusTramitacaoAdministrativo, - TipoDocumentoAdministrativo) -from sapl.relatorios.views import (relatorio_materia_em_tramitacao, relatorio_materia_por_autor, - relatorio_materia_por_ano_autor, relatorio_presenca_sessao, - relatorio_historico_tramitacao, relatorio_fim_prazo_tramitacao, relatorio_atas, - relatorio_audiencia, relatorio_normas_mes, relatorio_normas_vigencia, - relatorio_historico_tramitacao_adm, relatorio_reuniao, - relatorio_estatisticas_acesso_normas, relatorio_normas_por_autor, - relatorio_documento_acessorio) + Filiacao, Legislatura, Mandato, Parlamentar) +from sapl.protocoloadm.models import (Anexado, Protocolo) +from sapl.relatorios.views import (relatorio_estatisticas_acesso_normas) from sapl.sessao.models import ( - Bancada, PresencaOrdemDia, SessaoPlenaria, SessaoPlenariaPresenca, TipoSessaoPlenaria) + Bancada, SessaoPlenaria) from sapl.settings import EMAIL_SEND_USER -from sapl.utils import (gerar_hash_arquivo, intervalos_tem_intersecao, mail_service_configured, parlamentares_ativos, - SEPARADOR_HASH_PROPOSICAO, show_results_filter_set, num_materias_por_tipo, - google_recaptcha_configured, sapl_as_sapn, - groups_remove_user, groups_add_user, get_client_ip) - -from .forms import (AlterarSenhaForm, CasaLegislativaForm, ConfiguracoesAppForm, RelatorioAtasFilterSet, - RelatorioAudienciaFilterSet, RelatorioDataFimPrazoTramitacaoFilterSet, - RelatorioHistoricoTramitacaoFilterSet, RelatorioMateriasPorAnoAutorTipoFilterSet, - RelatorioMateriasPorAutorFilterSet, RelatorioMateriasTramitacaoFilterSet, - RelatorioPresencaSessaoFilterSet, RelatorioReuniaoFilterSet, - RelatorioNormasMesFilterSet, RelatorioNormasVigenciaFilterSet, EstatisticasAcessoNormasForm, - RelatorioHistoricoTramitacaoAdmFilterSet, RelatorioDocumentosAcessoriosFilterSet, - RelatorioNormasPorAutorFilterSet) +from sapl.utils import (gerar_hash_arquivo, intervalos_tem_intersecao, mail_service_configured, + SEPARADOR_HASH_PROPOSICAO, show_results_filter_set, google_recaptcha_configured, sapl_as_sapn, + get_client_ip) +from .forms import (AlterarSenhaForm, CasaLegislativaForm, ConfiguracoesAppForm, EstatisticasAcessoNormasForm) from .models import AppConfig, CasaLegislativa @@ -337,856 +314,6 @@ class AutorCrud(CrudAux): return qs.distinct('nome', 'id').order_by('nome', 'id') -class RelatoriosListView(TemplateView): - template_name = 'base/relatorios_list.html' - - def get_context_data(self, **kwargs): - context = super(TemplateView, self).get_context_data(**kwargs) - estatisticas_acesso_normas = AppConfig.objects.first().estatisticas_acesso_normas - context['estatisticas_acesso_normas'] = True if estatisticas_acesso_normas == 'S' else False - - return context - - -class RelatorioMixin: - def get(self, request, *args, **kwargs): - super(RelatorioMixin, self).get(request) - - is_relatorio = request.GET.get('relatorio') - context = self.get_context_data(filter=self.filterset) - - if is_relatorio: - return self.relatorio(request, context) - else: - return self.render_to_response(context) - - -class RelatorioDocumentosAcessoriosView(RelatorioMixin, FilterView): - model = DocumentoAcessorio - filterset_class = RelatorioDocumentosAcessoriosFilterSet - template_name = 'base/RelatorioDocumentosAcessorios_filter.html' - relatorio = relatorio_documento_acessorio - - def get_context_data(self, **kwargs): - context = super( - RelatorioDocumentosAcessoriosView, self - ).get_context_data(**kwargs) - - context['title'] = _('Documentos Acessórios das Matérias Legislativas') - - if not self.filterset.form.is_valid(): - return context - - query_dict = self.request.GET.copy() - context['show_results'] = show_results_filter_set(query_dict) - - context['tipo_documento'] = str( - TipoDocumento.objects.get(pk=self.request.GET['tipo']) - ) - - tipo_materia = self.request.GET['materia__tipo'] - if tipo_materia: - context['tipo_materia'] = str( - TipoMateriaLegislativa.objects.get(pk=tipo_materia) - ) - else: - context['tipo_materia'] = "Não selecionado" - - data_inicial = self.request.GET['data_0'] - data_final = self.request.GET['data_1'] - if not data_inicial: - data_inicial = "Data Inicial não definida" - if not data_final: - data_final = "Data Final não definida" - context['periodo'] = ( - data_inicial + ' - ' + data_final - ) - - return context - - -class RelatorioAtasView(RelatorioMixin, FilterView): - model = SessaoPlenaria - filterset_class = RelatorioAtasFilterSet - template_name = 'base/RelatorioAtas_filter.html' - relatorio = relatorio_atas - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['title'] = _('Atas das Sessões Plenárias') - - # Verifica se os campos foram preenchidos - if not self.filterset.form.is_valid(): - return context - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['periodo'] = ( - self.request.GET['data_inicio_0'] + - ' - ' + self.request.GET['data_inicio_1']) - - return context - - -class RelatorioPresencaSessaoView(RelatorioMixin, FilterView): - logger = logging.getLogger(__name__) - model = SessaoPlenaria - filterset_class = RelatorioPresencaSessaoFilterSet - template_name = 'base/RelatorioPresencaSessao_filter.html' - relatorio = relatorio_presenca_sessao - - def get_context_data(self, **kwargs): - - context = super().get_context_data(**kwargs) - context['title'] = _('Presença dos parlamentares nas sessões') - - # Verifica se os campos foram preenchidos - if not self.filterset.form.is_valid(): - return context - - cd = self.filterset.form.cleaned_data - if not cd['data_inicio'] and not cd['sessao_legislativa'] \ - and not cd['legislatura']: - msg = _( - "Formulário inválido! Preencha pelo menos algum dos campos Período, Legislatura ou Sessão Legislativa.") - messages.error(self.request, msg) - return context - - # Caso a data tenha sido preenchida, verifica se foi preenchida - # corretamente - if self.request.GET.get('data_inicio_0') and not self.request.GET.get('data_inicio_1'): - msg = _("Formulário inválido! Preencha a data do Período Final.") - messages.error(self.request, msg) - return context - - if not self.request.GET.get('data_inicio_0') and self.request.GET.get('data_inicio_1'): - msg = _("Formulário inválido! Preencha a data do Período Inicial.") - messages.error(self.request, msg) - return context - - param0 = {} - - legislatura_pk = self.request.GET.get('legislatura') - if legislatura_pk: - param0['sessao_plenaria__legislatura_id'] = legislatura_pk - legislatura = Legislatura.objects.get(id=legislatura_pk) - context['legislatura'] = legislatura - - sessao_legislativa_pk = self.request.GET.get('sessao_legislativa') - if sessao_legislativa_pk: - param0['sessao_plenaria__sessao_legislativa_id'] = sessao_legislativa_pk - sessao_legislativa = SessaoLegislativa.objects.get( - id=sessao_legislativa_pk) - context['sessao_legislativa'] = sessao_legislativa - - tipo_sessao_plenaria_pk = self.request.GET.get('tipo') - context['tipo'] = '' - if tipo_sessao_plenaria_pk: - param0['sessao_plenaria__tipo_id'] = tipo_sessao_plenaria_pk - context['tipo'] = TipoSessaoPlenaria.objects.get( - id=tipo_sessao_plenaria_pk) - - _range = [] - - if ('data_inicio_0' in self.request.GET) and self.request.GET['data_inicio_0'] and \ - ('data_inicio_1' in self.request.GET) and self.request.GET['data_inicio_1']: - where = context['object_list'].query.where - _range = where.children[0].rhs - - elif legislatura_pk and not sessao_legislativa_pk: - _range = [legislatura.data_inicio, legislatura.data_fim] - - elif sessao_legislativa_pk: - _range = [sessao_legislativa.data_inicio, - sessao_legislativa.data_fim] - - param0.update({'sessao_plenaria__data_inicio__range': _range}) - - # Parlamentares com Mandato no intervalo de tempo (Ativos) - parlamentares_qs = parlamentares_ativos( - _range[0], _range[1]).order_by('nome_parlamentar') - parlamentares_id = parlamentares_qs.values_list('id', flat=True) - - # Presenças de cada Parlamentar em Sessões - presenca_sessao = SessaoPlenariaPresenca.objects.filter( - **param0).values_list('parlamentar_id').annotate(sessao_count=Count('id')) - - # Presenças de cada Ordem do Dia - presenca_ordem = PresencaOrdemDia.objects.filter( - **param0).values_list('parlamentar_id').annotate(sessao_count=Count('id')) - - total_ordemdia = PresencaOrdemDia.objects.filter( - **param0).distinct('sessao_plenaria__id').order_by('sessao_plenaria__id').count() - - total_sessao = context['object_list'].count() - - username = self.request.user.username - - context['exibir_somente_titular'] = self.request.GET.get( - 'exibir_somente_titular') == 'on' - context['exibir_somente_ativo'] = self.request.GET.get( - 'exibir_somente_ativo') == 'on' - - # Completa o dicionario as informacoes parlamentar/sessao/ordem - parlamentares_presencas = [] - for p in parlamentares_qs: - parlamentar = {} - m = p.mandato_set.filter(Q(data_inicio_mandato__lte=_range[0], data_fim_mandato__gte=_range[1]) | - Q(data_inicio_mandato__lte=_range[0], data_fim_mandato__isnull=True) | - Q(data_inicio_mandato__gte=_range[0], data_fim_mandato__lte=_range[1]) | - # mandato suplente - Q(data_inicio_mandato__gte=_range[0], data_fim_mandato__lte=_range[1])) - - m = m.last() - - if not context['exibir_somente_titular'] and not context['exibir_somente_ativo']: - parlamentar = { - 'parlamentar': p, - 'titular': m.titular if m else False, - 'sessao_porc': 0, - 'ordemdia_porc': 0 - } - elif context['exibir_somente_titular'] and not context['exibir_somente_ativo']: - if m and m.titular: - parlamentar = { - 'parlamentar': p, - 'titular': m.titular if m else False, - 'sessao_porc': 0, - 'ordemdia_porc': 0 - } - else: - continue - elif not context['exibir_somente_titular'] and context['exibir_somente_ativo']: - if p.ativo: - parlamentar = { - 'parlamentar': p, - 'titular': m.titular if m else False, - 'sessao_porc': 0, - 'ordemdia_porc': 0 - } - else: - continue - elif context['exibir_somente_titular'] and context['exibir_somente_ativo']: - if m and m.titular and p.ativo: - parlamentar = { - 'parlamentar': p, - 'titular': m.titular if m else False, - 'sessao_porc': 0, - 'ordemdia_porc': 0 - } - else: - continue - else: - continue - - try: - self.logger.debug( - F'user={username}. Tentando obter presença do parlamentar (pk={p.id}).') - sessao_count = presenca_sessao.get(parlamentar_id=p.id)[1] - except ObjectDoesNotExist as e: - self.logger.error( - F'user={username}. Erro ao obter presença do parlamentar (pk={p.id}). Definido como 0. {str(e)}') - sessao_count = 0 - try: - # Presenças de cada Ordem do Dia - self.logger.info( - F'user={username}. Tentando obter PresencaOrdemDia para o parlamentar pk={p.id}.') - ordemdia_count = presenca_ordem.get(parlamentar_id=p.id)[1] - except ObjectDoesNotExist: - self.logger.error( - F'user={username}. Erro ao obter PresencaOrdemDia para o parlamentar pk={p.id}. Definido como 0.') - ordemdia_count = 0 - - parlamentar.update({ - 'sessao_count': sessao_count, - 'ordemdia_count': ordemdia_count - }) - - if total_sessao != 0: - parlamentar.update({'sessao_porc': round( - sessao_count * 100 / total_sessao, 2)}) - if total_ordemdia != 0: - parlamentar.update({'ordemdia_porc': round( - ordemdia_count * 100 / total_ordemdia, 2)}) - - parlamentares_presencas.append(parlamentar) - - context['date_range'] = _range - context['total_ordemdia'] = total_ordemdia - context['total_sessao'] = context['object_list'].count() - context['parlamentares'] = parlamentares_presencas - context['periodo'] = f"{self.request.GET['data_inicio_0']} - {self.request.GET['data_inicio_1']}" - context['sessao_legislativa'] = '' - context['legislatura'] = '' - context['exibir_ordem'] = self.request.GET.get( - 'exibir_ordem_dia') == 'on' - - if sessao_legislativa_pk: - context['sessao_legislativa'] = SessaoLegislativa.objects.get( - id=sessao_legislativa_pk) - if legislatura_pk: - context['legislatura'] = Legislatura.objects.get(id=legislatura_pk) - # ===================================================================== - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - - return context - - -class RelatorioHistoricoTramitacaoView(RelatorioMixin, FilterView): - model = MateriaLegislativa - filterset_class = RelatorioHistoricoTramitacaoFilterSet - template_name = 'base/RelatorioHistoricoTramitacao_filter.html' - relatorio = relatorio_historico_tramitacao - - def get_context_data(self, **kwargs): - context = super(RelatorioHistoricoTramitacaoView, - self).get_context_data(**kwargs) - context['title'] = _( - 'Histórico de Tramitações de Matérias Legislativas') - if not self.filterset.form.is_valid(): - return context - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['data_tramitacao'] = (self.request.GET['tramitacao__data_tramitacao_0'] + ' - ' + - self.request.GET['tramitacao__data_tramitacao_1']) - if self.request.GET['tipo']: - tipo = self.request.GET['tipo'] - context['tipo'] = ( - str(TipoMateriaLegislativa.objects.get(id=tipo))) - else: - context['tipo'] = '' - - if self.request.GET['tramitacao__status']: - tramitacao_status = self.request.GET['tramitacao__status'] - context['tramitacao__status'] = ( - str(StatusTramitacao.objects.get(id=tramitacao_status))) - else: - context['tramitacao__status'] = '' - - if self.request.GET['tramitacao__unidade_tramitacao_local']: - context['tramitacao__unidade_tramitacao_local'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacao__unidade_tramitacao_local']))) - else: - context['tramitacao__unidade_tramitacao_local'] = '' - - if self.request.GET['tramitacao__unidade_tramitacao_destino']: - context['tramitacao__unidade_tramitacao_destino'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacao__unidade_tramitacao_destino']))) - else: - context['tramitacao__unidade_tramitacao_destino'] = '' - - if self.request.GET['autoria__autor']: - context['autoria__autor'] = \ - (str(Autor.objects.get( - id=self.request.GET['autoria__autor']))) - else: - context['autoria__autor'] = '' - - return context - - -class RelatorioDataFimPrazoTramitacaoView(RelatorioMixin, FilterView): - model = MateriaEmTramitacao - filterset_class = RelatorioDataFimPrazoTramitacaoFilterSet - template_name = 'base/RelatorioDataFimPrazoTramitacao_filter.html' - relatorio = relatorio_fim_prazo_tramitacao - - def get_context_data(self, **kwargs): - context = super(RelatorioDataFimPrazoTramitacaoView, - self).get_context_data(**kwargs) - context['title'] = _( - 'Relatório de tramitações em intervalo de data de fim de prazo.') - if not self.filterset.form.is_valid(): - return context - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - - context['data_fim_prazo'] = (self.request.GET['tramitacao__data_fim_prazo_0'] + ' - ' + - self.request.GET['tramitacao__data_fim_prazo_1']) - - if self.request.GET['materia__ano']: - context['ano'] = self.request.GET['materia__ano'] - else: - context['ano'] = '' - - if self.request.GET['materia__tipo']: - tipo = self.request.GET['materia__tipo'] - context['tipo'] = ( - str(TipoMateriaLegislativa.objects.get(id=tipo))) - else: - context['tipo'] = '' - - if self.request.GET['tramitacao__status']: - tramitacao_status = self.request.GET['tramitacao__status'] - context['tramitacao__status'] = ( - str(StatusTramitacao.objects.get(id=tramitacao_status))) - else: - context['tramitacao__status'] = '' - - if self.request.GET['tramitacao__unidade_tramitacao_local']: - context['tramitacao__unidade_tramitacao_local'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacao__unidade_tramitacao_local']))) - else: - context['tramitacao__unidade_tramitacao_local'] = '' - - if self.request.GET['tramitacao__unidade_tramitacao_destino']: - context['tramitacao__unidade_tramitacao_destino'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacao__unidade_tramitacao_destino']))) - else: - context['tramitacao__unidade_tramitacao_destino'] = '' - - return context - - -class RelatorioReuniaoView(RelatorioMixin, FilterView): - model = Reuniao - filterset_class = RelatorioReuniaoFilterSet - template_name = 'base/RelatorioReuniao_filter.html' - relatorio = relatorio_reuniao - - def get_filterset_kwargs(self, filterset_class): - super(RelatorioReuniaoView, - self).get_filterset_kwargs(filterset_class) - - kwargs = {'data': self.request.GET or None} - return kwargs - - def get_context_data(self, **kwargs): - context = super(RelatorioReuniaoView, - self).get_context_data(**kwargs) - context['title'] = _('Reunião de Comissão') - if not self.filterset.form.is_valid(): - return context - qr = self.request.GET.copy() - - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - - if self.request.GET['comissao']: - comissao = self.request.GET['comissao'] - context['comissao'] = (str(Comissao.objects.get(id=comissao))) - else: - context['comissao'] = '' - - return context - - -class RelatorioAudienciaView(RelatorioMixin, FilterView): - model = AudienciaPublica - filterset_class = RelatorioAudienciaFilterSet - template_name = 'base/RelatorioAudiencia_filter.html' - relatorio = relatorio_audiencia - - def get_filterset_kwargs(self, filterset_class): - super(RelatorioAudienciaView, - self).get_filterset_kwargs(filterset_class) - - kwargs = {'data': self.request.GET or None} - return kwargs - - def get_context_data(self, **kwargs): - context = super(RelatorioAudienciaView, - self).get_context_data(**kwargs) - context['title'] = _('Audiência Pública') - if not self.filterset.form.is_valid(): - return context - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - - if self.request.GET['tipo']: - tipo = self.request.GET['tipo'] - context['tipo'] = (str(TipoAudienciaPublica.objects.get(id=tipo))) - else: - context['tipo'] = '' - - return context - - -class RelatorioMateriasTramitacaoView(RelatorioMixin, FilterView): - model = MateriaEmTramitacao - filterset_class = RelatorioMateriasTramitacaoFilterSet - template_name = 'base/RelatorioMateriasPorTramitacao_filter.html' - relatorio = relatorio_materia_em_tramitacao - - paginate_by = 100 - - total_resultados_tipos = {} - - def get_filterset_kwargs(self, filterset_class): - data = super().get_filterset_kwargs(filterset_class) - - if data['data']: - qs = data['queryset'] - - ano_materia = data['data']['materia__ano'] - tipo_materia = data['data']['materia__tipo'] - unidade_tramitacao_destino = data['data']['tramitacao__unidade_tramitacao_destino'] - status_tramitacao = data['data']['tramitacao__status'] - autor = data['data']['materia__autores'] - - kwargs = {} - if ano_materia: - kwargs['materia__ano'] = ano_materia - if tipo_materia: - kwargs['materia__tipo'] = tipo_materia - if unidade_tramitacao_destino: - kwargs['tramitacao__unidade_tramitacao_destino'] = unidade_tramitacao_destino - if status_tramitacao: - kwargs['tramitacao__status'] = status_tramitacao - if autor: - kwargs['materia__autores'] = autor - - qs = qs.filter(**kwargs) - data['queryset'] = qs - - self.total_resultados_tipos = num_materias_por_tipo( - qs, "materia__tipo") - - return data - - def get_queryset(self): - qs = super().get_queryset() - qs = qs.select_related('materia__tipo').filter( - materia__em_tramitacao=True - ).exclude( - tramitacao__status__indicador='F' - ).order_by('-materia__ano', '-materia__numero') - return qs - - def get_context_data(self, **kwargs): - context = super( - RelatorioMateriasTramitacaoView, self - ).get_context_data(**kwargs) - - context['title'] = _('Matérias em Tramitação') - - if not self.filterset.form.is_valid(): - return context - - qr = self.request.GET.copy() - - context['qtdes'] = self.total_resultados_tipos - context['ano'] = (self.request.GET['materia__ano']) - - if self.request.GET['materia__tipo']: - tipo = self.request.GET['materia__tipo'] - context['tipo'] = ( - str(TipoMateriaLegislativa.objects.get(id=tipo)) - ) - else: - context['tipo'] = '' - - if self.request.GET['tramitacao__status']: - tramitacao_status = self.request.GET['tramitacao__status'] - context['tramitacao__status'] = ( - str(StatusTramitacao.objects.get(id=tramitacao_status)) - ) - else: - context['tramitacao__status'] = '' - - if self.request.GET['tramitacao__unidade_tramitacao_destino']: - context['tramitacao__unidade_tramitacao_destino'] = ( - str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacao__unidade_tramitacao_destino'] - )) - ) - else: - context['tramitacao__unidade_tramitacao_destino'] = '' - - if self.request.GET['materia__autores']: - autor = self.request.GET['materia__autores'] - context['materia__autor'] = ( - str(Autor.objects.get(id=autor)) - ) - else: - context['materia__autor'] = '' - if 'page' in qr: - del qr['page'] - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - context['show_results'] = show_results_filter_set(qr) - - paginator = context['paginator'] - page_obj = context['page_obj'] - - context['page_range'] = make_pagination( - page_obj.number, paginator.num_pages - ) - context['NO_ENTRIES_MSG'] = 'Nenhum encontrado.' - - return context - - -class RelatorioMateriasPorAnoAutorTipoView(RelatorioMixin, FilterView): - model = MateriaLegislativa - filterset_class = RelatorioMateriasPorAnoAutorTipoFilterSet - template_name = 'base/RelatorioMateriasPorAnoAutorTipo_filter.html' - relatorio = relatorio_materia_por_ano_autor - - def get_materias_autor_ano(self, ano, primeiro_autor): - - autorias = Autoria.objects.filter(materia__ano=ano, primeiro_autor=primeiro_autor).values( - 'autor', - 'materia__tipo__sigla', - 'materia__tipo__descricao').annotate( - total=Count('materia__tipo')).order_by( - 'autor', - 'materia__tipo') - - autores_ids = set([i['autor'] for i in autorias]) - - autores = dict((a.id, a) for a in Autor.objects.filter( - id__in=autores_ids)) - - relatorio = [] - visitados = set() - curr = None - - for a in autorias: - # se mudou autor, salva atual, caso existente, e reinicia `curr` - if a['autor'] not in visitados: - if curr: - relatorio.append(curr) - - curr = {} - curr['autor'] = autores[a['autor']] - curr['materia'] = [] - curr['total'] = 0 - - visitados.add(a['autor']) - - # atualiza valores - curr['materia'].append((a['materia__tipo__descricao'], a['total'])) - curr['total'] += a['total'] - # adiciona o ultimo - relatorio.append(curr) - - return relatorio - - def get_filterset_kwargs(self, filterset_class): - super(RelatorioMateriasPorAnoAutorTipoView, - self).get_filterset_kwargs(filterset_class) - - kwargs = {'data': self.request.GET or None} - return kwargs - - def get_context_data(self, **kwargs): - context = super(RelatorioMateriasPorAnoAutorTipoView, - self).get_context_data(**kwargs) - - context['title'] = _('Matérias por Ano, Autor e Tipo') - if not self.filterset.form.is_valid(): - return context - qs = context['object_list'] - context['qtdes'] = num_materias_por_tipo(qs) - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['ano'] = self.request.GET['ano'] - - if 'ano' in self.request.GET and self.request.GET['ano']: - ano = int(self.request.GET['ano']) - context['relatorio'] = self.get_materias_autor_ano(ano, True) - context['corelatorio'] = self.get_materias_autor_ano(ano, False) - else: - context['relatorio'] = [] - - return context - - -class RelatorioMateriasPorAutorView(RelatorioMixin, FilterView): - model = MateriaLegislativa - filterset_class = RelatorioMateriasPorAutorFilterSet - template_name = 'base/RelatorioMateriasPorAutor_filter.html' - relatorio = relatorio_materia_por_autor - - def get_filterset_kwargs(self, filterset_class): - super().get_filterset_kwargs(filterset_class) - kwargs = {'data': self.request.GET or None} - return kwargs - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - - context['title'] = _('Matérias por Autor') - if not self.filterset.form.is_valid(): - return context - - qs = context['object_list'] - context['materias_resultado'] = list(OrderedDict.fromkeys(qs)) - context['qtdes'] = num_materias_por_tipo(qs) - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - if self.request.GET['tipo']: - tipo = int(self.request.GET['tipo']) - context['tipo'] = ( - str(TipoMateriaLegislativa.objects.get(id=tipo))) - else: - context['tipo'] = '' - if self.request.GET['autoria__autor']: - autor = int(self.request.GET['autoria__autor']) - context['autor'] = (str(Autor.objects.get(id=autor))) - else: - context['autor'] = '' - context['periodo'] = ( - self.request.GET['data_apresentacao_0'] + - ' - ' + self.request.GET['data_apresentacao_1']) - - return context - - -class RelatorioMateriaAnoAssuntoView(ListView): - template_name = 'base/RelatorioMateriasAnoAssunto.html' - - def get_queryset(self): - return MateriaAssunto.objects.all().values( - 'assunto_id', - assunto_materia=F('assunto__assunto'), - ano=F('materia__ano')).annotate( - total=Count('assunto_id')).order_by('-materia__ano', 'assunto_id') - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['title'] = _('Matérias por Ano e Assunto') - - # In[10]: MateriaAssunto.objects.all().values( - # ...: 'materia__ano').annotate( - # ...: total = Count('materia__ano')).order_by('-materia__ano') - - mat = MateriaLegislativa.objects.filter( - materiaassunto__isnull=True).values( - 'ano').annotate( - total=Count('ano')).order_by('-ano') - - context.update({"materias_sem_assunto": mat}) - return context - - -class RelatorioNormasPublicadasMesView(RelatorioMixin, FilterView): - model = NormaJuridica - filterset_class = RelatorioNormasMesFilterSet - template_name = 'base/RelatorioNormaMes_filter.html' - relatorio = relatorio_normas_mes - - def get_context_data(self, **kwargs): - context = super(RelatorioNormasPublicadasMesView, - self).get_context_data(**kwargs) - context['title'] = _('Normas') - - # Verifica se os campos foram preenchidos - if not self.filterset.form.is_valid(): - return context - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['ano'] = self.request.GET['ano'] - - normas_mes = collections.OrderedDict() - meses = {1: 'Janeiro', 2: 'Fevereiro', 3: 'Março', 4: 'Abril', 5: 'Maio', 6: 'Junho', - 7: 'Julho', 8: 'Agosto', 9: 'Setembro', 10: 'Outubro', 11: 'Novembro', 12: 'Dezembro'} - for norma in context['object_list']: - if not meses[norma.data.month] in normas_mes: - normas_mes[meses[norma.data.month]] = [] - normas_mes[meses[norma.data.month]].append(norma) - - context['normas_mes'] = normas_mes - - quant_normas_mes = {} - for key in normas_mes.keys(): - quant_normas_mes[key] = len(normas_mes[key]) - - context['quant_normas_mes'] = quant_normas_mes - - return context - - -class RelatorioNormasVigenciaView(RelatorioMixin, FilterView): - model = NormaJuridica - filterset_class = RelatorioNormasVigenciaFilterSet - template_name = 'base/RelatorioNormasVigencia_filter.html' - relatorio = relatorio_normas_vigencia - - def get_filterset_kwargs(self, filterset_class): - super(RelatorioNormasVigenciaView, - self).get_filterset_kwargs(filterset_class) - - kwargs = {'data': self.request.GET or None} - qs = self.get_queryset().order_by('data').distinct() - if kwargs['data']: - ano = kwargs['data']['ano'] - vigencia = kwargs['data']['vigencia'] - if ano: - qs = qs.filter(ano=ano) - - if vigencia == 'True': - qs_dt_not_null = qs.filter(data_vigencia__isnull=True) - qs = (qs_dt_not_null | qs.filter( - data_vigencia__gte=datetime.datetime.now().date())).distinct() - else: - qs = qs.filter( - data_vigencia__lt=datetime.datetime.now().date()) - - kwargs.update({ - 'queryset': qs - }) - return kwargs - - def get_context_data(self, **kwargs): - context = super(RelatorioNormasVigenciaView, - self).get_context_data(**kwargs) - context['title'] = _('Normas por vigência') - - # Verifica se os campos foram preenchidos - if not self.filterset.form.is_valid(): - return context - - normas_totais = NormaJuridica.objects.filter( - ano=self.request.GET['ano']) - - context['quant_total'] = len(normas_totais) - if self.request.GET['vigencia'] == 'True': - context['vigencia'] = 'Vigente' - context['quant_vigente'] = len(context['object_list']) - context['quant_nao_vigente'] = context['quant_total'] - \ - context['quant_vigente'] - else: - context['vigencia'] = 'Não vigente' - context['quant_nao_vigente'] = len(context['object_list']) - context['quant_vigente'] = context['quant_total'] - \ - context['quant_nao_vigente'] - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['ano'] = self.request.GET['ano'] - - return context - - class EstatisticasAcessoNormas(TemplateView): template_name = 'base/EstatisticasAcessoNormas_filter.html' @@ -2421,102 +1548,3 @@ def pesquisa_textual(request): json_dict['resultados'].append(sec_dict) return JsonResponse(json_dict) - - -class RelatorioHistoricoTramitacaoAdmView(RelatorioMixin, FilterView): - model = DocumentoAdministrativo - filterset_class = RelatorioHistoricoTramitacaoAdmFilterSet - template_name = 'base/RelatorioHistoricoTramitacaoAdm_filter.html' - relatorio = relatorio_historico_tramitacao_adm - - def get_context_data(self, **kwargs): - context = super(RelatorioHistoricoTramitacaoAdmView, - self).get_context_data(**kwargs) - context['title'] = _( - 'Histórico de Tramitações de Documento Administrativo') - if not self.filterset.form.is_valid(): - return context - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - context['data_tramitacao'] = (self.request.GET['tramitacaoadministrativo__data_tramitacao_0'] + ' - ' + - self.request.GET['tramitacaoadministrativo__data_tramitacao_1']) - if self.request.GET['tipo']: - tipo = self.request.GET['tipo'] - context['tipo'] = ( - str(TipoDocumentoAdministrativo.objects.get(id=tipo))) - else: - context['tipo'] = '' - - if self.request.GET['tramitacaoadministrativo__status']: - tramitacao_status = self.request.GET['tramitacaoadministrativo__status'] - context['tramitacaoadministrativo__status'] = ( - str(StatusTramitacaoAdministrativo.objects.get(id=tramitacao_status))) - else: - context['tramitacaoadministrativo__status'] = '' - - if self.request.GET['tramitacaoadministrativo__unidade_tramitacao_local']: - context['tramitacaoadministrativo__unidade_tramitacao_local'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacaoadministrativo__unidade_tramitacao_local']))) - else: - context['tramitacaoadministrativo__unidade_tramitacao_local'] = '' - - if self.request.GET['tramitacaoadministrativo__unidade_tramitacao_destino']: - context['tramitacaoadministrativo__unidade_tramitacao_destino'] = \ - (str(UnidadeTramitacao.objects.get( - id=self.request.GET['tramitacaoadministrativo__unidade_tramitacao_destino']))) - else: - context['tramitacaoadministrativo__unidade_tramitacao_destino'] = '' - - return context - - -class RelatorioNormasPorAutorView(RelatorioMixin, FilterView): - model = NormaJuridica - filterset_class = RelatorioNormasPorAutorFilterSet - template_name = 'base/RelatorioNormasPorAutor_filter.html' - relatorio = relatorio_normas_por_autor - - def get_filterset_kwargs(self, filterset_class): - super().get_filterset_kwargs(filterset_class) - kwargs = {'data': self.request.GET or None} - return kwargs - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - - context['title'] = _('Normas por Autor') - if not self.filterset.form.is_valid(): - return context - - qtdes = {} - for tipo in TipoNormaJuridica.objects.all(): - qs = context['object_list'] - qtde = len(qs.filter(tipo_id=tipo.id)) - if qtde > 0: - qtdes[tipo] = qtde - context['qtdes'] = qtdes - - qr = self.request.GET.copy() - context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' - - context['show_results'] = show_results_filter_set(qr) - if self.request.GET['tipo']: - tipo = int(self.request.GET['tipo']) - context['tipo'] = ( - str(TipoNormaJuridica.objects.get(id=tipo))) - else: - context['tipo'] = '' - - if self.request.GET['autorianorma__autor']: - autor = int(self.request.GET['autorianorma__autor']) - context['autor'] = (str(Autor.objects.get(id=autor))) - else: - context['autor'] = '' - context['periodo'] = ( - self.request.GET['data_0'] + - ' - ' + self.request.GET['data_1']) - - return context diff --git a/sapl/relatorios/forms.py b/sapl/relatorios/forms.py new file mode 100644 index 000000000..8ac7eca02 --- /dev/null +++ b/sapl/relatorios/forms.py @@ -0,0 +1,776 @@ +import django_filters +from crispy_forms.bootstrap import (FormActions) +from crispy_forms.layout import (HTML, Button, Fieldset, + Layout, Submit) +from django import forms +from django.utils.translation import ugettext_lazy as _ + +from sapl.audiencia.models import AudienciaPublica +from sapl.base.models import Autor +from sapl.comissoes.models import Reuniao +from sapl.crispy_layout_mixin import SaplFormHelper, to_row, form_actions +from sapl.materia.models import DocumentoAcessorio, MateriaLegislativa, MateriaEmTramitacao, UnidadeTramitacao, \ + StatusTramitacao +from sapl.norma.models import NormaJuridica +from sapl.protocoloadm.models import DocumentoAdministrativo +from sapl.sessao.models import SessaoPlenaria +from sapl.utils import FilterOverridesMetaMixin, choice_anos_com_normas, qs_override_django_filter, \ + choice_anos_com_materias, choice_tipos_normas, autor_label, autor_modal + + +class RelatorioDocumentosAcessoriosFilterSet(django_filters.FilterSet): + + @property + def qs(self): + parent = super(RelatorioDocumentosAcessoriosFilterSet, self).qs + return parent.distinct().order_by('-data') + + class Meta(FilterOverridesMetaMixin): + model = DocumentoAcessorio + fields = ['tipo', 'materia__tipo', 'data'] + + def __init__(self, *args, **kwargs): + super( + RelatorioDocumentosAcessoriosFilterSet, self + ).__init__(*args, **kwargs) + + self.filters['tipo'].label = 'Tipo de Documento' + self.filters['materia__tipo'].label = 'Tipo de Matéria do Documento' + self.filters['data'].label = 'Período (Data Inicial - Data Final)' + + self.form.fields['tipo'].required = True + + row0 = to_row([('tipo', 6), + ('materia__tipo', 6)]) + + row1 = to_row([('data', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisa'), + row0, row1, + buttons) + ) + + +class RelatorioAtasFilterSet(django_filters.FilterSet): + class Meta(FilterOverridesMetaMixin): + model = SessaoPlenaria + fields = ['data_inicio'] + + @property + def qs(self): + parent = super(RelatorioAtasFilterSet, self).qs + return parent.distinct().prefetch_related('tipo').exclude( + upload_ata='').order_by('-data_inicio', 'tipo', 'numero') + + def __init__(self, *args, **kwargs): + super(RelatorioAtasFilterSet, self).__init__( + *args, **kwargs) + + self.filters['data_inicio'].label = 'Período de Abertura (Inicial - Final)' + self.form.fields['data_inicio'].required = False + + row1 = to_row([('data_inicio', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Atas das Sessões Plenárias'), + row1, buttons, ) + ) + + +def ultimo_ano_com_norma(): + anos_normas = choice_anos_com_normas() + + if anos_normas: + return anos_normas[0] + return '' + + +class RelatorioNormasMesFilterSet(django_filters.FilterSet): + ano = django_filters.ChoiceFilter(required=True, + label='Ano da Norma', + choices=choice_anos_com_normas, + initial=ultimo_ano_com_norma) + + tipo = django_filters.ChoiceFilter(required=False, + label='Tipo Norma', + choices=choice_tipos_normas, + initial=0) + + class Meta: + model = NormaJuridica + fields = ['ano'] + + def __init__(self, *args, **kwargs): + super(RelatorioNormasMesFilterSet, self).__init__( + *args, **kwargs) + + self.filters['ano'].label = 'Ano' + self.form.fields['ano'].required = True + + row1 = to_row([('ano', 6), ('tipo', 6)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Normas por mês do ano.'), + row1, buttons, ) + ) + + @property + def qs(self): + parent = super(RelatorioNormasMesFilterSet, self).qs + return parent.distinct().order_by('data') + + +class RelatorioPresencaSessaoFilterSet(django_filters.FilterSet): + class Meta(FilterOverridesMetaMixin): + model = SessaoPlenaria + fields = ['data_inicio', + 'sessao_legislativa', + 'tipo', + 'legislatura'] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.form.fields['exibir_ordem_dia'] = forms.BooleanField( + required=False, label='Exibir presença das Ordens do Dia') + self.form.initial['exibir_ordem_dia'] = True + + self.form.fields['exibir_somente_titular'] = forms.BooleanField( + required=False, label='Exibir somente parlamentares titulares') + self.form.initial['exibir_somente_titular'] = False + + self.form.fields['exibir_somente_ativo'] = forms.BooleanField( + required=False, label='Exibir somente parlamentares ativos') + self.form.initial['exibir_somente_ativo'] = False + + self.form.fields['legislatura'].required = True + + self.filters['data_inicio'].label = 'Período (Inicial - Final)' + + tipo_sessao_ordinaria = self.filters['tipo'].queryset.filter( + nome='Ordinária') + if tipo_sessao_ordinaria: + self.form.initial['tipo'] = tipo_sessao_ordinaria.first() + + row1 = to_row([('legislatura', 4), + ('sessao_legislativa', 4), + ('tipo', 4)]) + row2 = to_row([('exibir_ordem_dia', 12), + ('exibir_somente_titular', 12), + ('exibir_somente_ativo', 12)]) + row3 = to_row([('data_inicio', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Presença dos parlamentares nas sessões plenárias'), + row1, row2, row3, buttons, ) + ) + + @property + def qs(self): + return qs_override_django_filter(self) + + +class RelatorioHistoricoTramitacaoFilterSet(django_filters.FilterSet): + autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput()) + + @property + def qs(self): + parent = super(RelatorioHistoricoTramitacaoFilterSet, self).qs + return parent.distinct().prefetch_related('tipo').order_by('-ano', 'tipo', 'numero') + + class Meta(FilterOverridesMetaMixin): + model = MateriaLegislativa + fields = ['tipo', 'tramitacao__status', 'tramitacao__data_tramitacao', + 'tramitacao__unidade_tramitacao_local', 'tramitacao__unidade_tramitacao_destino'] + + def __init__(self, *args, **kwargs): + super(RelatorioHistoricoTramitacaoFilterSet, self).__init__( + *args, **kwargs) + + self.filters['tipo'].label = 'Tipo de Matéria' + self.filters['tramitacao__status'].label = _('Status') + self.filters['tramitacao__unidade_tramitacao_local'].label = _( + 'Unidade Local (Origem)') + self.filters['tramitacao__unidade_tramitacao_destino'].label = _( + 'Unidade Destino') + + row1 = to_row([('tramitacao__data_tramitacao', 12)]) + row2 = to_row([('tramitacao__unidade_tramitacao_local', 6), + ('tramitacao__unidade_tramitacao_destino', 6)]) + row3 = to_row( + [('tipo', 6), + ('tramitacao__status', 6)]) + + row4 = to_row([ + ('autoria__autor', 0), + (Button('pesquisar', + 'Pesquisar Autor', + css_class='btn btn-primary btn-sm'), 2), + (Button('limpar', + 'Limpar Autor', + css_class='btn btn-primary btn-sm'), 2) + ]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisar'), + row1, row2, row3, row4, + HTML(autor_label), + HTML(autor_modal), + buttons, ) + ) + + +class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): + materia__ano = django_filters.ChoiceFilter(required=False, + label='Ano da Matéria', + choices=choice_anos_com_materias) + + @property + def qs(self): + parent = super(RelatorioDataFimPrazoTramitacaoFilterSet, self).qs + return parent.distinct().prefetch_related('materia__tipo').order_by('tramitacao__data_fim_prazo', 'materia__tipo', 'materia__numero') + + class Meta(FilterOverridesMetaMixin): + model = MateriaEmTramitacao + fields = ['materia__tipo', + 'tramitacao__unidade_tramitacao_local', + 'tramitacao__unidade_tramitacao_destino', + 'tramitacao__status', + 'tramitacao__data_fim_prazo'] + + def __init__(self, *args, **kwargs): + super(RelatorioDataFimPrazoTramitacaoFilterSet, self).__init__( + *args, **kwargs) + + self.filters['materia__tipo'].label = 'Tipo de Matéria' + self.filters[ + 'tramitacao__unidade_tramitacao_local'].label = 'Unidade Local (Origem)' + self.filters['tramitacao__unidade_tramitacao_destino'].label = 'Unidade Destino' + self.filters['tramitacao__status'].label = 'Status de tramitação' + + row1 = to_row([('materia__ano', 12)]) + row2 = to_row([('tramitacao__data_fim_prazo', 12)]) + row3 = to_row([('tramitacao__unidade_tramitacao_local', 6), + ('tramitacao__unidade_tramitacao_destino', 6)]) + row4 = to_row( + [('materia__tipo', 6), + ('tramitacao__status', 6)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Tramitações'), + row1, row2, row3, row4, + buttons, ) + ) + + +class RelatorioReuniaoFilterSet(django_filters.FilterSet): + + @property + def qs(self): + parent = super(RelatorioReuniaoFilterSet, self).qs + return parent.distinct().order_by('-data', 'comissao') + + class Meta: + model = Reuniao + fields = ['comissao', 'data', + 'nome', 'tema'] + + def __init__(self, *args, **kwargs): + super(RelatorioReuniaoFilterSet, self).__init__( + *args, **kwargs) + + row1 = to_row([('data', 12)]) + row2 = to_row( + [('comissao', 4), + ('nome', 4), + ('tema', 4)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Reunião de Comissão'), + row1, row2, + buttons, ) + ) + + +class RelatorioAudienciaFilterSet(django_filters.FilterSet): + + @property + def qs(self): + parent = super(RelatorioAudienciaFilterSet, self).qs + return parent.distinct().order_by('-data', 'tipo') + + class Meta: + model = AudienciaPublica + fields = ['tipo', 'data', + 'nome'] + + def __init__(self, *args, **kwargs): + super(RelatorioAudienciaFilterSet, self).__init__( + *args, **kwargs) + + row1 = to_row([('data', 12)]) + row2 = to_row( + [('tipo', 4), + ('nome', 4)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Audiência Pública'), + row1, row2, + buttons, ) + ) + + +class RelatorioMateriasTramitacaoFilterSet(django_filters.FilterSet): + materia__ano = django_filters.ChoiceFilter(required=True, + label='Ano da Matéria', + choices=choice_anos_com_materias) + + tramitacao__unidade_tramitacao_destino = django_filters.ModelChoiceFilter( + queryset=UnidadeTramitacao.objects.all(), + label=_('Unidade Atual')) + + tramitacao__status = django_filters.ModelChoiceFilter( + queryset=StatusTramitacao.objects.all(), + label=_('Status Atual')) + + materia__autores = django_filters.ModelChoiceFilter( + label='Autor da Matéria', + queryset=Autor.objects.all()) + + @property + def qs(self): + parent = super(RelatorioMateriasTramitacaoFilterSet, self).qs + return parent.distinct().order_by( + '-materia__ano', 'materia__tipo', '-materia__numero' + ) + + class Meta: + model = MateriaEmTramitacao + fields = ['materia__ano', 'materia__tipo', + 'tramitacao__unidade_tramitacao_destino', + 'tramitacao__status', 'materia__autores'] + + def __init__(self, *args, **kwargs): + super(RelatorioMateriasTramitacaoFilterSet, self).__init__( + *args, **kwargs) + + self.filters['materia__tipo'].label = 'Tipo de Matéria' + + row1 = to_row([('materia__ano', 12)]) + row2 = to_row([('materia__tipo', 12)]) + row3 = to_row([('tramitacao__unidade_tramitacao_destino', 12)]) + row4 = to_row([('tramitacao__status', 12)]) + row5 = to_row([('materia__autores', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisa de Matéria em Tramitação'), + row1, row2, row3, row4, row5, + buttons, ) + ) + + +class RelatorioMateriasPorAnoAutorTipoFilterSet(django_filters.FilterSet): + ano = django_filters.ChoiceFilter(required=True, + label='Ano da Matéria', + choices=choice_anos_com_materias) + + class Meta: + model = MateriaLegislativa + fields = ['ano'] + + def __init__(self, *args, **kwargs): + super(RelatorioMateriasPorAnoAutorTipoFilterSet, self).__init__( + *args, **kwargs) + + row1 = to_row( + [('ano', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisa de Matéria por Ano Autor Tipo'), + row1, + buttons, ) + ) + + +class RelatorioMateriasPorAutorFilterSet(django_filters.FilterSet): + autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput()) + + @property + def qs(self): + parent = super().qs + return parent.distinct().order_by('-ano', '-numero', 'tipo', 'autoria__autor', '-autoria__primeiro_autor') + + class Meta(FilterOverridesMetaMixin): + model = MateriaLegislativa + fields = ['tipo', 'data_apresentacao'] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.filters['tipo'].label = 'Tipo de Matéria' + + row1 = to_row( + [('tipo', 12)]) + row2 = to_row( + [('data_apresentacao', 12)]) + row3 = to_row( + [('autoria__autor', 0), + (Button('pesquisar', + 'Pesquisar Autor', + css_class='btn btn-primary btn-sm'), 2), + (Button('limpar', + 'Limpar Autor', + css_class='btn btn-primary btn-sm'), 10)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisa de Matéria por Autor'), + row1, row2, + HTML(autor_label), + HTML(autor_modal), + row3, + buttons, ) + ) + + +class RelatorioHistoricoTramitacaoAdmFilterSet(django_filters.FilterSet): + + @property + def qs(self): + parent = super(RelatorioHistoricoTramitacaoAdmFilterSet, self).qs + return parent.distinct().prefetch_related('tipo').order_by('-ano', 'tipo', 'numero') + + class Meta(FilterOverridesMetaMixin): + model = DocumentoAdministrativo + fields = ['tipo', 'tramitacaoadministrativo__status', + 'tramitacaoadministrativo__data_tramitacao', + 'tramitacaoadministrativo__unidade_tramitacao_local', + 'tramitacaoadministrativo__unidade_tramitacao_destino'] + + def __init__(self, *args, **kwargs): + super(RelatorioHistoricoTramitacaoAdmFilterSet, self).__init__( + *args, **kwargs) + + self.filters['tipo'].label = 'Tipo de Documento' + self.filters['tramitacaoadministrativo__status'].label = _('Status') + self.filters['tramitacaoadministrativo__unidade_tramitacao_local'].label = _( + 'Unidade Local (Origem)') + self.filters['tramitacaoadministrativo__unidade_tramitacao_destino'].label = _( + 'Unidade Destino') + + row1 = to_row([('tramitacaoadministrativo__data_tramitacao', 12)]) + row2 = to_row([('tramitacaoadministrativo__unidade_tramitacao_local', 6), + ('tramitacaoadministrativo__unidade_tramitacao_destino', 6)]) + row3 = to_row( + [('tipo', 6), + ('tramitacaoadministrativo__status', 6)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_(''), + row1, row2, row3, + buttons, ) + ) + + +class RelatorioNormasPorAutorFilterSet(django_filters.FilterSet): + autorianorma__autor = django_filters.CharFilter(widget=forms.HiddenInput()) + + @property + def qs(self): + parent = super().qs + return parent.distinct().filter(autorianorma__primeiro_autor=True) \ + .order_by('autorianorma__autor', '-autorianorma__primeiro_autor', 'tipo', '-ano', '-numero') + + class Meta(FilterOverridesMetaMixin): + model = NormaJuridica + fields = ['tipo', 'data'] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.filters['tipo'].label = 'Tipo de Norma' + + row1 = to_row( + [('tipo', 12)]) + row2 = to_row( + [('data', 12)]) + row3 = to_row( + [('autorianorma__autor', 0), + (Button('pesquisar', + 'Pesquisar Autor', + css_class='btn btn-primary btn-sm'), 2), + (Button('limpar', + 'Limpar Autor', + css_class='btn btn-primary btn-sm'), 10)]) + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Pesquisar'), + row1, row2, + HTML(autor_label), + HTML(autor_modal), + row3, + form_actions(label='Pesquisar')) + ) + + +class RelatorioNormasVigenciaFilterSet(django_filters.FilterSet): + ano = django_filters.ChoiceFilter(required=True, + label='Ano da Norma', + choices=choice_anos_com_normas, + initial=ultimo_ano_com_norma) + + tipo = django_filters.ChoiceFilter(required=False, + label='Tipo Norma', + choices=choice_tipos_normas, + initial=0) + + vigencia = forms.ChoiceField( + label=_('Vigência'), + choices=[(True, "Vigente"), (False, "Não vigente")], + widget=forms.RadioSelect(), + required=True, + initial=True) + + def __init__(self, *args, **kwargs): + super(RelatorioNormasVigenciaFilterSet, self).__init__( + *args, **kwargs) + + self.filters['ano'].label = 'Ano' + self.form.fields['ano'].required = True + self.form.fields['vigencia'] = self.vigencia + + row1 = to_row([('ano', 6), ('tipo', 6)]) + row2 = to_row([('vigencia', 12)]) + + buttons = FormActions( + *[ + HTML(''' +
+ + +
+ ''') + ], + Submit('pesquisar', _('Pesquisar'), css_class='float-right', + onclick='return true;'), + css_class='form-group row justify-content-between', + ) + + self.form.helper = SaplFormHelper() + self.form.helper.form_method = 'GET' + self.form.helper.layout = Layout( + Fieldset(_('Normas por vigência.'), + row1, row2, + buttons, ) + ) + + @property + def qs(self): + return qs_override_django_filter(self) diff --git a/sapl/relatorios/urls.py b/sapl/relatorios/urls.py index 03db4c6e0..e16e44162 100644 --- a/sapl/relatorios/urls.py +++ b/sapl/relatorios/urls.py @@ -4,10 +4,15 @@ from .apps import AppConfig from .views import (relatorio_capa_processo, relatorio_documento_administrativo, relatorio_espelho, relatorio_etiqueta_protocolo, relatorio_materia, - relatorio_ordem_dia, relatorio_pauta_sessao, - relatorio_protocolo, relatorio_sessao_plenaria, + relatorio_ordem_dia, relatorio_protocolo, relatorio_sessao_plenaria, resumo_ata_pdf, relatorio_sessao_plenaria_pdf, etiqueta_materia_legislativa, - relatorio_materia_tramitacao) + relatorio_materia_tramitacao, RelatoriosListView, RelatorioMateriasPorAutorView, + RelatorioNormasPublicadasMesView, RelatorioNormasVigenciaView, RelatorioMateriasPorAnoAutorTipoView, + RelatorioMateriasTramitacaoView, RelatorioMateriaAnoAssuntoView, RelatorioHistoricoTramitacaoView, + RelatorioDataFimPrazoTramitacaoView, RelatorioPresencaSessaoView, RelatorioAtasView, + RelatorioReuniaoView, RelatorioAudienciaView, RelatorioHistoricoTramitacaoAdmView, + RelatorioDocumentosAcessoriosView, RelatorioNormasPorAutorView) +from ..base.views import EstatisticasAcessoNormas app_name = AppConfig.name @@ -45,4 +50,51 @@ urlpatterns = [ url(r'^relatorios/(?P\d+)/materia-tramitacao$', relatorio_materia_tramitacao, name='relatorio_materia_tramitacao'), + + # TODO mover estas telas para a app 'relatorios' + url(r'^sistema/relatorios/$', + RelatoriosListView.as_view(), name='relatorios_list'), + url(r'^sistema/relatorios/materia-por-autor$', + RelatorioMateriasPorAutorView.as_view(), name='materia_por_autor'), + url(r'^sistema/relatorios/relatorio-por-mes$', + RelatorioNormasPublicadasMesView.as_view(), name='normas_por_mes'), + url(r'^sistema/relatorios/relatorio-por-vigencia$', + RelatorioNormasVigenciaView.as_view(), name='normas_por_vigencia'), + url(r'^sistema/relatorios/estatisticas-acesso$', + EstatisticasAcessoNormas.as_view(), name='estatisticas_acesso'), + url(r'^sistema/relatorios/materia-por-ano-autor-tipo$', + RelatorioMateriasPorAnoAutorTipoView.as_view(), + name='materia_por_ano_autor_tipo'), + url(r'^sistema/relatorios/materia-por-tramitacao$', + RelatorioMateriasTramitacaoView.as_view(), + name='materia_por_tramitacao'), + url(r'^sistema/relatorios/materia-por-assunto$', + RelatorioMateriaAnoAssuntoView.as_view(), + name='materia_por_ano_assunto'), + url(r'^sistema/relatorios/historico-tramitacoes$', + RelatorioHistoricoTramitacaoView.as_view(), + name='historico_tramitacoes'), + url(r'^sistema/relatorios/data-fim-prazo-tramitacoes$', + RelatorioDataFimPrazoTramitacaoView.as_view(), + name='data_fim_prazo_tramitacoes'), + url(r'^sistema/relatorios/presenca$', + RelatorioPresencaSessaoView.as_view(), + name='presenca_sessao'), + url(r'^sistema/relatorios/atas$', + RelatorioAtasView.as_view(), + name='atas'), + url(r'^sistema/relatorios/reuniao$', + RelatorioReuniaoView.as_view(), + name='reuniao'), + url(r'^sistema/relatorios/audiencia$', + RelatorioAudienciaView.as_view(), + name='audiencia'), + url(r'^sistema/relatorios/historico-tramitacoesadm$', + RelatorioHistoricoTramitacaoAdmView.as_view(), + name='historico_tramitacoes_adm'), + url(r'^sistema/relatorios/documentos_acessorios$', + RelatorioDocumentosAcessoriosView.as_view(), + name='relatorio_documentos_acessorios'), + url(r'^sistema/relatorios/normas-por-autor$', + RelatorioNormasPorAutorView.as_view(), name='normas_por_autor'), ] diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index 5a2ce0e3d..436bc40b1 100755 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -1,32 +1,44 @@ -from datetime import datetime as dt +import collections import html import logging import re -import tempfile +from datetime import datetime as dt, datetime +import unidecode from django.core.exceptions import ObjectDoesNotExist +from django.db.models import Count, Q, F from django.http import Http404, HttpResponse from django.template.loader import render_to_string from django.utils import timezone -from django.utils.html import strip_tags from django.utils.translation import ugettext_lazy as _ -import unidecode +from django.views.generic import TemplateView, ListView +from django_filters.views import FilterView from weasyprint import HTML, CSS -from sapl.base.models import Autor, CasaLegislativa, AppConfig as SaplAppConfig -from sapl.comissoes.models import Comissao +from sapl.audiencia.models import TipoAudienciaPublica, AudienciaPublica +from sapl.base.models import Autor, CasaLegislativa, AppConfig as SaplAppConfig, AppConfig +from sapl.comissoes.models import Comissao, Reuniao from sapl.materia.models import (Autoria, MateriaLegislativa, Numeracao, - Tramitacao, UnidadeTramitacao, ConfigEtiquetaMateriaLegislativa) -from sapl.parlamentares.models import CargoMesa, Filiacao, Parlamentar + Tramitacao, UnidadeTramitacao, ConfigEtiquetaMateriaLegislativa, MateriaAssunto, + TipoMateriaLegislativa, MateriaEmTramitacao, DocumentoAcessorio, TipoDocumento, + StatusTramitacao) +from sapl.norma.models import TipoNormaJuridica, NormaJuridica +from sapl.parlamentares.models import Filiacao, Parlamentar, SessaoLegislativa, Legislatura from sapl.protocoloadm.models import (DocumentoAdministrativo, Protocolo, - TramitacaoAdministrativo) + TramitacaoAdministrativo, StatusTramitacaoAdministrativo, + TipoDocumentoAdministrativo) +from sapl.relatorios.forms import RelatorioNormasPorAutorFilterSet, RelatorioHistoricoTramitacaoAdmFilterSet, \ + RelatorioNormasVigenciaFilterSet, RelatorioNormasMesFilterSet, RelatorioMateriasPorAutorFilterSet, \ + RelatorioMateriasPorAnoAutorTipoFilterSet, RelatorioMateriasTramitacaoFilterSet, RelatorioAudienciaFilterSet, \ + RelatorioReuniaoFilterSet, RelatorioDataFimPrazoTramitacaoFilterSet, RelatorioHistoricoTramitacaoFilterSet, \ + RelatorioPresencaSessaoFilterSet, RelatorioAtasFilterSet, RelatorioDocumentosAcessoriosFilterSet from sapl.sessao.models import (ExpedienteMateria, ExpedienteSessao, IntegranteMesa, JustificativaAusencia, Orador, OradorExpediente, OrdemDia, PresencaOrdemDia, SessaoPlenaria, SessaoPlenariaPresenca, OcorrenciaSessao, RegistroVotacao, VotoParlamentar, OradorOrdemDia, - ConsideracoesFinais, TipoExpediente, ResumoOrdenacao) + ConsideracoesFinais, ResumoOrdenacao, TipoSessaoPlenaria) from sapl.sessao.views import (get_identificacao_basica, get_mesa_diretora, get_presenca_sessao, get_expedientes, get_materias_expediente, get_oradores_expediente, @@ -37,13 +49,14 @@ from sapl.sessao.views import (get_identificacao_basica, get_mesa_diretora, get_correspondencias) from sapl.settings import MEDIA_URL from sapl.settings import STATIC_ROOT -from sapl.utils import LISTA_DE_UFS, TrocaTag, filiacao_data, create_barcode - +from sapl.utils import LISTA_DE_UFS, TrocaTag, filiacao_data, create_barcode, show_results_filter_set, \ + num_materias_por_tipo, parlamentares_ativos from .templates import (pdf_capa_processo_gerar, pdf_documento_administrativo_gerar, pdf_espelho_gerar, pdf_etiqueta_protocolo_gerar, pdf_materia_gerar, pdf_ordem_dia_gerar, pdf_pauta_sessao_gerar, pdf_protocolo_gerar, pdf_sessao_plenaria_gerar) +from sapl.crud.base import make_pagination def get_kwargs_params(request, fields): @@ -1733,3 +1746,951 @@ def relatorio_materia_tramitacao(request, pk): response.write(pdf_file) return response + + +class RelatoriosListView(TemplateView): + template_name = 'relatorios/relatorios_list.html' + + def get_context_data(self, **kwargs): + context = super(TemplateView, self).get_context_data(**kwargs) + estatisticas_acesso_normas = AppConfig.objects.first().estatisticas_acesso_normas + context['estatisticas_acesso_normas'] = True if estatisticas_acesso_normas == 'S' else False + + return context + + +class RelatorioMixin: + def get(self, request, *args, **kwargs): + super(RelatorioMixin, self).get(request) + + is_relatorio = request.GET.get('relatorio') + context = self.get_context_data(filter=self.filterset) + + if is_relatorio: + return self.relatorio(request, context) + else: + return self.render_to_response(context) + + +class RelatorioDocumentosAcessoriosView(RelatorioMixin, FilterView): + model = DocumentoAcessorio + filterset_class = RelatorioDocumentosAcessoriosFilterSet + template_name = 'relatorios/RelatorioDocumentosAcessorios_filter.html' + relatorio = relatorio_documento_acessorio + + def get_context_data(self, **kwargs): + context = super( + RelatorioDocumentosAcessoriosView, self + ).get_context_data(**kwargs) + + context['title'] = _('Documentos Acessórios das Matérias Legislativas') + + if not self.filterset.form.is_valid(): + return context + + query_dict = self.request.GET.copy() + context['show_results'] = show_results_filter_set(query_dict) + + context['tipo_documento'] = str( + TipoDocumento.objects.get(pk=self.request.GET['tipo']) + ) + + tipo_materia = self.request.GET['materia__tipo'] + if tipo_materia: + context['tipo_materia'] = str( + TipoMateriaLegislativa.objects.get(pk=tipo_materia) + ) + else: + context['tipo_materia'] = "Não selecionado" + + data_inicial = self.request.GET['data_0'] + data_final = self.request.GET['data_1'] + if not data_inicial: + data_inicial = "Data Inicial não definida" + if not data_final: + data_final = "Data Final não definida" + context['periodo'] = ( + data_inicial + ' - ' + data_final + ) + + return context + + +class RelatorioAtasView(RelatorioMixin, FilterView): + model = SessaoPlenaria + filterset_class = RelatorioAtasFilterSet + template_name = 'relatorios/RelatorioAtas_filter.html' + relatorio = relatorio_atas + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['title'] = _('Atas das Sessões Plenárias') + + # Verifica se os campos foram preenchidos + if not self.filterset.form.is_valid(): + return context + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['periodo'] = ( + self.request.GET['data_inicio_0'] + + ' - ' + self.request.GET['data_inicio_1']) + + return context + + +class RelatorioPresencaSessaoView(RelatorioMixin, FilterView): + logger = logging.getLogger(__name__) + model = SessaoPlenaria + filterset_class = RelatorioPresencaSessaoFilterSet + template_name = 'relatorios/RelatorioPresencaSessao_filter.html' + relatorio = relatorio_presenca_sessao + + def get_context_data(self, **kwargs): + + context = super().get_context_data(**kwargs) + context['title'] = _('Presença dos parlamentares nas sessões') + + # Verifica se os campos foram preenchidos + if not self.filterset.form.is_valid(): + return context + + cd = self.filterset.form.cleaned_data + if not cd['data_inicio'] and not cd['sessao_legislativa'] \ + and not cd['legislatura']: + msg = _( + "Formulário inválido! Preencha pelo menos algum dos campos Período, Legislatura ou Sessão Legislativa.") + messages.error(self.request, msg) + return context + + # Caso a data tenha sido preenchida, verifica se foi preenchida + # corretamente + if self.request.GET.get('data_inicio_0') and not self.request.GET.get('data_inicio_1'): + msg = _("Formulário inválido! Preencha a data do Período Final.") + messages.error(self.request, msg) + return context + + if not self.request.GET.get('data_inicio_0') and self.request.GET.get('data_inicio_1'): + msg = _("Formulário inválido! Preencha a data do Período Inicial.") + messages.error(self.request, msg) + return context + + param0 = {} + + legislatura_pk = self.request.GET.get('legislatura') + if legislatura_pk: + param0['sessao_plenaria__legislatura_id'] = legislatura_pk + legislatura = Legislatura.objects.get(id=legislatura_pk) + context['legislatura'] = legislatura + + sessao_legislativa_pk = self.request.GET.get('sessao_legislativa') + if sessao_legislativa_pk: + param0['sessao_plenaria__sessao_legislativa_id'] = sessao_legislativa_pk + sessao_legislativa = SessaoLegislativa.objects.get( + id=sessao_legislativa_pk) + context['sessao_legislativa'] = sessao_legislativa + + tipo_sessao_plenaria_pk = self.request.GET.get('tipo') + context['tipo'] = '' + if tipo_sessao_plenaria_pk: + param0['sessao_plenaria__tipo_id'] = tipo_sessao_plenaria_pk + context['tipo'] = TipoSessaoPlenaria.objects.get( + id=tipo_sessao_plenaria_pk) + + _range = [] + + if ('data_inicio_0' in self.request.GET) and self.request.GET['data_inicio_0'] and \ + ('data_inicio_1' in self.request.GET) and self.request.GET['data_inicio_1']: + where = context['object_list'].query.where + _range = where.children[0].rhs + + elif legislatura_pk and not sessao_legislativa_pk: + _range = [legislatura.data_inicio, legislatura.data_fim] + + elif sessao_legislativa_pk: + _range = [sessao_legislativa.data_inicio, + sessao_legislativa.data_fim] + + param0.update({'sessao_plenaria__data_inicio__range': _range}) + + # Parlamentares com Mandato no intervalo de tempo (Ativos) + parlamentares_qs = parlamentares_ativos( + _range[0], _range[1]).order_by('nome_parlamentar') + parlamentares_id = parlamentares_qs.values_list('id', flat=True) + + # Presenças de cada Parlamentar em Sessões + presenca_sessao = SessaoPlenariaPresenca.objects.filter( + **param0).values_list('parlamentar_id').annotate(sessao_count=Count('id')) + + # Presenças de cada Ordem do Dia + presenca_ordem = PresencaOrdemDia.objects.filter( + **param0).values_list('parlamentar_id').annotate(sessao_count=Count('id')) + + total_ordemdia = PresencaOrdemDia.objects.filter( + **param0).distinct('sessao_plenaria__id').order_by('sessao_plenaria__id').count() + + total_sessao = context['object_list'].count() + + username = self.request.user.username + + context['exibir_somente_titular'] = self.request.GET.get( + 'exibir_somente_titular') == 'on' + context['exibir_somente_ativo'] = self.request.GET.get( + 'exibir_somente_ativo') == 'on' + + # Completa o dicionario as informacoes parlamentar/sessao/ordem + parlamentares_presencas = [] + for p in parlamentares_qs: + parlamentar = {} + m = p.mandato_set.filter(Q(data_inicio_mandato__lte=_range[0], data_fim_mandato__gte=_range[1]) | + Q(data_inicio_mandato__lte=_range[0], data_fim_mandato__isnull=True) | + Q(data_inicio_mandato__gte=_range[0], data_fim_mandato__lte=_range[1]) | + # mandato suplente + Q(data_inicio_mandato__gte=_range[0], data_fim_mandato__lte=_range[1])) + + m = m.last() + + if not context['exibir_somente_titular'] and not context['exibir_somente_ativo']: + parlamentar = { + 'parlamentar': p, + 'titular': m.titular if m else False, + 'sessao_porc': 0, + 'ordemdia_porc': 0 + } + elif context['exibir_somente_titular'] and not context['exibir_somente_ativo']: + if m and m.titular: + parlamentar = { + 'parlamentar': p, + 'titular': m.titular if m else False, + 'sessao_porc': 0, + 'ordemdia_porc': 0 + } + else: + continue + elif not context['exibir_somente_titular'] and context['exibir_somente_ativo']: + if p.ativo: + parlamentar = { + 'parlamentar': p, + 'titular': m.titular if m else False, + 'sessao_porc': 0, + 'ordemdia_porc': 0 + } + else: + continue + elif context['exibir_somente_titular'] and context['exibir_somente_ativo']: + if m and m.titular and p.ativo: + parlamentar = { + 'parlamentar': p, + 'titular': m.titular if m else False, + 'sessao_porc': 0, + 'ordemdia_porc': 0 + } + else: + continue + else: + continue + + try: + self.logger.debug( + F'user={username}. Tentando obter presença do parlamentar (pk={p.id}).') + sessao_count = presenca_sessao.get(parlamentar_id=p.id)[1] + except ObjectDoesNotExist as e: + self.logger.error( + F'user={username}. Erro ao obter presença do parlamentar (pk={p.id}). Definido como 0. {str(e)}') + sessao_count = 0 + try: + # Presenças de cada Ordem do Dia + self.logger.info( + F'user={username}. Tentando obter PresencaOrdemDia para o parlamentar pk={p.id}.') + ordemdia_count = presenca_ordem.get(parlamentar_id=p.id)[1] + except ObjectDoesNotExist: + self.logger.error( + F'user={username}. Erro ao obter PresencaOrdemDia para o parlamentar pk={p.id}. Definido como 0.') + ordemdia_count = 0 + + parlamentar.update({ + 'sessao_count': sessao_count, + 'ordemdia_count': ordemdia_count + }) + + if total_sessao != 0: + parlamentar.update({'sessao_porc': round( + sessao_count * 100 / total_sessao, 2)}) + if total_ordemdia != 0: + parlamentar.update({'ordemdia_porc': round( + ordemdia_count * 100 / total_ordemdia, 2)}) + + parlamentares_presencas.append(parlamentar) + + context['date_range'] = _range + context['total_ordemdia'] = total_ordemdia + context['total_sessao'] = context['object_list'].count() + context['parlamentares'] = parlamentares_presencas + context['periodo'] = f"{self.request.GET['data_inicio_0']} - {self.request.GET['data_inicio_1']}" + context['sessao_legislativa'] = '' + context['legislatura'] = '' + context['exibir_ordem'] = self.request.GET.get( + 'exibir_ordem_dia') == 'on' + + if sessao_legislativa_pk: + context['sessao_legislativa'] = SessaoLegislativa.objects.get( + id=sessao_legislativa_pk) + if legislatura_pk: + context['legislatura'] = Legislatura.objects.get(id=legislatura_pk) + # ===================================================================== + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + + return context + + +class RelatorioHistoricoTramitacaoView(RelatorioMixin, FilterView): + model = MateriaLegislativa + filterset_class = RelatorioHistoricoTramitacaoFilterSet + template_name = 'relatorios/RelatorioHistoricoTramitacao_filter.html' + relatorio = relatorio_historico_tramitacao + + def get_context_data(self, **kwargs): + context = super(RelatorioHistoricoTramitacaoView, + self).get_context_data(**kwargs) + context['title'] = _( + 'Histórico de Tramitações de Matérias Legislativas') + if not self.filterset.form.is_valid(): + return context + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['data_tramitacao'] = (self.request.GET['tramitacao__data_tramitacao_0'] + ' - ' + + self.request.GET['tramitacao__data_tramitacao_1']) + if self.request.GET['tipo']: + tipo = self.request.GET['tipo'] + context['tipo'] = ( + str(TipoMateriaLegislativa.objects.get(id=tipo))) + else: + context['tipo'] = '' + + if self.request.GET['tramitacao__status']: + tramitacao_status = self.request.GET['tramitacao__status'] + context['tramitacao__status'] = ( + str(StatusTramitacao.objects.get(id=tramitacao_status))) + else: + context['tramitacao__status'] = '' + + if self.request.GET['tramitacao__unidade_tramitacao_local']: + context['tramitacao__unidade_tramitacao_local'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacao__unidade_tramitacao_local']))) + else: + context['tramitacao__unidade_tramitacao_local'] = '' + + if self.request.GET['tramitacao__unidade_tramitacao_destino']: + context['tramitacao__unidade_tramitacao_destino'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacao__unidade_tramitacao_destino']))) + else: + context['tramitacao__unidade_tramitacao_destino'] = '' + + if self.request.GET['autoria__autor']: + context['autoria__autor'] = \ + (str(Autor.objects.get( + id=self.request.GET['autoria__autor']))) + else: + context['autoria__autor'] = '' + + return context + + +class RelatorioDataFimPrazoTramitacaoView(RelatorioMixin, FilterView): + model = MateriaEmTramitacao + filterset_class = RelatorioDataFimPrazoTramitacaoFilterSet + template_name = 'relatorios/RelatorioDataFimPrazoTramitacao_filter.html' + relatorio = relatorio_fim_prazo_tramitacao + + def get_context_data(self, **kwargs): + context = super(RelatorioDataFimPrazoTramitacaoView, + self).get_context_data(**kwargs) + context['title'] = _( + 'Relatório de tramitações em intervalo de data de fim de prazo.') + if not self.filterset.form.is_valid(): + return context + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + + context['data_fim_prazo'] = (self.request.GET['tramitacao__data_fim_prazo_0'] + ' - ' + + self.request.GET['tramitacao__data_fim_prazo_1']) + + if self.request.GET['materia__ano']: + context['ano'] = self.request.GET['materia__ano'] + else: + context['ano'] = '' + + if self.request.GET['materia__tipo']: + tipo = self.request.GET['materia__tipo'] + context['tipo'] = ( + str(TipoMateriaLegislativa.objects.get(id=tipo))) + else: + context['tipo'] = '' + + if self.request.GET['tramitacao__status']: + tramitacao_status = self.request.GET['tramitacao__status'] + context['tramitacao__status'] = ( + str(StatusTramitacao.objects.get(id=tramitacao_status))) + else: + context['tramitacao__status'] = '' + + if self.request.GET['tramitacao__unidade_tramitacao_local']: + context['tramitacao__unidade_tramitacao_local'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacao__unidade_tramitacao_local']))) + else: + context['tramitacao__unidade_tramitacao_local'] = '' + + if self.request.GET['tramitacao__unidade_tramitacao_destino']: + context['tramitacao__unidade_tramitacao_destino'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacao__unidade_tramitacao_destino']))) + else: + context['tramitacao__unidade_tramitacao_destino'] = '' + + return context + + +class RelatorioReuniaoView(RelatorioMixin, FilterView): + model = Reuniao + filterset_class = RelatorioReuniaoFilterSet + template_name = 'relatorios/RelatorioReuniao_filter.html' + relatorio = relatorio_reuniao + + def get_filterset_kwargs(self, filterset_class): + super(RelatorioReuniaoView, + self).get_filterset_kwargs(filterset_class) + + kwargs = {'data': self.request.GET or None} + return kwargs + + def get_context_data(self, **kwargs): + context = super(RelatorioReuniaoView, + self).get_context_data(**kwargs) + context['title'] = _('Reunião de Comissão') + if not self.filterset.form.is_valid(): + return context + qr = self.request.GET.copy() + + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + + if self.request.GET['comissao']: + comissao = self.request.GET['comissao'] + context['comissao'] = (str(Comissao.objects.get(id=comissao))) + else: + context['comissao'] = '' + + return context + + +class RelatorioAudienciaView(RelatorioMixin, FilterView): + model = AudienciaPublica + filterset_class = RelatorioAudienciaFilterSet + template_name = 'relatorios/RelatorioAudiencia_filter.html' + relatorio = relatorio_audiencia + + def get_filterset_kwargs(self, filterset_class): + super(RelatorioAudienciaView, + self).get_filterset_kwargs(filterset_class) + + kwargs = {'data': self.request.GET or None} + return kwargs + + def get_context_data(self, **kwargs): + context = super(RelatorioAudienciaView, + self).get_context_data(**kwargs) + context['title'] = _('Audiência Pública') + if not self.filterset.form.is_valid(): + return context + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + + if self.request.GET['tipo']: + tipo = self.request.GET['tipo'] + context['tipo'] = (str(TipoAudienciaPublica.objects.get(id=tipo))) + else: + context['tipo'] = '' + + return context + + +class RelatorioMateriasTramitacaoView(RelatorioMixin, FilterView): + model = MateriaEmTramitacao + filterset_class = RelatorioMateriasTramitacaoFilterSet + template_name = 'relatorios/RelatorioMateriasPorTramitacao_filter.html' + relatorio = relatorio_materia_em_tramitacao + + paginate_by = 100 + + total_resultados_tipos = {} + + def get_filterset_kwargs(self, filterset_class): + data = super().get_filterset_kwargs(filterset_class) + + if data['data']: + qs = data['queryset'] + + ano_materia = data['data']['materia__ano'] + tipo_materia = data['data']['materia__tipo'] + unidade_tramitacao_destino = data['data']['tramitacao__unidade_tramitacao_destino'] + status_tramitacao = data['data']['tramitacao__status'] + autor = data['data']['materia__autores'] + + kwargs = {} + if ano_materia: + kwargs['materia__ano'] = ano_materia + if tipo_materia: + kwargs['materia__tipo'] = tipo_materia + if unidade_tramitacao_destino: + kwargs['tramitacao__unidade_tramitacao_destino'] = unidade_tramitacao_destino + if status_tramitacao: + kwargs['tramitacao__status'] = status_tramitacao + if autor: + kwargs['materia__autores'] = autor + + qs = qs.filter(**kwargs) + data['queryset'] = qs + + self.total_resultados_tipos = num_materias_por_tipo( + qs, "materia__tipo") + + return data + + def get_queryset(self): + qs = super().get_queryset() + qs = qs.select_related('materia__tipo').filter( + materia__em_tramitacao=True + ).exclude( + tramitacao__status__indicador='F' + ).order_by('-materia__ano', '-materia__numero') + return qs + + def get_context_data(self, **kwargs): + context = super( + RelatorioMateriasTramitacaoView, self + ).get_context_data(**kwargs) + + context['title'] = _('Matérias em Tramitação') + + if not self.filterset.form.is_valid(): + return context + + qr = self.request.GET.copy() + + context['qtdes'] = self.total_resultados_tipos + context['ano'] = (self.request.GET['materia__ano']) + + if self.request.GET['materia__tipo']: + tipo = self.request.GET['materia__tipo'] + context['tipo'] = ( + str(TipoMateriaLegislativa.objects.get(id=tipo)) + ) + else: + context['tipo'] = '' + + if self.request.GET['tramitacao__status']: + tramitacao_status = self.request.GET['tramitacao__status'] + context['tramitacao__status'] = ( + str(StatusTramitacao.objects.get(id=tramitacao_status)) + ) + else: + context['tramitacao__status'] = '' + + if self.request.GET['tramitacao__unidade_tramitacao_destino']: + context['tramitacao__unidade_tramitacao_destino'] = ( + str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacao__unidade_tramitacao_destino'] + )) + ) + else: + context['tramitacao__unidade_tramitacao_destino'] = '' + + if self.request.GET['materia__autores']: + autor = self.request.GET['materia__autores'] + context['materia__autor'] = ( + str(Autor.objects.get(id=autor)) + ) + else: + context['materia__autor'] = '' + if 'page' in qr: + del qr['page'] + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + context['show_results'] = show_results_filter_set(qr) + + paginator = context['paginator'] + page_obj = context['page_obj'] + + context['page_range'] = make_pagination( + page_obj.number, paginator.num_pages + ) + context['NO_ENTRIES_MSG'] = 'Nenhum encontrado.' + + return context + + +class RelatorioMateriasPorAnoAutorTipoView(RelatorioMixin, FilterView): + model = MateriaLegislativa + filterset_class = RelatorioMateriasPorAnoAutorTipoFilterSet + template_name = 'relatorios/RelatorioMateriasPorAnoAutorTipo_filter.html' + relatorio = relatorio_materia_por_ano_autor + + def get_materias_autor_ano(self, ano, primeiro_autor): + + autorias = Autoria.objects.filter(materia__ano=ano, primeiro_autor=primeiro_autor).values( + 'autor', + 'materia__tipo__sigla', + 'materia__tipo__descricao').annotate( + total=Count('materia__tipo')).order_by( + 'autor', + 'materia__tipo') + + autores_ids = set([i['autor'] for i in autorias]) + + autores = dict((a.id, a) for a in Autor.objects.filter( + id__in=autores_ids)) + + relatorio = [] + visitados = set() + curr = None + + for a in autorias: + # se mudou autor, salva atual, caso existente, e reinicia `curr` + if a['autor'] not in visitados: + if curr: + relatorio.append(curr) + + curr = {} + curr['autor'] = autores[a['autor']] + curr['materia'] = [] + curr['total'] = 0 + + visitados.add(a['autor']) + + # atualiza valores + curr['materia'].append((a['materia__tipo__descricao'], a['total'])) + curr['total'] += a['total'] + # adiciona o ultimo + relatorio.append(curr) + + return relatorio + + def get_filterset_kwargs(self, filterset_class): + super(RelatorioMateriasPorAnoAutorTipoView, + self).get_filterset_kwargs(filterset_class) + + kwargs = {'data': self.request.GET or None} + return kwargs + + def get_context_data(self, **kwargs): + context = super(RelatorioMateriasPorAnoAutorTipoView, + self).get_context_data(**kwargs) + + context['title'] = _('Matérias por Ano, Autor e Tipo') + if not self.filterset.form.is_valid(): + return context + qs = context['object_list'] + context['qtdes'] = num_materias_por_tipo(qs) + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['ano'] = self.request.GET['ano'] + + if 'ano' in self.request.GET and self.request.GET['ano']: + ano = int(self.request.GET['ano']) + context['relatorio'] = self.get_materias_autor_ano(ano, True) + context['corelatorio'] = self.get_materias_autor_ano(ano, False) + else: + context['relatorio'] = [] + + return context + + +class RelatorioMateriasPorAutorView(RelatorioMixin, FilterView): + model = MateriaLegislativa + filterset_class = RelatorioMateriasPorAutorFilterSet + template_name = 'relatorios/RelatorioMateriasPorAutor_filter.html' + relatorio = relatorio_materia_por_autor + + def get_filterset_kwargs(self, filterset_class): + super().get_filterset_kwargs(filterset_class) + kwargs = {'data': self.request.GET or None} + return kwargs + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + context['title'] = _('Matérias por Autor') + if not self.filterset.form.is_valid(): + return context + + qs = context['object_list'] + context['materias_resultado'] = list(collections.OrderedDict.fromkeys(qs)) + context['qtdes'] = num_materias_por_tipo(qs) + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + if self.request.GET['tipo']: + tipo = int(self.request.GET['tipo']) + context['tipo'] = ( + str(TipoMateriaLegislativa.objects.get(id=tipo))) + else: + context['tipo'] = '' + if self.request.GET['autoria__autor']: + autor = int(self.request.GET['autoria__autor']) + context['autor'] = (str(Autor.objects.get(id=autor))) + else: + context['autor'] = '' + context['periodo'] = ( + self.request.GET['data_apresentacao_0'] + + ' - ' + self.request.GET['data_apresentacao_1']) + + return context + + +class RelatorioMateriaAnoAssuntoView(ListView): + template_name = 'relatorios/RelatorioMateriasAnoAssunto.html' + + def get_queryset(self): + return MateriaAssunto.objects.all().values( + 'assunto_id', + assunto_materia=F('assunto__assunto'), + ano=F('materia__ano')).annotate( + total=Count('assunto_id')).order_by('-materia__ano', 'assunto_id') + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['title'] = _('Matérias por Ano e Assunto') + + # In[10]: MateriaAssunto.objects.all().values( + # ...: 'materia__ano').annotate( + # ...: total = Count('materia__ano')).order_by('-materia__ano') + + mat = MateriaLegislativa.objects.filter( + materiaassunto__isnull=True).values( + 'ano').annotate( + total=Count('ano')).order_by('-ano') + + context.update({"materias_sem_assunto": mat}) + return context + + +class RelatorioNormasPublicadasMesView(RelatorioMixin, FilterView): + model = NormaJuridica + filterset_class = RelatorioNormasMesFilterSet + template_name = 'relatorios/RelatorioNormaMes_filter.html' + relatorio = relatorio_normas_mes + + def get_context_data(self, **kwargs): + context = super(RelatorioNormasPublicadasMesView, + self).get_context_data(**kwargs) + context['title'] = _('Normas') + + # Verifica se os campos foram preenchidos + if not self.filterset.form.is_valid(): + return context + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['ano'] = self.request.GET['ano'] + + normas_mes = collections.OrderedDict() + meses = {1: 'Janeiro', 2: 'Fevereiro', 3: 'Março', 4: 'Abril', 5: 'Maio', 6: 'Junho', + 7: 'Julho', 8: 'Agosto', 9: 'Setembro', 10: 'Outubro', 11: 'Novembro', 12: 'Dezembro'} + for norma in context['object_list']: + if not meses[norma.data.month] in normas_mes: + normas_mes[meses[norma.data.month]] = [] + normas_mes[meses[norma.data.month]].append(norma) + + context['normas_mes'] = normas_mes + + quant_normas_mes = {} + for key in normas_mes.keys(): + quant_normas_mes[key] = len(normas_mes[key]) + + context['quant_normas_mes'] = quant_normas_mes + + return context + + +class RelatorioNormasVigenciaView(RelatorioMixin, FilterView): + model = NormaJuridica + filterset_class = RelatorioNormasVigenciaFilterSet + template_name = 'relatorios/RelatorioNormasVigencia_filter.html' + relatorio = relatorio_normas_vigencia + + def get_filterset_kwargs(self, filterset_class): + super(RelatorioNormasVigenciaView, + self).get_filterset_kwargs(filterset_class) + + kwargs = {'data': self.request.GET or None} + qs = self.get_queryset().order_by('data').distinct() + if kwargs['data']: + ano = kwargs['data']['ano'] + vigencia = kwargs['data']['vigencia'] + if ano: + qs = qs.filter(ano=ano) + + if vigencia == 'True': + qs_dt_not_null = qs.filter(data_vigencia__isnull=True) + qs = (qs_dt_not_null | qs.filter( + data_vigencia__gte=datetime.now().date())).distinct() + else: + qs = qs.filter( + data_vigencia__lt=datetime.now().date()) + + kwargs.update({ + 'queryset': qs + }) + return kwargs + + def get_context_data(self, **kwargs): + context = super(RelatorioNormasVigenciaView, + self).get_context_data(**kwargs) + context['title'] = _('Normas por vigência') + + # Verifica se os campos foram preenchidos + if not self.filterset.form.is_valid(): + return context + + normas_totais = NormaJuridica.objects.filter( + ano=self.request.GET['ano']) + + context['quant_total'] = len(normas_totais) + if self.request.GET['vigencia'] == 'True': + context['vigencia'] = 'Vigente' + context['quant_vigente'] = len(context['object_list']) + context['quant_nao_vigente'] = context['quant_total'] - \ + context['quant_vigente'] + else: + context['vigencia'] = 'Não vigente' + context['quant_nao_vigente'] = len(context['object_list']) + context['quant_vigente'] = context['quant_total'] - \ + context['quant_nao_vigente'] + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['ano'] = self.request.GET['ano'] + + return context + +class RelatorioHistoricoTramitacaoAdmView(RelatorioMixin, FilterView): + model = DocumentoAdministrativo + filterset_class = RelatorioHistoricoTramitacaoAdmFilterSet + template_name = 'relatorios/RelatorioHistoricoTramitacaoAdm_filter.html' + relatorio = relatorio_historico_tramitacao_adm + + def get_context_data(self, **kwargs): + context = super(RelatorioHistoricoTramitacaoAdmView, + self).get_context_data(**kwargs) + context['title'] = _( + 'Histórico de Tramitações de Documento Administrativo') + if not self.filterset.form.is_valid(): + return context + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + context['data_tramitacao'] = (self.request.GET['tramitacaoadministrativo__data_tramitacao_0'] + ' - ' + + self.request.GET['tramitacaoadministrativo__data_tramitacao_1']) + if self.request.GET['tipo']: + tipo = self.request.GET['tipo'] + context['tipo'] = ( + str(TipoDocumentoAdministrativo.objects.get(id=tipo))) + else: + context['tipo'] = '' + + if self.request.GET['tramitacaoadministrativo__status']: + tramitacao_status = self.request.GET['tramitacaoadministrativo__status'] + context['tramitacaoadministrativo__status'] = ( + str(StatusTramitacaoAdministrativo.objects.get(id=tramitacao_status))) + else: + context['tramitacaoadministrativo__status'] = '' + + if self.request.GET['tramitacaoadministrativo__unidade_tramitacao_local']: + context['tramitacaoadministrativo__unidade_tramitacao_local'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacaoadministrativo__unidade_tramitacao_local']))) + else: + context['tramitacaoadministrativo__unidade_tramitacao_local'] = '' + + if self.request.GET['tramitacaoadministrativo__unidade_tramitacao_destino']: + context['tramitacaoadministrativo__unidade_tramitacao_destino'] = \ + (str(UnidadeTramitacao.objects.get( + id=self.request.GET['tramitacaoadministrativo__unidade_tramitacao_destino']))) + else: + context['tramitacaoadministrativo__unidade_tramitacao_destino'] = '' + + return context + + +class RelatorioNormasPorAutorView(RelatorioMixin, FilterView): + model = NormaJuridica + filterset_class = RelatorioNormasPorAutorFilterSet + template_name = 'relatorios/RelatorioNormasPorAutor_filter.html' + relatorio = relatorio_normas_por_autor + + def get_filterset_kwargs(self, filterset_class): + super().get_filterset_kwargs(filterset_class) + kwargs = {'data': self.request.GET or None} + return kwargs + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + context['title'] = _('Normas por Autor') + if not self.filterset.form.is_valid(): + return context + + qtdes = {} + for tipo in TipoNormaJuridica.objects.all(): + qs = context['object_list'] + qtde = len(qs.filter(tipo_id=tipo.id)) + if qtde > 0: + qtdes[tipo] = qtde + context['qtdes'] = qtdes + + qr = self.request.GET.copy() + context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else '' + + context['show_results'] = show_results_filter_set(qr) + if self.request.GET['tipo']: + tipo = int(self.request.GET['tipo']) + context['tipo'] = ( + str(TipoNormaJuridica.objects.get(id=tipo))) + else: + context['tipo'] = '' + + if self.request.GET['autorianorma__autor']: + autor = int(self.request.GET['autorianorma__autor']) + context['autor'] = (str(Autor.objects.get(id=autor))) + else: + context['autor'] = '' + context['periodo'] = ( + self.request.GET['data_0'] + + ' - ' + self.request.GET['data_1']) + + return context diff --git a/sapl/templates/navbar.yaml b/sapl/templates/navbar.yaml index bca7a7007..e4dc39c10 100644 --- a/sapl/templates/navbar.yaml +++ b/sapl/templates/navbar.yaml @@ -57,7 +57,7 @@ url: sapl.materia:proposicao_list check_permission: materia.add_proposicao - title: {% trans 'Relatórios' %} - url: sapl.base:relatorios_list + url: sapl.relatorios:relatorios_list - title: {% trans 'Sessões Plenárias' %} url: sapl.sessao:pesquisar_sessao - title: {% trans 'Tramitação em Lote' %} diff --git a/sapl/templates/base/RelatorioAtas_filter.html b/sapl/templates/relatorios/RelatorioAtas_filter.html similarity index 89% rename from sapl/templates/base/RelatorioAtas_filter.html rename to sapl/templates/relatorios/RelatorioAtas_filter.html index 4c55c69d5..fa91bb73d 100644 --- a/sapl/templates/base/RelatorioAtas_filter.html +++ b/sapl/templates/relatorios/RelatorioAtas_filter.html @@ -10,7 +10,7 @@ {% if filter_url %}


PERÍODO: {{ periodo }}


diff --git a/sapl/templates/base/RelatorioAudiencia_filter.html b/sapl/templates/relatorios/RelatorioAudiencia_filter.html similarity index 86% rename from sapl/templates/base/RelatorioAudiencia_filter.html rename to sapl/templates/relatorios/RelatorioAudiencia_filter.html index d41bd04d1..14867cb89 100644 --- a/sapl/templates/base/RelatorioAudiencia_filter.html +++ b/sapl/templates/relatorios/RelatorioAudiencia_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



{% if object_list|length > 0 %} diff --git a/sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html b/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html similarity index 94% rename from sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html rename to sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html index 14944cca8..953169f7c 100644 --- a/sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html +++ b/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html @@ -8,7 +8,7 @@ {% crispy filter.form %} {% else %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioDocumentosAcessorios_filter.html b/sapl/templates/relatorios/RelatorioDocumentosAcessorios_filter.html similarity index 92% rename from sapl/templates/base/RelatorioDocumentosAcessorios_filter.html rename to sapl/templates/relatorios/RelatorioDocumentosAcessorios_filter.html index 0649a0624..92488fa8c 100644 --- a/sapl/templates/base/RelatorioDocumentosAcessorios_filter.html +++ b/sapl/templates/relatorios/RelatorioDocumentosAcessorios_filter.html @@ -7,7 +7,7 @@ {% crispy filter.form %} {% else %}



PARÂMETROS DE PESQUISA
diff --git a/sapl/templates/base/RelatorioHistoricoTramitacaoAdm_filter.html b/sapl/templates/relatorios/RelatorioHistoricoTramitacaoAdm_filter.html similarity index 93% rename from sapl/templates/base/RelatorioHistoricoTramitacaoAdm_filter.html rename to sapl/templates/relatorios/RelatorioHistoricoTramitacaoAdm_filter.html index ba0488aac..6a92f9128 100644 --- a/sapl/templates/base/RelatorioHistoricoTramitacaoAdm_filter.html +++ b/sapl/templates/relatorios/RelatorioHistoricoTramitacaoAdm_filter.html @@ -8,7 +8,7 @@ {% crispy filter.form %} {% else %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioHistoricoTramitacao_filter.html b/sapl/templates/relatorios/RelatorioHistoricoTramitacao_filter.html similarity index 93% rename from sapl/templates/base/RelatorioHistoricoTramitacao_filter.html rename to sapl/templates/relatorios/RelatorioHistoricoTramitacao_filter.html index eacfcc709..16fd7c003 100644 --- a/sapl/templates/base/RelatorioHistoricoTramitacao_filter.html +++ b/sapl/templates/relatorios/RelatorioHistoricoTramitacao_filter.html @@ -8,7 +8,7 @@ {% crispy filter.form %} {% else %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioMateriasAnoAssunto.html b/sapl/templates/relatorios/RelatorioMateriasAnoAssunto.html similarity index 100% rename from sapl/templates/base/RelatorioMateriasAnoAssunto.html rename to sapl/templates/relatorios/RelatorioMateriasAnoAssunto.html diff --git a/sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html b/sapl/templates/relatorios/RelatorioMateriasPorAnoAutorTipo_filter.html similarity index 93% rename from sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html rename to sapl/templates/relatorios/RelatorioMateriasPorAnoAutorTipo_filter.html index 561fd671c..895bfc7ba 100644 --- a/sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html +++ b/sapl/templates/relatorios/RelatorioMateriasPorAnoAutorTipo_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioMateriasPorAutor_filter.html b/sapl/templates/relatorios/RelatorioMateriasPorAutor_filter.html similarity index 94% rename from sapl/templates/base/RelatorioMateriasPorAutor_filter.html rename to sapl/templates/relatorios/RelatorioMateriasPorAutor_filter.html index 2690b5d4e..5acb303c1 100644 --- a/sapl/templates/base/RelatorioMateriasPorAutor_filter.html +++ b/sapl/templates/relatorios/RelatorioMateriasPorAutor_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html b/sapl/templates/relatorios/RelatorioMateriasPorTramitacao_filter.html similarity index 92% rename from sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html rename to sapl/templates/relatorios/RelatorioMateriasPorTramitacao_filter.html index 869c08c1d..c0ef7e9b7 100644 --- a/sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html +++ b/sapl/templates/relatorios/RelatorioMateriasPorTramitacao_filter.html @@ -9,7 +9,7 @@ {% if filter_url %}



PARÂMETROS DE PESQUISA:
@@ -72,6 +72,8 @@ {% endfor %}
Matéria
+ {{materia_em_tramitacao.materia.tipo.descricao}} - {{materia_em_tramitacao.materia.tipo.sigla}} {{materia_em_tramitacao.materia.numero}}/{{materia_em_tramitacao.materia.ano}} +
+ + Data de Fim de Prazo: {{materia_em_tramitacao.tramitacao.data_fim_prazo}} + +
- {{materia.tipo.descricao}} - {{materia.tipo.sigla}} {{materia.numero}}/{{materia.ano}} + {{materia_em_tramitacao.materia.ementa}} + + {% if not tramitacao__status or not tramitacao__unidade_tramitacao_destino %} + +
+ Local Atual: {{ materia_em_tramitacao.materia.tramitacao_set.first.unidade_tramitacao_destino }} +
+ Status: {{ materia_em_tramitacao.materia.tramitacao_set.first.status }} +
+ Texto da Ação: {{ materia_em_tramitacao.materia.tramitacao_set.first.texto }} +
+ {% endif %}
{{materia.ementa}}

Nenhuma matéria encontrada com esses parâmetros.

Histórico de tramitações por período e local informados.
Tramitações de Matérias Tramitações de matéria com status informado no intervalo. Matérias por prazos de Tramitação Relatório de tramitações em intervalo de data de fim de prazo.
Reunião de Comissão
{% endif %} - {% include 'paginacao.html' %} + {% if page.object_list %} + {% include "paginacao.html" %} + {% endif %}
{% endblock base_content %} diff --git a/sapl/templates/base/RelatorioNormaMes_filter.html b/sapl/templates/relatorios/RelatorioNormaMes_filter.html similarity index 94% rename from sapl/templates/base/RelatorioNormaMes_filter.html rename to sapl/templates/relatorios/RelatorioNormaMes_filter.html index 3a9276657..717f6bb5a 100644 --- a/sapl/templates/base/RelatorioNormaMes_filter.html +++ b/sapl/templates/relatorios/RelatorioNormaMes_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioNormasPorAutor_filter.html b/sapl/templates/relatorios/RelatorioNormasPorAutor_filter.html similarity index 95% rename from sapl/templates/base/RelatorioNormasPorAutor_filter.html rename to sapl/templates/relatorios/RelatorioNormasPorAutor_filter.html index aaf5247a9..c3f045301 100644 --- a/sapl/templates/base/RelatorioNormasPorAutor_filter.html +++ b/sapl/templates/relatorios/RelatorioNormasPorAutor_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioNormasVigencia_filter.html b/sapl/templates/relatorios/RelatorioNormasVigencia_filter.html similarity index 93% rename from sapl/templates/base/RelatorioNormasVigencia_filter.html rename to sapl/templates/relatorios/RelatorioNormasVigencia_filter.html index 3b2a3206f..b53fe6e67 100644 --- a/sapl/templates/base/RelatorioNormasVigencia_filter.html +++ b/sapl/templates/relatorios/RelatorioNormasVigencia_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



PARÂMETROS DE PESQUISA:
diff --git a/sapl/templates/base/RelatorioPresencaSessao_filter.html b/sapl/templates/relatorios/RelatorioPresencaSessao_filter.html similarity index 96% rename from sapl/templates/base/RelatorioPresencaSessao_filter.html rename to sapl/templates/relatorios/RelatorioPresencaSessao_filter.html index 9688ab33f..3d4b2e785 100644 --- a/sapl/templates/base/RelatorioPresencaSessao_filter.html +++ b/sapl/templates/relatorios/RelatorioPresencaSessao_filter.html @@ -16,7 +16,7 @@



PERÍODO: {{periodo}}
diff --git a/sapl/templates/base/RelatorioReuniao_filter.html b/sapl/templates/relatorios/RelatorioReuniao_filter.html similarity index 87% rename from sapl/templates/base/RelatorioReuniao_filter.html rename to sapl/templates/relatorios/RelatorioReuniao_filter.html index 8bd1e7f35..8e50742a9 100644 --- a/sapl/templates/base/RelatorioReuniao_filter.html +++ b/sapl/templates/relatorios/RelatorioReuniao_filter.html @@ -9,7 +9,7 @@ {% if show_results %}



{% if object_list|length > 0 %} diff --git a/sapl/templates/base/relatorios_list.html b/sapl/templates/relatorios/relatorios_list.html similarity index 52% rename from sapl/templates/base/relatorios_list.html rename to sapl/templates/relatorios/relatorios_list.html index 8fe5535fe..5f77a5e6a 100644 --- a/sapl/templates/base/relatorios_list.html +++ b/sapl/templates/relatorios/relatorios_list.html @@ -13,69 +13,69 @@ - Matérias em tramitação + Matérias em tramitação Matérias Legislativas por Ano, Tipo, Local atual e Status da Tramitação informados. - Matérias por Autor + Matérias por Autor Listagem e totalização de matérias por autor, com filtros para tipo e período. - Matérias por Ano, Autor e Tipo + Matérias por Ano, Autor e Tipo Totalização anual de matérias agrupadas por autor e tipo. - Matérias por Ano, Assunto + Matérias por Ano, Assunto Totalização de matérias agrupadas por ano e assunto. - Presença nas sessões + Presença nas sessões Presença dos parlamentares nas sessões plenárias. - Atas + Atas Atas de Sessão Plenária. - Histórico de tramitações de Matérias + Histórico de tramitações de Matérias Histórico de tramitações por período e local informados. - Matérias por prazos de Tramitação + Matérias por prazos de Tramitação Relatório de tramitações em intervalo de data de fim de prazo. - Reunião de Comissão + Reunião de Comissão Reunião de Comissão por data. - Audiência Pública + Audiência Pública Audiência Pública com o tipo. - Normas por mês + Normas por mês Normas publicadas por mês. - Normas por vigência + Normas por vigência Normas vigentes ou não vigentes. - Histórico de tramitações de Documentos - Histórico de tramitações de Documentos por período e local informados. + Histórico de tramitações de documentos + Histórico de tramitações de documentos por período e local informados. {% if estatisticas_acesso_normas %} - Estatísticas de acesso de Normas + Estatísticas de acesso de Normas Normas por acesso. {% endif %} - Documentos Acessórios de Matérias Legislativas + Documentos Acessórios de Matérias Legislativas Documentos Acessórios por tipo, período e tipo da Matéria Legislativa associada. - Normas Por Autor + Normas Por Autor Listagem e totalização de normas por autor, com filtros para tipo e período. From 4b8681e4ff7df19286c18229fefc42ab950708db Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:55:35 -0700 Subject: [PATCH 66/80] =?UTF-8?q?Conserta=20l=C3=B3gica=20para=20embutir?= =?UTF-8?q?=20SAPL=20em=20iframe=20(#3653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/templates/base.html b/sapl/templates/base.html index d15523313..ef29c5a93 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -267,7 +267,7 @@ + {% endblock extra_js %} + From 40a0bf01434bf7c217c05653f1847f783c1f159f Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:52:26 -0300 Subject: [PATCH 72/80] fix: Cria novos campos para o model proposicao para salvar o usuario responsavel por cada acao (#3660) Co-authored-by: joao --- .../migrations/0083_auto_20230731_1845.py | 31 +++++++++++++++++ sapl/materia/models.py | 34 +++++++++++++++++++ sapl/templates/materia/proposicao_detail.html | 9 ++++- sapl/templates/materia/recibo_proposicao.html | 11 ++++-- 4 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 sapl/materia/migrations/0083_auto_20230731_1845.py diff --git a/sapl/materia/migrations/0083_auto_20230731_1845.py b/sapl/materia/migrations/0083_auto_20230731_1845.py new file mode 100644 index 000000000..d286e0be1 --- /dev/null +++ b/sapl/materia/migrations/0083_auto_20230731_1845.py @@ -0,0 +1,31 @@ +# Generated by Django 2.2.28 on 2023-07-31 21:45 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('materia', '0082_auto_20230529_1641'), + ] + + operations = [ + migrations.AddField( + model_name='proposicao', + name='usuario_devolucao', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='proposicoes_devolvidas', to=settings.AUTH_USER_MODEL, verbose_name='Usuário Responsável pela Devolução'), + ), + migrations.AddField( + model_name='proposicao', + name='usuario_envio', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='proposicoes_enviadas', to=settings.AUTH_USER_MODEL, verbose_name='Usuário Responsável pelo Envio'), + ), + migrations.AddField( + model_name='proposicao', + name='usuario_recebimento', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='proposicoes_recebidas', to=settings.AUTH_USER_MODEL, verbose_name='Usuário Responsável pelo Recebimento'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 24ee55d16..14b62196b 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -780,6 +780,33 @@ class Proposicao(models.Model): verbose_name=_('Data de Devolução') ) + usuario_envio = models.ForeignKey( + get_settings_auth_user_model(), + verbose_name=_('Usuário Responsável pelo Envio'), + on_delete=models.PROTECT, + related_name='proposicoes_enviadas', + blank=True, + null=True + ) + + usuario_recebimento = models.ForeignKey( + get_settings_auth_user_model(), + verbose_name=_('Usuário Responsável pelo Recebimento'), + on_delete=models.PROTECT, + related_name='proposicoes_recebidas', + blank=True, + null=True + ) + + usuario_devolucao = models.ForeignKey( + get_settings_auth_user_model(), + verbose_name=_('Usuário Responsável pela Devolução'), + on_delete=models.PROTECT, + related_name='proposicoes_devolvidas', + blank=True, + null=True + ) + descricao = models.TextField(verbose_name=_('Ementa')) justificativa_devolucao = models.CharField( @@ -993,6 +1020,13 @@ class Proposicao(models.Model): def save(self, force_insert=False, force_update=False, using=None, update_fields=None): + # atualiza o usuario baseado no status da proposição (que esta sendo calculado pela data) + if self.data_envio is not None and not self.usuario_envio: + self.usuario_envio = self.user + elif self.data_recebimento is not None and not self.usuario_recebimento: + self.usuario_recebimento = self.user + elif self.data_devolucao is not None and not self.usuario_devolucao: + self.usuario_devolucao = self.user if not self.pk and self.texto_original: texto_original = self.texto_original diff --git a/sapl/templates/materia/proposicao_detail.html b/sapl/templates/materia/proposicao_detail.html index ea1ab76fb..6eba44b14 100644 --- a/sapl/templates/materia/proposicao_detail.html +++ b/sapl/templates/materia/proposicao_detail.html @@ -114,7 +114,14 @@

Enviada por

-
{{ proposicao.user|format_user }}
+
+ {# TODO remover condicional apos migrar as acoes para os devidos campos#} + {% if proposicao.usuario_envio %} + {{ proposicao.usuario_envio|format_user }} + {% else %} + {{ proposicao.user|format_user }} + {% endif %} +
diff --git a/sapl/templates/materia/recibo_proposicao.html b/sapl/templates/materia/recibo_proposicao.html index 1a04f2bf5..ce93557a3 100644 --- a/sapl/templates/materia/recibo_proposicao.html +++ b/sapl/templates/materia/recibo_proposicao.html @@ -50,8 +50,15 @@ Tipo de Proposição: {{proposicao.tipo.descricao}} - Autor: {{proposicao.autor}} - Enviada por: {{ proposicao.user|format_user }} + Autor: {{ proposicao.autor }} + Enviada por: + {# TODO remover condicional apos migrar as acoes para os devidos campos#} + {% if proposicao.usuario_envio %} + {{ proposicao.usuario_envio|format_user }} + {% else %} + {{ proposicao.user }} + {% endif %} + Descrição: {{proposicao.descricao}} From fbc2ea085ea33d4491893d192bddd1171de5a13f Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Fri, 11 Aug 2023 08:04:56 -0700 Subject: [PATCH 73/80] =?UTF-8?q?HOT-FIX:=20conserta=20gera=C3=A7=C3=A3o?= =?UTF-8?q?=20de=20CHANGES.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release.sh b/release.sh index fa901eb25..bcb98908c 100755 --- a/release.sh +++ b/release.sh @@ -93,11 +93,11 @@ prompt_yes_no() { function commit_and_push { echo -e "${green_color}Committing new release $FINAL_VERSION...${color_reset}" git add docker/docker-compose.yaml setup.py sapl/settings.py sapl/templates/base.html - git changelog --tag $FINAL_VERSION --prune-old -x > latest_changes.tmp - cat /tmp/latest_changes.md CHANGES.md > CHANGES.tmp + git changelog --tag $FINAL_VERSION --prune-old -x > latest_changes.md + cat latest_changes.md CHANGES.md > CHANGES.tmp mv CHANGES.tmp CHANGES.md git add CHANGES.md - rm latest_changes.tmp + rm latest_changes.md if prompt_yes_no "${green_color}Do you want to commit SAPL $FINAL_VERSION release locally?${reset_color}"; then git commit -m "Release: $FINAL_VERSION" From c202c689a6e499c9ce28b2674b0f2c1909bf35f7 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Fri, 11 Aug 2023 08:06:06 -0700 Subject: [PATCH 74/80] Release: 3.1.163-RC15 --- CHANGES.md | 16 ++++++++++++++++ docker/docker-compose.yaml | 2 +- sapl/settings.py | 2 +- sapl/templates/base.html | 2 +- setup.py | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7c77095ca..9a3b6fafb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,20 @@ +3.1.163-RC15 / 2023-08-11 +========================= + + * HOT-FIX: conserta geração de CHANGES.md + * fix: Cria novos campos para o model proposicao para salvar o usuario responsavel por cada acao (#3660) + * Simplificação da tela de pesquisa de Matéria Legislativa (#3662) + * bump pyyaml + * Adiciona controle de visibilidade no módulo de relatorios + * Adiciona coluna de justificativa de ausência (#3657) + * Adiciona coluna de justificativa de ausência + * Conserta lógica para embutir SAPL em iframe (#3653) + * Move relatorios para app de relatorios (#3656) + * Remove redirect de URLs (#3652) + * Hot-fix: endpoint do prometheus endpoint URL + * feat: Adiciona funcionalidade de baixar lista de documentos acessorios de um documento administrativo (#3650) + 3.1.163-RC14 / 2023-06-28 ========================= diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 08c85bdbc..fdd3a574f 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -32,7 +32,7 @@ services: networks: - sapl-net sapl: - image: interlegis/sapl:3.1.163-RC14 + image: interlegis/sapl:3.1.163-RC15 # build: # context: ../ # dockerfile: ./docker/Dockerfile diff --git a/sapl/settings.py b/sapl/settings.py index 5517e32f1..77721488b 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,7 +41,7 @@ ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login/?next=' -SAPL_VERSION = '3.1.163-RC14' +SAPL_VERSION = '3.1.163-RC15' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/sapl/templates/base.html b/sapl/templates/base.html index ef29c5a93..13a2429b0 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -194,7 +194,7 @@ Desenvolvido pelo Interlegis em software livre e aberto. - Release: 3.1.163-RC14 + Release: 3.1.163-RC15

diff --git a/setup.py b/setup.py index defc83b89..cff32dc7d 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ install_requires = [ ] setup( name='interlegis-sapl', - version='3.1.163-RC14', + version='3.1.163-RC15', packages=find_packages(), include_package_data=True, license='GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007', From f96b199abfe1a15ac1d0f0e6b7a48109c4b540f5 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Mon, 14 Aug 2023 09:26:43 -0700 Subject: [PATCH 75/80] Revert "Remove redirect de URLs (#3652)" This reverts commit 8262a192abe83a9729c06c673a13e6aec02bd048. --- sapl/redireciona_urls/__init__.py | 0 sapl/redireciona_urls/apps.py | 8 + sapl/redireciona_urls/exceptions.py | 13 + sapl/redireciona_urls/tests.py | 712 +++++++++++++++++++++++ sapl/redireciona_urls/urls.py | 85 +++ sapl/redireciona_urls/views.py | 858 ++++++++++++++++++++++++++++ sapl/settings.py | 1 + sapl/test_urls.py | 27 + sapl/urls.py | 3 + 9 files changed, 1707 insertions(+) create mode 100644 sapl/redireciona_urls/__init__.py create mode 100644 sapl/redireciona_urls/apps.py create mode 100644 sapl/redireciona_urls/exceptions.py create mode 100644 sapl/redireciona_urls/tests.py create mode 100644 sapl/redireciona_urls/urls.py create mode 100644 sapl/redireciona_urls/views.py diff --git a/sapl/redireciona_urls/__init__.py b/sapl/redireciona_urls/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sapl/redireciona_urls/apps.py b/sapl/redireciona_urls/apps.py new file mode 100644 index 000000000..8ee8742bc --- /dev/null +++ b/sapl/redireciona_urls/apps.py @@ -0,0 +1,8 @@ +from django import apps +from django.utils.translation import ugettext_lazy as _ + + +class AppConfig(apps.AppConfig): + name = 'sapl.redireciona_urls' + label = 'redireciona_urls' + verbose_name = _('Redirecionador de URLs') diff --git a/sapl/redireciona_urls/exceptions.py b/sapl/redireciona_urls/exceptions.py new file mode 100644 index 000000000..e1a994bcb --- /dev/null +++ b/sapl/redireciona_urls/exceptions.py @@ -0,0 +1,13 @@ +from django.utils.translation import ugettext as _ + + +class UnknownUrlNameError(Exception): + + def __init__(self, url_name): + self.url_name = url_name + + def __str__(self): + return repr( + _("Funcionalidade") + + " '%s' " % (self.url_name) + + _("pode ter sido removida ou movida para outra url.")) diff --git a/sapl/redireciona_urls/tests.py b/sapl/redireciona_urls/tests.py new file mode 100644 index 000000000..5a0e8b98f --- /dev/null +++ b/sapl/redireciona_urls/tests.py @@ -0,0 +1,712 @@ +from django.test import TestCase +from django.urls import reverse + + +MovedPermanentlyHTTPStatusCode = 301 +EMPTY_STRING = '' + + +class RedirecionaURLsTests(TestCase): + + def test_redireciona_index_SAPL(self): + response = self.client.get(reverse( + 'sapl.redireciona_urls:redireciona_sapl_index') + ) + url_e = reverse('sapl.base:sapl_index') + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaParlamentarTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_parlamentar' + + def test_redireciona_parlamentar_list(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.parlamentares:parlamentar_list') + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_parlamentar_list_por_legislatura(self): + numero_legislatura = 123 + + url = reverse(self.url_pattern) + url_e = reverse('sapl.parlamentares:parlamentar_list') + + url = "%s%s" % ( + url, + "?hdn_num_legislatura=%s" % (numero_legislatura) + ) + url_e = "%s%s" % (url_e, "?pk=%s" % numero_legislatura) + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_parlamentar_detail(self): + url = reverse(self.url_pattern) + pk_parlamentar = 21 + url = "%s%s" % (url, "?cod_parlamentar=%s" % (pk_parlamentar)) + url_e = reverse( + 'sapl.parlamentares:parlamentar_detail', + kwargs={'pk': pk_parlamentar} + ) + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaComissaoTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_comissao' + + def test_redireciona_comissao_detail(self): + url = reverse(self.url_pattern) + pk_comissao = 21 + url = "%s%s" % (url, "?cod_comissao=%s" % (pk_comissao)) + url_e = reverse( + 'sapl.comissoes:comissao_detail', + kwargs={'pk': pk_comissao} + ) + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_comissao_list(self): + url = reverse(self.url_pattern) + url_e = reverse( + 'sapl.comissoes:comissao_list') + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaPautaSessaoTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_pauta_sessao_' + + def test_redireciona_pauta_sessao_detail(self): + url = reverse(self.url_pattern) + pk_pauta_sessao = 21 + url = "%s%s" % (url, "?cod_sessao_plen=%s" % (pk_pauta_sessao)) + url_e = reverse( + 'sapl.sessao:pauta_sessao_detail', + kwargs={'pk': pk_pauta_sessao} + ) + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_pauta_sessao_list(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_pauta') + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_pauta_sessao_list_por_dat_sessao_sel(self): + + url = reverse(self.url_pattern) + + ano_s_p = "2016" + mes_s_p = "05" + dia_s_p = "14" + data_s_p = "%s/%s/%s" % (dia_s_p, mes_s_p, ano_s_p) + + url = "%s%s" % (url, "?dat_sessao_sel=%s" % data_s_p) + + url_e = reverse('sapl.sessao:pesquisar_pauta') + + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (ano_s_p) + args_e += "&data_inicio__month=%s" % (mes_s_p.lstrip("0")) + args_e += "&data_inicio__day=%s" % (dia_s_p.lstrip("0")) + args_e += "&tipo=&salvar=Pesquisar" + + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaMesaDiretoraTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_mesa_diretora' + + def test_redireciona_mesa_diretora(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.parlamentares:mesa_diretora') + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaMesaDiretoraParlamentarTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_mesa_diretora_parlamentar' + + def test_redireciona_mesa_diretora_parlamentar(self): + url = reverse(self.url_pattern) + pk_parlamentar = 21 + url = "%s%s" % (url, "?cod_parlamentar=%s" % (pk_parlamentar)) + url_e = reverse( + 'sapl.parlamentares:parlamentar_detail', + kwargs={'pk': pk_parlamentar} + ) + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaNormasJuridicasListTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_norma_juridica_pesquisa' + + def test_redireciona_norma_juridica_pesquisa_sem_parametros(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.norma:norma_pesquisa') + + tipo_norma = EMPTY_STRING + numero_norma = EMPTY_STRING + ano_norma = EMPTY_STRING + periodo_inicial_aprovacao = EMPTY_STRING + periodo_final_aprovacao = EMPTY_STRING + periodo_inicial_publicacao = EMPTY_STRING + periodo_final_publicacao = EMPTY_STRING + ementa_norma = EMPTY_STRING + assuntos_norma = EMPTY_STRING + + args = EMPTY_STRING + args += "?lst_tip_norma=%s" % (tipo_norma) + args += "&txt_numero=%s" % (numero_norma) + args += "&txt_ano=%s" % (ano_norma) + args += "&dt_norma=%s" % (periodo_inicial_aprovacao) + args += "&dt_norma2=%s" % (periodo_final_aprovacao) + args += "&dt_public=%s" % (periodo_inicial_publicacao) + args += "&dt_public2=%s" % (periodo_final_publicacao) + args += "&txt_assunto=%s" % (ementa_norma) + args += "&lst_assunto_norma=%s" % (assuntos_norma) + args += "&salvar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + args_e = EMPTY_STRING + args_e += "?tipo=%s" % (tipo_norma) + args_e += "&numero=%s" % (numero_norma) + args_e += "&ano=%s" % (ano_norma) + args_e += "&data_0=%s" % (periodo_inicial_aprovacao) + args_e += "&data_1=%s" % (periodo_final_aprovacao) + args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) + args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) + args_e += "&ementa=%s" % (ementa_norma) + args_e += "&assuntos=%s" % (assuntos_norma) + args_e += "&salvar=%s" % ('Pesquisar') + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_norma_juridica_pesquisa_por_tipo(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.norma:norma_pesquisa') + + tipo_norma = '4' + numero_norma = EMPTY_STRING + ano_norma = EMPTY_STRING + periodo_inicial_aprovacao = EMPTY_STRING + periodo_final_aprovacao = EMPTY_STRING + periodo_inicial_publicacao = EMPTY_STRING + periodo_final_publicacao = EMPTY_STRING + ementa_norma = EMPTY_STRING + assuntos_norma = EMPTY_STRING + + args = EMPTY_STRING + args += "?lst_tip_norma=%s" % (tipo_norma) + args += "&txt_numero=%s" % (numero_norma) + args += "&txt_ano=%s" % (ano_norma) + args += "&dt_norma=%s" % (periodo_inicial_aprovacao) + args += "&dt_norma2=%s" % (periodo_final_aprovacao) + args += "&dt_public=%s" % (periodo_inicial_publicacao) + args += "&dt_public2=%s" % (periodo_final_publicacao) + args += "&txt_assunto=%s" % (ementa_norma) + args += "&lst_assunto_norma=%s" % (assuntos_norma) + args += "&salvar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + args_e = EMPTY_STRING + args_e += "?tipo=%s" % (tipo_norma) + args_e += "&numero=%s" % (numero_norma) + args_e += "&ano=%s" % (ano_norma) + args_e += "&data_0=%s" % (periodo_inicial_aprovacao) + args_e += "&data_1=%s" % (periodo_final_aprovacao) + args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) + args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) + args_e += "&ementa=%s" % (ementa_norma) + args_e += "&assuntos=%s" % (assuntos_norma) + args_e += "&salvar=%s" % ('Pesquisar') + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_norma_juridica_pesquisa_por_ano(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.norma:norma_pesquisa') + + tipo_norma = EMPTY_STRING + numero_norma = EMPTY_STRING + ano_norma = '2010' + periodo_inicial_aprovacao = EMPTY_STRING + periodo_final_aprovacao = EMPTY_STRING + periodo_inicial_publicacao = EMPTY_STRING + periodo_final_publicacao = EMPTY_STRING + ementa_norma = EMPTY_STRING + assuntos_norma = EMPTY_STRING + + args = EMPTY_STRING + args += "?lst_tip_norma=%s" % (tipo_norma) + args += "&txt_numero=%s" % (numero_norma) + args += "&txt_ano=%s" % (ano_norma) + args += "&dt_norma=%s" % (periodo_inicial_aprovacao) + args += "&dt_norma2=%s" % (periodo_final_aprovacao) + args += "&dt_public=%s" % (periodo_inicial_publicacao) + args += "&dt_public2=%s" % (periodo_final_publicacao) + args += "&txt_assunto=%s" % (ementa_norma) + args += "&lst_assunto_norma=%s" % (assuntos_norma) + args += "&salvar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + args_e = EMPTY_STRING + args_e += "?tipo=%s" % (tipo_norma) + args_e += "&numero=%s" % (numero_norma) + args_e += "&ano=%s" % (ano_norma) + args_e += "&data_0=%s" % (periodo_inicial_aprovacao) + args_e += "&data_1=%s" % (periodo_final_aprovacao) + args_e += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) + args_e += "&data_publicacao_1=%s" % (periodo_final_publicacao) + args_e += "&ementa=%s" % (ementa_norma) + args_e += "&assuntos=%s" % (assuntos_norma) + args_e += "&salvar=%s" % ('Pesquisar') + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaNormasJuridicasDetailTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_norma_juridica_detail' + + def test_redireciona_norma_juridica_detail(self): + url = reverse(self.url_pattern) + + pk_norma = 120 + + args = EMPTY_STRING + args += "?cod_norma=%s" % (pk_norma) + url = "%s%s" % (url, args) + + url_e = reverse( + 'sapl.norma:normajuridica_detail', + kwargs={ + 'pk': pk_norma} + ) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_norma_juridica_detail_sem_parametros(self): + url = reverse(self.url_pattern) + + pk_norma = EMPTY_STRING + + args = EMPTY_STRING + args += "?cod_norma=%s" % (pk_norma) + url = "%s%s" % (url, args) + + url_e = reverse('sapl.norma:norma_pesquisa') + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaSessaoPlenariaTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_sessao_plenaria_' + + def test_redireciona_sessao_plenaria_detail(self): + url = reverse(self.url_pattern) + pk_sessao_plenaria = 258 + url = "%s%s" % (url, "?cod_sessao_plen=%s" % (pk_sessao_plenaria)) + url_e = reverse( + 'sapl.sessao:sessaoplenaria_detail', + kwargs={'pk': pk_sessao_plenaria} + ) + + response = self.client.get(url) + + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_sessao_plenaria_list_sem_parametro(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_sessao') + + year = EMPTY_STRING + month = EMPTY_STRING + day = EMPTY_STRING + tipo_sessao = EMPTY_STRING + + args = EMPTY_STRING + args += "?ano_sessao_sel=%s" % (year) + args += "&mes_sessao_sel=%s" % (month) + args += "&dia_sessao_sel=%s" % (day) + args += "&tip_sessao_sel=%s" % (tipo_sessao) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (year) + args_e += "&data_inicio__month=%s" % (month) + args_e += "&data_inicio__day=%s" % (day) + args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_sessao_plenaria_list_sem_tipo(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_sessao') + + year = '2015' + month = '04' + day = '06' + tipo_sessao = EMPTY_STRING + + args = EMPTY_STRING + args += "?ano_sessao_sel=%s" % (year) + args += "&mes_sessao_sel=%s" % (month) + args += "&dia_sessao_sel=%s" % (day) + args += "&tip_sessao_sel=%s" % (tipo_sessao) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (year) + args_e += "&data_inicio__month=%s" % (month) + args_e += "&data_inicio__day=%s" % (day) + args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_sessao_plenaria_list_sem_tipo_e_ano(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_sessao') + + year = EMPTY_STRING + month = '04' + day = '06' + tipo_sessao = EMPTY_STRING + + args = EMPTY_STRING + args += "?ano_sessao_sel=%s" % (year) + args += "&mes_sessao_sel=%s" % (month) + args += "&dia_sessao_sel=%s" % (day) + args += "&tip_sessao_sel=%s" % (tipo_sessao) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (year) + args_e += "&data_inicio__month=%s" % (month) + args_e += "&data_inicio__day=%s" % (day) + args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_sessao_plenaria_list_sem_ano(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_sessao') + + year = EMPTY_STRING + month = '04' + day = '06' + tipo_sessao = '4' + + args = EMPTY_STRING + args += "?ano_sessao_sel=%s" % (year) + args += "&mes_sessao_sel=%s" % (month) + args += "&dia_sessao_sel=%s" % (day) + args += "&tip_sessao_sel=%s" % (tipo_sessao) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (year) + args_e += "&data_inicio__month=%s" % (month) + args_e += "&data_inicio__day=%s" % (day) + args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url_e = "%s%s" % (url_e, args_e) + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_sessao_plenaria_list_sem_mes_dia(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.sessao:pesquisar_sessao') + + year = '2015' + month = EMPTY_STRING + day = EMPTY_STRING + tipo_sessao = '4' + + args = EMPTY_STRING + args += "?ano_sessao_sel=%s" % (year) + args += "&mes_sessao_sel=%s" % (month) + args += "&dia_sessao_sel=%s" % (day) + args += "&tip_sessao_sel=%s" % (tipo_sessao) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args_e = EMPTY_STRING + args_e += "?data_inicio__year=%s" % (year) + args_e += "&data_inicio__month=%s" % (month) + args_e += "&data_inicio__day=%s" % (day) + args_e += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url_e = "%s%s" % (url_e, args_e) + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaHistoricoTramitacoesListTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_historico_tramitacoes' + + def test_redireciona_historico_tramitacoes_sem_parametros(self): + args_e = EMPTY_STRING + args = EMPTY_STRING + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:historico_tramitacoes') + + inicio_dt_tramitacao = EMPTY_STRING + fim_dt_tramitacao = EMPTY_STRING + tipo_materia = EMPTY_STRING + unidade_local_tramitacao = EMPTY_STRING + status_tramitacao = EMPTY_STRING + + args += "?txt_dat_inicio_periodo=%s" % (inicio_dt_tramitacao) + args += "&txt_dat_fim_periodo=%s" % (fim_dt_tramitacao) + args += "&lst_tip_materia=%s" % (tipo_materia) + args += "&lst_cod_unid_tram_dest=%s" % (unidade_local_tramitacao) + args += "&lst_status=%s" % (status_tramitacao) + args += "&btn_materia_pesquisar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + inicio_dt_tramitacao = inicio_dt_tramitacao.lstrip("0") + fim_dt_tramitacao = fim_dt_tramitacao.lstrip("0") + tipo_materia = tipo_materia.lstrip("0") + unidade_local_tramitacao = unidade_local_tramitacao.lstrip("0") + status_tramitacao = status_tramitacao.lstrip("0") + + if ( + (inicio_dt_tramitacao != EMPTY_STRING) or + (fim_dt_tramitacao != EMPTY_STRING) or + (tipo_materia != EMPTY_STRING) or + (unidade_local_tramitacao != EMPTY_STRING) or + (status_tramitacao != EMPTY_STRING)): + args_e += "?tramitacao__data_tramitacao_0=%s" % ( + inicio_dt_tramitacao) + args_e += "&tramitacao__data_tramitacao_1=%s" % ( + fim_dt_tramitacao) + args_e += "&tipo=%s" % (tipo_materia) + args_e += "&tramitacao__unidade_tramitacao_local=%s" % ( + unidade_local_tramitacao) + args_e += "&tramitacao__status=%s" % (status_tramitacao) + args_e += "&salvar=%s" % ('Pesquisar') + + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_historico_tramitacoes(self): + args = EMPTY_STRING + args_e = EMPTY_STRING + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:historico_tramitacoes') + + inicio_dt_tramitacao = '12/07/2000' + fim_dt_tramitacao = '26/05/2017' + unidade_local_tramitacao = '0' + tipo_materia = '0' + status_tramitacao = '0' + + args += "?txt_dat_inicio_periodo=%s" % (inicio_dt_tramitacao) + args += "&txt_dat_fim_periodo=%s" % (fim_dt_tramitacao) + args += "&lst_tip_materia=%s" % (tipo_materia) + args += "&lst_cod_unid_tram_dest=%s" % (unidade_local_tramitacao) + args += "&lst_status=%s" % (status_tramitacao) + args += "&btn_materia_pesquisar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + inicio_dt_tramitacao = inicio_dt_tramitacao.lstrip("0") + fim_dt_tramitacao = fim_dt_tramitacao.lstrip("0") + tipo_materia = tipo_materia.lstrip("0") + unidade_local_tramitacao = unidade_local_tramitacao.lstrip("0") + status_tramitacao = status_tramitacao.lstrip("0") + + if ( + (inicio_dt_tramitacao != EMPTY_STRING) or + (fim_dt_tramitacao != EMPTY_STRING) or + (tipo_materia != EMPTY_STRING) or + (unidade_local_tramitacao != EMPTY_STRING) or + (status_tramitacao != EMPTY_STRING)): + args_e += "?tramitacao__data_tramitacao_0=%s" % ( + inicio_dt_tramitacao) + args_e += "&tramitacao__data_tramitacao_1=%s" % ( + fim_dt_tramitacao) + args_e += "&tipo=%s" % (tipo_materia) + args_e += "&tramitacao__unidade_tramitacao_local=%s" % ( + unidade_local_tramitacao) + args_e += "&tramitacao__status=%s" % (status_tramitacao) + args_e += "&salvar=%s" % ('Pesquisar') + + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaPresencaParlamentaresTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_presencaparlamentar_list' + + def test_redireciona_presenca_list_sem_parametros(self): + args_e = EMPTY_STRING + args = EMPTY_STRING + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:presenca_sessao') + + inicio_intervalo_presenca = EMPTY_STRING + fim_intervalo_presenca = EMPTY_STRING + + args += "?txt_dat_inicio=%s" % ( + inicio_intervalo_presenca) + args += "&txt_dat_fim=%s" % ( + fim_intervalo_presenca) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + inicio_intervalo_presenca = inicio_intervalo_presenca.lstrip("0") + fim_intervalo_presenca = fim_intervalo_presenca.lstrip("0") + + args_e += "?data_inicio_0=%s" % ( + inicio_intervalo_presenca) + args_e += "&data_inicio_1=%s" % ( + fim_intervalo_presenca) + args_e += "&salvar=%s" % ('Pesquisar') + + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_presenca_list(self): + args_e = EMPTY_STRING + args = EMPTY_STRING + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:presenca_sessao') + + inicio_intervalo_presenca = '01/02/2015' + fim_intervalo_presenca = '01/02/2017' + + args += "?txt_dat_inicio=%s" % ( + inicio_intervalo_presenca) + args += "&txt_dat_fim=%s" % ( + fim_intervalo_presenca) + url = "%s%s" % (url, args) + + # Remove zeros à esquerda + inicio_intervalo_presenca = inicio_intervalo_presenca.lstrip("0") + fim_intervalo_presenca = fim_intervalo_presenca.lstrip("0") + + args_e += "?data_inicio_0=%s" % ( + inicio_intervalo_presenca) + args_e += "&data_inicio_1=%s" % ( + fim_intervalo_presenca) + args_e += "&salvar=%s" % ('Pesquisar') + + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaMateriasPorAutorTests(TestCase): + url_pattern = 'sapl.redireciona_urls:redireciona_materias_por_autor_list' + + def test_redireciona_materias_por_autor_list_sem_parametros(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:materia_por_autor') + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + +class RedirecionaMateriasPorAnoAutorTipoTests(TestCase): + url_pattern = ( + 'sapl.redireciona_urls:redireciona_materia_por_ano_autor_tipo_list') + + def test_redireciona_materias_por_ano_autor_tipo_list_sem_parametros(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:materia_por_ano_autor_tipo') + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) + + def test_redireciona_materias_por_ano_autor_tipo_list(self): + url = reverse(self.url_pattern) + url_e = reverse('sapl.base:materia_por_ano_autor_tipo') + + ano = 2017 + + args = "?ano=%s" % (ano) + url = "%s%s" % (url, args) + + args_e = "?ano=%s&salvar=Pesquisar" % (ano) + url_e = "%s%s" % (url_e, args_e) + + response = self.client.get(url) + self.assertEqual(response.status_code, MovedPermanentlyHTTPStatusCode) + self.assertEqual(response.url, url_e) diff --git a/sapl/redireciona_urls/urls.py b/sapl/redireciona_urls/urls.py new file mode 100644 index 000000000..f8a9aa685 --- /dev/null +++ b/sapl/redireciona_urls/urls.py @@ -0,0 +1,85 @@ +from django.conf.urls import url + +from .apps import AppConfig +from .views import (RedirecionaAtasList, RedirecionaComissao, + RedirecionaComposicaoComissao, + RedirecionaHistoricoTramitacoesList, + RedirecionaMateriaLegislativaDetail, + RedirecionaMateriaLegislativaList, + RedirecionaMateriasPorAnoAutorTipo, + RedirecionaMateriasPorAutor, RedirecionaMesaDiretoraView, + RedirecionaNormasJuridicasDetail, + RedirecionaNormasJuridicasList, + RedirecionaNormasJuridicasTextoIntegral, + RedirecionaParlamentar, RedirecionaPautaSessao, + RedirecionaPresencaParlamentares, + RedirecionaRelatoriosList, + RedirecionaRelatoriosMateriasEmTramitacaoList, + RedirecionaSAPLIndex, RedirecionaSessaoPlenaria) + +app_name = AppConfig.name +urlpatterns = [ + url(r'^default_index_html$', + RedirecionaSAPLIndex.as_view(), + name='redireciona_sapl_index'), + url(r'^consultas/parlamentar/parlamentar_', + RedirecionaParlamentar.as_view(), + name='redireciona_parlamentar'), + url(r'^consultas/comissao/comissao_', + RedirecionaComissao.as_view(), + name='redireciona_comissao'), + url(r'^consultas/comissao/composicao/composicao_index_html', + RedirecionaComposicaoComissao.as_view(), + name='redireciona_composicaio_comissao'), + url(r'^consultas/pauta_sessao/pauta_sessao_', + RedirecionaPautaSessao.as_view(), + name='redireciona_pauta_sessao_'), + url(r'^consultas/mesa_diretora/mesa_diretora_index_html', + RedirecionaMesaDiretoraView.as_view(), + name='redireciona_mesa_diretora'), + url(r'^consultas/mesa_diretora/parlamentar/parlamentar_', + RedirecionaParlamentar.as_view(), + name='redireciona_mesa_diretora_parlamentar'), + url(r'^consultas/sessao_plenaria/', + RedirecionaSessaoPlenaria.as_view(), + name='redireciona_sessao_plenaria_'), + url(r'^generico/norma_juridica_pesquisar_', + RedirecionaNormasJuridicasList.as_view(), + name='redireciona_norma_juridica_pesquisa'), + url(r'^consultas/norma_juridica/norma_juridica_mostrar_proc', + RedirecionaNormasJuridicasDetail.as_view(), + name='redireciona_norma_juridica_detail'), + url(r'^sapl_documentos/norma_juridica/(?P[0-9]+)_texto_integral', + RedirecionaNormasJuridicasTextoIntegral.as_view(), + name='redireciona_norma_juridica_texto_integral'), + url(r'^relatorios_administrativos/relatorios_administrativos_index_html$', + RedirecionaRelatoriosList.as_view(), + name='redireciona_relatorios_list'), + url(r'tramitacaoMaterias/tramitacaoMaterias', + RedirecionaRelatoriosMateriasEmTramitacaoList.as_view(), + name='redireciona_relatorio_materia_por_tramitacao'), + url(r'tramitacaoMaterias/materia_mostrar_proc$', + RedirecionaMateriaLegislativaDetail.as_view(), + name='redireciona_materialegislativa_detail_tramitacao'), + url(r'consultas/materia/materia_mostrar_proc$', + RedirecionaMateriaLegislativaDetail.as_view(), + name='redireciona_materialegislativa_detail'), + url(r'^generico/materia_pesquisar_', + RedirecionaMateriaLegislativaList.as_view(), + name='redireciona_materialegislativa_list'), + url(r'historicoTramitacoes/historicoTramitacoes', + RedirecionaHistoricoTramitacoesList.as_view(), + name='redireciona_historico_tramitacoes'), + url(r'atasSessao', + RedirecionaAtasList.as_view(), + name='redireciona_atas_list'), + url(r'presencaSessao', + RedirecionaPresencaParlamentares.as_view(), + name='redireciona_presencaparlamentar_list'), + url(r'resumoPropositurasAutor', + RedirecionaMateriasPorAutor.as_view(), + name='redireciona_materias_por_autor_list'), + url(r'propositurasAnoAutorTipo', + RedirecionaMateriasPorAnoAutorTipo.as_view(), + name='redireciona_materia_por_ano_autor_tipo_list'), +] \ No newline at end of file diff --git a/sapl/redireciona_urls/views.py b/sapl/redireciona_urls/views.py new file mode 100644 index 000000000..435280b3b --- /dev/null +++ b/sapl/redireciona_urls/views.py @@ -0,0 +1,858 @@ +import logging + +from django.urls import NoReverseMatch, reverse +from django.views.generic import RedirectView + +from sapl.audiencia.apps import AppConfig as audienciaConfig +from sapl.base.apps import AppConfig as atasConfig +from sapl.comissoes.apps import AppConfig as comissoesConfig +from sapl.materia.apps import AppConfig as materiaConfig +from sapl.norma.apps import AppConfig as normaConfig +from sapl.norma.models import NormaJuridica +from sapl.parlamentares.apps import AppConfig as parlamentaresConfig +from sapl.sessao.apps import AppConfig as sessaoConfig +from .exceptions import UnknownUrlNameError + +EMPTY_STRING = '' + +presenca_sessaoConfig = relatoriosConfig = atasConfig + +app_parlamentares = parlamentaresConfig.name +app_atas = atasConfig.name +app_presenca_sessao = presenca_sessaoConfig.name +app_comissoes = comissoesConfig.name +app_materia = materiaConfig.name +app_sessao = sessaoConfig.name +app_norma = normaConfig.name +app_relatorios = relatoriosConfig.name +app_audiencia = audienciaConfig.name + +pesquisar_atas = (app_atas + ':atas') +presenca_sessao = (app_presenca_sessao + ':presenca_sessao') +parlamentar_list = (app_parlamentares + ':parlamentar_list') +parlamentar_detail = (app_parlamentares + ':parlamentar_detail') +parlamentar_mesa_diretora = (app_parlamentares + ':mesa_diretora') + +comissao_list = (app_comissoes + ':comissao_list') +comissao_detail = (app_comissoes + ':comissao_detail') + +audiencia = (app_audiencia + ':audiencia') +reuniao_detail = (app_comissoes + ':reuniao_detail') + +materialegislativa_detail = (app_materia + ':materialegislativa_detail') +materialegislativa_list = (app_materia + ':pesquisar_materia') + +pauta_sessao_list = (app_sessao + ':pesquisar_pauta') +pauta_sessao_detail = (app_sessao + ':pauta_sessao_detail') +sessao_plenaria_list = (app_sessao + ':pesquisar_sessao') +sessao_plenaria_detail = (app_sessao + ':sessaoplenaria_detail') + +norma_juridica_detail = (app_norma + ':normajuridica_detail') +norma_juridica_pesquisa = (app_norma + ':norma_pesquisa') + +relatorios_list = (app_relatorios + ':relatorios_list') +relatorio_materia_por_tramitacao = (app_relatorios + ':materia_por_tramitacao') +relatorio_materia_por_autor = (app_relatorios + ':materia_por_autor') +relatorio_materia_por_ano_autor_tipo = ( + app_relatorios + ':materia_por_ano_autor_tipo') +historico_tramitacoes = (app_relatorios + ':historico_tramitacoes') + + +def has_iframe(url, request): + + iframe = request.GET.get( + 'iframe', + EMPTY_STRING) + if iframe: + iframe_qs = ("iframe=" + iframe) + url += ("&" if "?" in url else "?") + url += iframe_qs + + return url + + +class RedirecionaSAPLIndex(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url_pattern = 'sapl.base:sapl_index' + username = self.request.user.username + try: + self.logger.info("user=" + username + ". Tentando obter url.") + url = reverse(url_pattern) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(url_pattern) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaParlamentar(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + pk_parlamentar = self.request.GET.get( + 'cod_parlamentar', + EMPTY_STRING) + username = self.request.user.username + + if pk_parlamentar: + try: + kwargs = {'pk': pk_parlamentar} + self.logger.debug("user=" + username + + ". Tentando obter url correspondente.") + url = reverse(parlamentar_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(parlamentar_detail, kwargs=kwargs) + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(parlamentar_list) + except NoReverseMatch: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(parlamentar_list) + + numero_legislatura = self.request.GET.get( + 'hdn_num_legislatura', + EMPTY_STRING) + if numero_legislatura: + args = '?pk=' + numero_legislatura + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaComissao(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + pk_comissao = self.request.GET.get('cod_comissao', EMPTY_STRING) + username = self.request.user.username + + if pk_comissao: + kwargs = {'pk': pk_comissao} + + try: + self.logger.debug("user=" + username + + ". Tentando obter url correspondente.") + url = reverse(comissao_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(comissao_detail) + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(comissao_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(comissao_list) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaComposicaoComissao(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + pk_composicao = self.request.GET.get( + 'cod_periodo_comp_sel', EMPTY_STRING) + pk_comissao = self.request.GET.get('cod_comissao', EMPTY_STRING) + username = self.request.user.username + + if pk_comissao: + kwargs = {'pk': pk_comissao} + + try: + self.logger.debug("user=" + username + + ". Tentando obter url correspondente.") + url = reverse(comissao_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(comissao_detail) + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(comissao_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(comissao_list) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaPautaSessao(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + pk_sessao_plenaria = self.request.GET.get( + 'cod_sessao_plen', + EMPTY_STRING) + username = self.request.user.username + + if pk_sessao_plenaria: + kwargs = {'pk': pk_sessao_plenaria} + try: + self.logger.debug("user=" + username + + ". Tentando obter url correspondente.") + url = reverse(pauta_sessao_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(pauta_sessao_detail) + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(pauta_sessao_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(pauta_sessao_list) + + data_sessao_plenaria = self.request.GET.get( + 'dat_sessao_sel', + EMPTY_STRING) + + if data_sessao_plenaria: + dia_s_p, mes_s_p, ano_s_p = data_sessao_plenaria.split('/') + # Remove zeros à esquerda de dia_s_p e mes_s_p + dia_s_p = dia_s_p.lstrip("0") + mes_s_p = mes_s_p.lstrip("0") + args = EMPTY_STRING + args += "?data_inicio__year=%s" % (ano_s_p) + args += "&data_inicio__month=%s" % (mes_s_p) + args += "&data_inicio__day=%s" % (dia_s_p) + args += "&tipo=&salvar=Pesquisar" + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaSessaoPlenaria(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + pk_sessao_plenaria = self.request.GET.get( + 'cod_sessao_plen', + EMPTY_STRING) + url = EMPTY_STRING + username = self.request.user.username + if pk_sessao_plenaria: + kwargs = {'pk': pk_sessao_plenaria} + try: + self.logger.debug("user=" + username + + ". Tentando obter url correspondente.") + url = reverse(sessao_plenaria_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(sessao_plenaria_detail) + + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(sessao_plenaria_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(sessao_plenaria_list) + + year = self.request.GET.get( + 'ano_sessao_sel', + EMPTY_STRING) + month = self.request.GET.get( + 'mes_sessao_sel', + EMPTY_STRING) + day = self.request.GET.get( + 'dia_sessao_sel', + EMPTY_STRING) + tipo_sessao = self.request.GET.get( + 'tip_sessao_sel', + EMPTY_STRING) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args = EMPTY_STRING + args += "?data_inicio__year=%s" % (year) + args += "&data_inicio__month=%s" % (month) + args += "&data_inicio__day=%s" % (day) + args += "&tipo=%s&salvar=Pesquisar" % (tipo_sessao) + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaRelatoriosList(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(relatorios_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(relatorios_list) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaRelatoriosMateriasEmTramitacaoList(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(relatorio_materia_por_tramitacao) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(relatorio_materia_por_tramitacao) + + year = self.request.GET.get( + 'selAno', + EMPTY_STRING) + if year: + tramitacao_tipo = self.request.GET.get( + 'lst_tip_materia', + EMPTY_STRING) + tramitacao_unidade_local = self.request.GET.get( + 'lst_cod_unid_tram_dest', + EMPTY_STRING) + tramitacao_status = self.request.GET.get( + 'lst_status', + EMPTY_STRING) + salvar = self.request.GET.get( + 'btn_materia_pesquisar', + 'Pesquisar') + + tramitacao_tipo = tramitacao_tipo.lstrip("0") + tramitacao_unidade_local = tramitacao_unidade_local.lstrip("0") + tramitacao_status = tramitacao_status.lstrip("0") + + args = EMPTY_STRING + args += "?ano=%s" % (year) + args += "&tipo=%s" % (tramitacao_tipo) + args += "&tramitacao__unidade_tramitacao_local=%s" % ( + tramitacao_unidade_local) + args += "&tramitacao__status=%s" % (tramitacao_status) + args += "&salvar=%s" % (salvar) + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaMateriaLegislativaDetail(RedirectView): + permanent = True + + def get_redirect_url(self): + url = EMPTY_STRING + pk = self.request.GET.get('cod_materia', EMPTY_STRING) + + if pk: + kwargs = {'pk': pk} + url = reverse(materialegislativa_detail, kwargs=kwargs) + else: + url = reverse(materialegislativa_list) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaMateriaLegislativaList(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + args = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(materialegislativa_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(materialegislativa_list) + + tipo_materia = self.request.GET.get( + 'lst_tip_materia', + EMPTY_STRING) + numero_materia = self.request.GET.get( + 'txt_numero', + EMPTY_STRING) + ano_materia = self.request.GET.get( + 'txt_ano', + EMPTY_STRING) + num_protocolo_materia = self.request.GET.get( + 'txt_num_protocolo', + EMPTY_STRING) + periodo_inicial_apresentacao = self.request.GET.get( + 'dt_apres', + EMPTY_STRING) + periodo_final_apresentacao = self.request.GET.get( + 'dt_apres2', + EMPTY_STRING) + periodo_inicial_publicacao = self.request.GET.get( + 'dt_public', + EMPTY_STRING) + periodo_final_publicacao = self.request.GET.get( + 'dt_public2', + EMPTY_STRING) + tipo_autor = self.request.GET.get( + 'lst_tip_autor', + EMPTY_STRING) + ementa_materia = self.request.GET.get( + 'txt_assunto', + EMPTY_STRING) + tramitando = self.request.GET.get( + 'rad_tramitando', + EMPTY_STRING) + status_tramitacao = self.request.GET.get( + 'lst_status', + EMPTY_STRING) + + args += "?tipo=%s" % (tipo_materia) + args += "&numero=%s" % (numero_materia) + args += "&ano=%s" % (ano_materia) + args += "&numero_protocolo=%s" % (num_protocolo_materia) + args += "&data_apresentacao_0=%s" % (periodo_inicial_apresentacao) + args += "&data_apresentacao_1=%s" % (periodo_final_apresentacao) + args += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) + args += "&data_publicacao_1=%s" % (periodo_final_publicacao) + args += "&autoria__autor=%s" % (EMPTY_STRING) + args += "&autoria__autor__tipo=%s" % (tipo_autor) + args += "&relatoria__parlamentar_id=%s" % (EMPTY_STRING) + args += "&local_origem_externa=%s" % (EMPTY_STRING) + args += "&tramitacao__unidade_tramitacao_destino=%s" % (EMPTY_STRING) + args += "&tramitacao__status=%s" % (status_tramitacao) + args += "&em_tramitacao=%s" % (tramitando) + args += "&o=%s" % (EMPTY_STRING) + args += "&materiaassunto__assunto=%s" % (EMPTY_STRING) + args += "&ementa=%s" % (ementa_materia) + args += "&salvar=%s" % ('Pesquisar') # Default in both SAPL version + + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaMesaDiretoraView(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(parlamentar_mesa_diretora) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(parlamentar_mesa_diretora) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaNormasJuridicasDetail(RedirectView): + permanent = True + + def get_redirect_url(self): + url = EMPTY_STRING + pk_norma = self.request.GET.get('cod_norma', EMPTY_STRING) + + if pk_norma: + kwargs = {'pk': pk_norma} + url = reverse(norma_juridica_detail, kwargs=kwargs) + else: + url = reverse(norma_juridica_pesquisa) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaNormasJuridicasTextoIntegral(RedirectView): + permanent = False + logger = logging.getLogger(__name__) + + def get_redirect_url(self, **kwargs): + url = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug( + "user=" + username + ". Tentando obter NormaJuridica com pk={}.".format(kwargs['norma_id'])) + norma = NormaJuridica.objects.get(pk=kwargs['norma_id']) + if norma: + url = norma.texto_integral.url + except Exception as e: + self.logger.error( + "user=" + username + ". Erro ao obter NormaJuridica com pk={}. ".format(kwargs['norma_id']) + str(e)) + raise e + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaNormasJuridicasList(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + args = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(norma_juridica_pesquisa) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(norma_juridica_pesquisa) + + tipo_norma = self.request.GET.get( + 'lst_tip_norma', + EMPTY_STRING) + numero_norma = self.request.GET.get( + 'txt_numero', + EMPTY_STRING) + ano_norma = self.request.GET.get( + 'txt_ano', + EMPTY_STRING) + periodo_inicial_aprovacao = self.request.GET.get( + 'dt_norma', + EMPTY_STRING) + periodo_final_aprovacao = self.request.GET.get( + 'dt_norma2', + EMPTY_STRING) + periodo_inicial_publicacao = self.request.GET.get( + 'dt_public', + EMPTY_STRING) + periodo_final_publicacao = self.request.GET.get( + 'dt_public2', + EMPTY_STRING) + ementa_norma = self.request.GET.get( + 'txt_assunto', + EMPTY_STRING) + assuntos_norma = self.request.GET.get( + 'lst_assunto_norma', + EMPTY_STRING) + + args += "?tipo=%s" % (tipo_norma) + args += "&numero=%s" % (numero_norma) + args += "&ano=%s" % (ano_norma) + args += "&data_0=%s" % (periodo_inicial_aprovacao) + args += "&data_1=%s" % (periodo_final_aprovacao) + args += "&data_publicacao_0=%s" % (periodo_inicial_publicacao) + args += "&data_publicacao_1=%s" % (periodo_final_publicacao) + args += "&ementa=%s" % (ementa_norma) + args += "&assuntos=%s" % (assuntos_norma) + args += "&salvar=%s" % ('Pesquisar') # Default in both SAPL version + + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaHistoricoTramitacoesList(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + args = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(historico_tramitacoes) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(historico_tramitacoes) + + inicio_intervalo_data_tramitacao = self.request.GET.get( + 'txt_dat_inicio_periodo', + EMPTY_STRING + ).lstrip("0") + fim_intervalo_data_tramitacao = self.request.GET.get( + 'txt_dat_fim_periodo', + EMPTY_STRING + ).lstrip("0") + tipo_materia = self.request.GET.get( + 'lst_tip_materia', + EMPTY_STRING + ).lstrip("0") + unidade_local_tramitacao = self.request.GET.get( + 'lst_cod_unid_tram_dest', + EMPTY_STRING + ).lstrip("0") + status_tramitacao = self.request.GET.get( + 'lst_status', + EMPTY_STRING + ).lstrip("0") + + if ( + (inicio_intervalo_data_tramitacao != EMPTY_STRING) or + (fim_intervalo_data_tramitacao != EMPTY_STRING) or + (tipo_materia != EMPTY_STRING) or + (unidade_local_tramitacao != EMPTY_STRING) or + (status_tramitacao != EMPTY_STRING)): + + args += "?tramitacao__data_tramitacao_0=%s" % ( + inicio_intervalo_data_tramitacao) + args += "&tramitacao__data_tramitacao_1=%s" % ( + fim_intervalo_data_tramitacao) + args += "&tipo=%s" % (tipo_materia) + args += "&tramitacao__unidade_tramitacao_local=%s" % ( + unidade_local_tramitacao) + args += "&tramitacao__status=%s" % (status_tramitacao) + args += "&salvar=%s" % ('Pesquisar') + + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaAtasList(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + args = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(pesquisar_atas) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(pesquisar_atas) + + inicio_intervalo_data_ata = self.request.GET.get( + 'txt_dat_inicio', + EMPTY_STRING + ).lstrip("0") + fim_intervalo_data_ata = self.request.GET.get( + 'txt_dat_fim', + EMPTY_STRING + ).lstrip("0") + + args += "?data_inicio_0=%s" % ( + inicio_intervalo_data_ata) + args += "&data_inicio_1=%s" % ( + fim_intervalo_data_ata) + args += "&salvar=%s" % ('Pesquisar') + + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaPresencaParlamentares(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + args = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(presenca_sessao) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(presenca_sessao) + + inicio_intervalo_data_presenca_parlamentar = self.request.GET.get( + 'txt_dat_inicio', + EMPTY_STRING + ).lstrip("0") + fim_intervalo_data_presenca_parlamentar = self.request.GET.get( + 'txt_dat_fim', + EMPTY_STRING + ).lstrip("0") + + args += "?data_inicio_0=%s" % ( + inicio_intervalo_data_presenca_parlamentar) + args += "&data_inicio_1=%s" % ( + fim_intervalo_data_presenca_parlamentar) + args += "&salvar=%s" % ('Pesquisar') + + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaMateriasPorAutor(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + url = EMPTY_STRING + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(relatorio_materia_por_autor) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(relatorio_materia_por_autor) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaMateriasPorAnoAutorTipo(RedirectView): + + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + url = EMPTY_STRING + ano = self.request.GET.get('ano', '') + username = self.request.user.username + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(relatorio_materia_por_ano_autor_tipo) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(relatorio_materia_por_ano_autor_tipo) + + if ano: + args = "?ano=%s" % (ano) + args += "&salvar=%s" % ('Pesquisar') + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url + + +class RedirecionaReuniao(RedirectView): + permanent = True + logger = logging.getLogger(__name__) + + def get_redirect_url(self): + + pk_reuniao = self.request.GET.get( + 'cod_comissao', + EMPTY_STRING) + url = EMPTY_STRING + username = self.request.user.username + if pk_reuniao: + kwargs = {'pk': pk_reuniao} + try: + self.logger.debug( + "user=" + username + ". Tentando obter url correspondente (pk={}).".format(kwargs['pk'])) + url = reverse(reuniao_detail, kwargs=kwargs) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(reuniao_detail) + + else: + try: + self.logger.debug("user=" + username + ". Tentando obter url.") + url = reverse(reuniao_list) + except NoReverseMatch as e: + self.logger.error("user=" + username + + ". Erro ao obter url. " + str(e)) + raise UnknownUrlNameError(reuniao_list) + + year = self.request.GET.get( + 'ano_reuniao', + EMPTY_STRING) + month = self.request.GET.get( + 'mes_reuniao', + EMPTY_STRING) + day = self.request.GET.get( + 'dia_reuniao', + EMPTY_STRING) + tipo_reuniao = self.request.GET.get( + 'tip_reuniao', + EMPTY_STRING) + + # Remove zeros à esquerda + day = day.lstrip("0") + month = month.lstrip("0") + args = EMPTY_STRING + args += "?data_inicio__year=%s" % (year) + args += "&data_inicio__month=%s" % (month) + args += "&data_inicio__day=%s" % (day) + args += "&tipo=%s&salvar=Pesquisar" % (tipo_reuniao) + url = "%s%s" % (url, args) + + url = has_iframe(url, self.request) + + return url diff --git a/sapl/settings.py b/sapl/settings.py index 77721488b..c23acd084 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -61,6 +61,7 @@ SAPL_APPS = ( 'sapl.lexml', 'sapl.painel', 'sapl.protocoloadm', + 'sapl.redireciona_urls', 'sapl.compilacao', 'sapl.api', 'sapl.rules' diff --git a/sapl/test_urls.py b/sapl/test_urls.py index 3d317821a..b01baec1b 100644 --- a/sapl/test_urls.py +++ b/sapl/test_urls.py @@ -175,6 +175,30 @@ apps_url_patterns_prefixs_and_users = { '/ta', '/sistema/ta', ]}, + 'redireciona_urls': { + 'prefixs': [ + '/default_index_html', + '/consultas/parlamentar/parlamentar_', + '/consultas/comissao/comissao_', + '/consultas/pauta_sessao/pauta_sessao_', + '/consultas/sessao_plenaria/', + + '/relatorios_administrativos/' + 'relatorios_administrativos_index_html', + + '/tramitacaoMaterias/tramitacaoMaterias', + '/tramitacaoMaterias/materia_mostrar_proc', + '/generico/materia_pesquisar_', + '/consultas/mesa_diretora/mesa_diretora_index_html', + '/consultas/mesa_diretora/parlamentar/parlamentar_', + '/generico/norma_juridica_pesquisar_', + '/consultas/norma_juridica/norma_juridica_mostrar_proc', + '/historicoTramitacoes/historicoTramitacoes', + '/atasSessao', + '/presencaSessao', + '/resumoPropositurasAutor', + '/propositurasAnoAutorTipo', + ]}, 'lexml': { 'prefixs': [ '/lexml', @@ -274,6 +298,9 @@ def test_urlpatterns(url_item, admin_client): Os prefixos permitidos são: %s """ % (url, app_name, prefixs) + else: + # ignorando app de redirecionamento de urls no padrão do SAPL 2.5 + pass urls_publicas_excecoes = { diff --git a/sapl/urls.py b/sapl/urls.py index 8cf280019..0481a246b 100644 --- a/sapl/urls.py +++ b/sapl/urls.py @@ -32,6 +32,7 @@ import sapl.norma.urls import sapl.painel.urls import sapl.parlamentares.urls import sapl.protocoloadm.urls +import sapl.redireciona_urls.urls import sapl.relatorios.urls import sapl.sessao.urls @@ -63,6 +64,8 @@ urlpatterns += [ url(r'^favicon\.ico$', RedirectView.as_view( url='/static/sapl/img/favicon.ico', permanent=True)), + url(r'', include(sapl.redireciona_urls.urls)), + path("robots.txt", TemplateView.as_view( template_name="robots.txt", content_type="text/plain")), From a551ae7095fdd9c07f0917b733e5e988cd699488 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Wed, 30 Aug 2023 19:53:27 -0300 Subject: [PATCH 76/80] fix: verifica se existe dispositivo atualizador ao tentar montar nota alteracao (#3669) Co-authored-by: joao --- sapl/compilacao/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index 931db7cfd..9afbe3201 100644 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -1392,7 +1392,7 @@ class TextEditView(CompMixin, TemplateView): return r def nota_alteracao(self, dispositivo, lista_ta_publicado): - if dispositivo.ta_publicado_id: + if dispositivo.ta_publicado_id and dispositivo.dispositivo_atualizador: d = dispositivo.dispositivo_atualizador.dispositivo_pai if d.auto_inserido: From 0d280006d371d460db018523230cee4b717b048a Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Wed, 30 Aug 2023 19:56:12 -0300 Subject: [PATCH 77/80] feat: adiciona filtro de autor no relatorio de tramitacao com data fim de prazo (#3671) fix: adiciona filtro de autor no relatorio de tramitacao com data fim de prazo Co-authored-by: joao --- sapl/relatorios/forms.py | 11 +++++++++-- sapl/relatorios/views.py | 7 +++++++ .../RelatorioDataFimPrazoTramitacao_filter.html | 3 ++- .../relatorios/relatorio_fim_prazo_tramitacao.html | 3 ++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sapl/relatorios/forms.py b/sapl/relatorios/forms.py index 8ac7eca02..59eb2d741 100644 --- a/sapl/relatorios/forms.py +++ b/sapl/relatorios/forms.py @@ -305,6 +305,10 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): materia__ano = django_filters.ChoiceFilter(required=False, label='Ano da Matéria', choices=choice_anos_com_materias) + # materia__autores = django_filters.CharFilter(widget=forms.HiddenInput()) + materia__autores = django_filters.ModelChoiceFilter( + label='Autor da Matéria', + queryset=Autor.objects.all(), field_name='materia__autores') @property def qs(self): @@ -317,7 +321,8 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): 'tramitacao__unidade_tramitacao_local', 'tramitacao__unidade_tramitacao_destino', 'tramitacao__status', - 'tramitacao__data_fim_prazo'] + 'tramitacao__data_fim_prazo', + 'materia__autores'] def __init__(self, *args, **kwargs): super(RelatorioDataFimPrazoTramitacaoFilterSet, self).__init__( @@ -328,6 +333,7 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): 'tramitacao__unidade_tramitacao_local'].label = 'Unidade Local (Origem)' self.filters['tramitacao__unidade_tramitacao_destino'].label = 'Unidade Destino' self.filters['tramitacao__status'].label = 'Status de tramitação' + self.filters['materia__autores'].label = 'Autor da Matéria' row1 = to_row([('materia__ano', 12)]) row2 = to_row([('tramitacao__data_fim_prazo', 12)]) @@ -336,6 +342,7 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): row4 = to_row( [('materia__tipo', 6), ('tramitacao__status', 6)]) + row5 = to_row([('materia__autores', 12)]) buttons = FormActions( *[ @@ -355,7 +362,7 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet): self.form.helper.form_method = 'GET' self.form.helper.layout = Layout( Fieldset(_('Tramitações'), - row1, row2, row3, row4, + row1, row2, row3, row4, row5, buttons, ) ) diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index ccc88b86c..98cc47442 100755 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -2171,6 +2171,12 @@ class RelatorioDataFimPrazoTramitacaoView(RelatorioMixin, FilterView): else: context['tipo'] = '' + if self.request.GET['materia__autores']: + autor = int(self.request.GET['materia__autores']) + context['materia__autor'] = (str(Autor.objects.get(id=autor))) + else: + context['materia__autor'] = '' + if self.request.GET['tramitacao__status']: tramitacao_status = self.request.GET['tramitacao__status'] context['tramitacao__status'] = ( @@ -2630,6 +2636,7 @@ class RelatorioNormasVigenciaView(RelatorioMixin, FilterView): return context + class RelatorioHistoricoTramitacaoAdmView(RelatorioMixin, FilterView): model = DocumentoAdministrativo filterset_class = RelatorioHistoricoTramitacaoAdmFilterSet diff --git a/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html b/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html index 953169f7c..017399252 100644 --- a/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html +++ b/sapl/templates/relatorios/RelatorioDataFimPrazoTramitacao_filter.html @@ -17,7 +17,8 @@  Tipo de matéria: {{ tipo }}
 Status de tramitação: {{ tramitacao__status }}
 Local de origem: {{ tramitacao__unidade_tramitacao_local }}
-  Local de destino: {{ tramitacao__unidade_tramitacao_destino }}


+  Local de destino: {{ tramitacao__unidade_tramitacao_destino }}
+  Autor: {{ materia__autor }}


{% if object_list %} {% if object_list|length == 1 %}

Foi encontrada 1 matéria com esses parâmetros.



diff --git a/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html b/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html index da4172b0b..3bee7c7a6 100644 --- a/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html +++ b/sapl/templates/relatorios/relatorio_fim_prazo_tramitacao.html @@ -11,7 +11,8 @@  Tipo de matéria: {{ tipo }}
 Status atual: {{ tramitacao__status }}
 Local de origem: {{ tramitacao__unidade_tramitacao_local }}
-  Local de destino: {{ tramitacao__unidade_tramitacao_destino }}


+  Local de destino: {{ tramitacao__unidade_tramitacao_destino }}
+  Autor: {{ materia__autor }}


{% if object_list %} {% if object_list|length == 1 %}

Foi encontrada 1 matéria com esses parâmetros.



From 4cf5aac2ca88902608e87f7492a09beacd785cf2 Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Wed, 30 Aug 2023 23:04:00 -0300 Subject: [PATCH 78/80] fix: restring acesso ao prometheus metrics para apenas ips locais/invalidos (#3668) Co-authored-by: joao --- sapl/endpoint_restriction_middleware.py | 38 +++++++++++++++++++++++++ sapl/settings.py | 1 + 2 files changed, 39 insertions(+) create mode 100644 sapl/endpoint_restriction_middleware.py diff --git a/sapl/endpoint_restriction_middleware.py b/sapl/endpoint_restriction_middleware.py new file mode 100644 index 000000000..b815b4a2e --- /dev/null +++ b/sapl/endpoint_restriction_middleware.py @@ -0,0 +1,38 @@ +from django.http import HttpResponseForbidden +import logging + +# lista de IPs permitidos (localhost, redes locais, etc) +# https://en.wikipedia.org/wiki/Reserved_IP_addresses +ALLOWED_IPS = [ + '127.0.0.1', + '::1', + '10.0.0.0/8', + '172.16.0.0/12', + '192.168.0.0/16', + 'fc00::/7', + '::1', + 'fe80::/10', + '192.0.2.0/24', + '2001:db8::/32', + '224.0.0.0/4', + 'ff00::/8' +] + +RESTRICTED_ENDPOINTS = ['/metrics'] + + +class EndpointRestrictionMiddleware: + logging.getLogger(__name__) + + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + # IP do cliente + client_ip = request.META.get('REMOTE_ADDR') + + # bloqueia acesso a endpoints restritos para IPs nao permitidos + if request.path in RESTRICTED_ENDPOINTS and client_ip not in ALLOWED_IPS: + return HttpResponseForbidden('Acesso proibido') + + return self.get_response(request) diff --git a/sapl/settings.py b/sapl/settings.py index c23acd084..ba143ca12 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -129,6 +129,7 @@ MIDDLEWARE = [ 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', + 'sapl.endpoint_restriction_middleware.EndpointRestrictionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', From 27d2595ada2082ac13d69ebddd3eafcf6c8d5f0d Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Sun, 10 Sep 2023 21:26:27 -0300 Subject: [PATCH 79/80] =?UTF-8?q?Conserta=20bug=20em=20relat=C3=B3rios=20c?= =?UTF-8?q?om=20emenda=20longa.=20(#3674)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conserta bug em relatórios com emenda larga --- sapl/static/sapl/css/relatorio.css | 5 +++++ sapl/templates/relatorios/relatorio_pauta_sessao.html | 9 +++++++-- .../sessao/blocos_resumo/materias_ordem_dia.html | 1 - sapl/templates/sessao/pauta_sessao_detail.html | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sapl/static/sapl/css/relatorio.css b/sapl/static/sapl/css/relatorio.css index c3489dfe2..0dcbd8061 100644 --- a/sapl/static/sapl/css/relatorio.css +++ b/sapl/static/sapl/css/relatorio.css @@ -58,6 +58,7 @@ fieldset { table { + table-layout: fixed; max-width: 520px; } table.grayTable { @@ -69,6 +70,10 @@ table.grayTable { table.grayTable td, table.grayTable th { border: 1px solid #000000; padding: 5px; + overflow-wrap: break-word; + word-wrap: break-word; + text-align: justify; + vertical-align: top; } table.grayTable tbody td { font-size: 10px; diff --git a/sapl/templates/relatorios/relatorio_pauta_sessao.html b/sapl/templates/relatorios/relatorio_pauta_sessao.html index a0c531e40..70fd30e52 100644 --- a/sapl/templates/relatorios/relatorio_pauta_sessao.html +++ b/sapl/templates/relatorios/relatorio_pauta_sessao.html @@ -6,12 +6,17 @@ {% block content %}

Identificação Básica

@@ -19,7 +24,7 @@ {{ b }}
{% endfor %}

Correspondências

- +
{% for c in correspondencias%} diff --git a/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html b/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html index ecd454693..bc7e57635 100644 --- a/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html +++ b/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html @@ -1,4 +1,3 @@ - {% load common_tags %} {% if materias_ordem %}
diff --git a/sapl/templates/sessao/pauta_sessao_detail.html b/sapl/templates/sessao/pauta_sessao_detail.html index ce0ed05f1..b4f0ffb44 100644 --- a/sapl/templates/sessao/pauta_sessao_detail.html +++ b/sapl/templates/sessao/pauta_sessao_detail.html @@ -1,6 +1,6 @@ {% extends "crud/detail.html" %} {% load i18n %} -{% load crispy_forms_tags %} +{% load crispy_forms_tags common_tags%} {% block base_content %} @@ -64,7 +64,7 @@ Autor{{ m.autor|length|pluralize:"es" }}: {{ m.autor|join:', ' }}
@@ -89,7 +89,7 @@ Autor{{ m.autor|length|pluralize:"es" }}: {{ m.autor|join:', ' }} From d2d9480d699ee1d14a56e0aa517c4233541ab6b4 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Wed, 13 Sep 2023 18:33:34 -0300 Subject: [PATCH 80/80] Release: 3.1.163-RC16 --- CHANGES.md | 9 +++++++++ docker/docker-compose.yaml | 2 +- sapl/settings.py | 2 +- sapl/templates/base.html | 2 +- setup.py | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9a3b6fafb..cc23cbaee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,13 @@ +3.1.163-RC16 / 2023-09-13 +========================= + + * Conserta bug em relatórios com emenda longa. (#3674) + * fix: restring acesso ao prometheus metrics para apenas ips locais/invalidos (#3668) + * feat: adiciona filtro de autor no relatorio de tramitacao com data fim de prazo (#3671) + * fix: verifica se existe dispositivo atualizador ao tentar montar nota alteracao (#3669) + * Revert "Remove redirect de URLs (#3652)" + 3.1.163-RC15 / 2023-08-11 ========================= diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index fdd3a574f..5bae23442 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -32,7 +32,7 @@ services: networks: - sapl-net sapl: - image: interlegis/sapl:3.1.163-RC15 + image: interlegis/sapl:3.1.163-RC16 # build: # context: ../ # dockerfile: ./docker/Dockerfile diff --git a/sapl/settings.py b/sapl/settings.py index ba143ca12..df4d98283 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,7 +41,7 @@ ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login/?next=' -SAPL_VERSION = '3.1.163-RC15' +SAPL_VERSION = '3.1.163-RC16' if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/sapl/templates/base.html b/sapl/templates/base.html index 13a2429b0..8e51c7759 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -194,7 +194,7 @@ Desenvolvido pelo Interlegis em software livre e aberto. - Release: 3.1.163-RC15 + Release: 3.1.163-RC16

diff --git a/setup.py b/setup.py index cff32dc7d..ac8c296fd 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ install_requires = [ ] setup( name='interlegis-sapl', - version='3.1.163-RC15', + version='3.1.163-RC16', packages=find_packages(), include_package_data=True, license='GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007',
- {{m.ementa|safe}} + {{m.ementa|dont_break_out}} {% if m.observacao %}

Obs.: {{m.observacao}} {% endif %}
{{m.situacao|linebreaksbr|safe}} - {{m.ementa|safe}} + {{m.ementa|dont_break_out}} {% if m.observacao %}

Obs.: {{m.observacao}} {% endif %}
{{m.situacao|linebreaksbr|safe}}