Browse Source

2968 pesquisar proposicao por data (#3001)

* Criado webservice de recuperar proposicao

* Fixes #2968 Alterando webservice para filtrar por data

* Criado webservice de recuperar proposicao

* adicionando modal para pesquisar codigo de proposicao por data

* adicionando front para pesquisa de proposicao por data

* alterando permissao e tratando possivel excessao

* Inserindo mascara para data translucida

* Criado webservice de recuperar proposicao

* Criado webservice de recuperar proposicao

* Fixes #2968 Alterando webservice para filtrar por data

* adicionando modal para pesquisar codigo de proposicao por data

* adicionando front para pesquisa de proposicao por data

* alterando permissao e tratando possivel excessao

* Inserindo mascara para data translucida

* Update sapl/materia/forms.py

Co-Authored-By: Cesar Augusto de Carvalho <cesaraugc@gmail.com>

* Update sapl/materia/views.py

Co-Authored-By: Cesar Augusto de Carvalho <cesaraugc@gmail.com>

* Update sapl/utils.py

Co-Authored-By: Cesar Augusto de Carvalho <cesaraugc@gmail.com>

* Update sapl/utils.py

Co-Authored-By: Cesar Augusto de Carvalho <cesaraugc@gmail.com>

* adicionando webpack

* Delete chunk-31d76f93.7e9bcf20.css

* Delete chunk-681dd124.34410740.css

* Delete chunk-vendors.c215cd7a.css

* Delete webpack-stats.json

* Delete online.fb9113a5.js

* Delete global.b599eee0.js

* Delete compilacao.0f64c6e5.js

* Delete global.3b8f6afb.css

* Remove frontend files

* add webpack-stats

* Atualiza VueJS
pull/3163/head
Ricardo Lima Canela 5 years ago
committed by Edward
parent
commit
6c1d1e1102
  1. 16
      sapl/materia/forms.py
  2. 4
      sapl/materia/urls.py
  3. 18
      sapl/materia/views.py
  4. 0
      sapl/static/sapl/frontend/css/chunk-31d76f93.7e9bcf20.css
  5. 0
      sapl/static/sapl/frontend/css/chunk-31d76f93.7e9bcf20.css.gz
  6. 0
      sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css
  7. 0
      sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css.gz
  8. 0
      sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css
  9. 0
      sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css.gz
  10. 0
      sapl/static/sapl/frontend/css/global.3b8f6afb.css
  11. 0
      sapl/static/sapl/frontend/css/global.3b8f6afb.css.gz
  12. 2
      sapl/static/sapl/frontend/js/chunk-vendors.24ea266c.js
  13. BIN
      sapl/static/sapl/frontend/js/chunk-vendors.24ea266c.js.gz
  14. 0
      sapl/static/sapl/frontend/js/compilacao.f85808e4.js
  15. 0
      sapl/static/sapl/frontend/js/compilacao.f85808e4.js.gz
  16. 7
      sapl/static/sapl/frontend/js/global.3df943f5.js
  17. BIN
      sapl/static/sapl/frontend/js/global.3df943f5.js.gz
  18. 7
      sapl/static/sapl/frontend/js/global.af074d20.js
  19. BIN
      sapl/static/sapl/frontend/js/global.af074d20.js.gz
  20. BIN
      sapl/static/sapl/frontend/js/online.0f0e1e97.js.gz
  21. 2
      sapl/static/sapl/frontend/js/online.36999bd0.js
  22. BIN
      sapl/static/sapl/frontend/js/online.36999bd0.js.gz
  23. 0
      sapl/static/sapl/frontend/js/painel.fcb12a07.js
  24. 0
      sapl/static/sapl/frontend/js/painel.fcb12a07.js.gz
  25. BIN
      sapl/static/sapl/frontend/js/sessao.20b23ff0.js.gz
  26. 2
      sapl/static/sapl/frontend/js/sessao.2833f62a.js
  27. BIN
      sapl/static/sapl/frontend/js/sessao.2833f62a.js.gz
  28. 13
      sapl/utils.py
  29. 2
      sapl/webpack-stats.json

16
sapl/materia/forms.py

@ -40,11 +40,11 @@ from sapl.norma.models import (LegislacaoCitada, NormaJuridica,
from sapl.parlamentares.models import Legislatura, Partido, Parlamentar from sapl.parlamentares.models import Legislatura, Partido, Parlamentar
from sapl.protocoloadm.models import (Anexado, DocumentoAdministrativo, from sapl.protocoloadm.models import (Anexado, DocumentoAdministrativo,
Protocolo) Protocolo)
from sapl.utils import (autor_label, autor_modal, from sapl.settings import MAX_DOC_UPLOAD_SIZE
ChoiceWithoutValidationField, from sapl.utils import (ChoiceWithoutValidationField, choice_anos_com_materias,
choice_anos_com_materias, FileFieldCheckMixin, FileFieldCheckMixin, FilterOverridesMetaMixin,
FilterOverridesMetaMixin, gerar_hash_arquivo,
lista_anexados, MateriaPesquisaOrderingFilter, lista_anexados, MateriaPesquisaOrderingFilter,
autor_label, autor_modal, gerar_hash_arquivo, proposicao_modal,
models_with_gr_for_model, qs_override_django_filter, models_with_gr_for_model, qs_override_django_filter,
RangeWidgetOverride, SEPARADOR_HASH_PROPOSICAO, RangeWidgetOverride, SEPARADOR_HASH_PROPOSICAO,
validar_arquivo, YES_NO_CHOICES) validar_arquivo, YES_NO_CHOICES)
@ -115,10 +115,16 @@ class ReceberProposicaoForm(Form):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
row1 = to_row([('cod_hash', 12)]) row1 = to_row([('cod_hash', 12)])
row2 = to_row(
[(Button('pesquisar-cod-proposicao',
'Pesquisar Código de Proposições por Data',
css_class='btn btn-primary btn-sm'), 4)
])
self.helper = SaplFormHelper() self.helper = SaplFormHelper()
self.helper.layout = Layout( self.helper.layout = Layout(
Fieldset( Fieldset(
_('Incorporar Proposição'), row1, _('Incorporar Proposição'), row1, row2,
HTML(proposicao_modal),
form_actions(label='Buscar Proposição') form_actions(label='Buscar Proposição')
) )
) )

4
sapl/materia/urls.py

@ -24,7 +24,7 @@ from sapl.materia.views import (AcompanhamentoConfirmarView,
TipoFimRelatoriaCrud, TipoMateriaCrud, TipoFimRelatoriaCrud, TipoMateriaCrud,
TipoProposicaoCrud, TramitacaoCrud, TipoProposicaoCrud, TramitacaoCrud,
TramitacaoEmLoteView, UnidadeTramitacaoCrud, TramitacaoEmLoteView, UnidadeTramitacaoCrud,
proposicao_texto, recuperar_materia, proposicao_texto, recuperar_materia, recuperar_proposicao,
ExcluirTramitacaoEmLoteView, RetornarProposicao, ExcluirTramitacaoEmLoteView, RetornarProposicao,
MateriaPesquisaSimplesView, MateriaPesquisaSimplesView,
DespachoInicialMultiCreateView, DespachoInicialMultiCreateView,
@ -91,6 +91,8 @@ urlpatterns_materia = [
url(r'^materia/(?P<pk>[0-9]+)/ta$', url(r'^materia/(?P<pk>[0-9]+)/ta$',
MateriaTaView.as_view(), name='materia_ta'), MateriaTaView.as_view(), name='materia_ta'),
url(r'^materia/recuperar-proposicao',
recuperar_proposicao, name='recuperar_proposicao'),
url(r'^materia/pesquisar-materia$', url(r'^materia/pesquisar-materia$',
MateriaLegislativaPesquisaView.as_view(), name='pesquisar_materia'), MateriaLegislativaPesquisaView.as_view(), name='pesquisar_materia'),

18
sapl/materia/views.py

@ -319,6 +319,24 @@ class ProposicaoTaView(IntegracaoTaView):
else: else:
return self.get_redirect_deactivated() return self.get_redirect_deactivated()
@permission_required('materia.detail_proposicao')
def recuperar_proposicao(request):
data = request.GET.get('data')
proposicoes = Proposicao.objects.filter(
data_envio__date=datetime.strptime(data, '%Y-%m-%d').date(),
data_envio__isnull=False,
data_recebimento__isnull=True,
data_devolucao__isnull=True
)
hash_codes = []
for proposicao in proposicoes:
hash_code = gerar_hash_arquivo(proposicao.texto_original.path, str(proposicao.pk))
hash_codes.append(hash_code)
response = JsonResponse({'hash_codes': hash_codes})
return response
@permission_required('materia.detail_materialegislativa') @permission_required('materia.detail_materialegislativa')
def recuperar_materia(request): def recuperar_materia(request):

0
sapl/static/sapl/frontend/css/chunk-31d76f93.e4d239ee.css → sapl/static/sapl/frontend/css/chunk-31d76f93.7e9bcf20.css

0
sapl/static/sapl/frontend/css/chunk-31d76f93.e4d239ee.css.gz → sapl/static/sapl/frontend/css/chunk-31d76f93.7e9bcf20.css.gz

0
sapl/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css → sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css

0
sapl/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css.gz → sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css.gz

0
sapl/static/sapl/frontend/css/chunk-vendors.c41142f2.css → sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css

0
sapl/static/sapl/frontend/css/chunk-vendors.c41142f2.css.gz → sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css.gz

0
sapl/static/sapl/frontend/css/global.a77827ad.css → sapl/static/sapl/frontend/css/global.3b8f6afb.css

0
sapl/static/sapl/frontend/css/global.a77827ad.css.gz → sapl/static/sapl/frontend/css/global.3b8f6afb.css.gz

2
sapl/static/sapl/frontend/js/chunk-vendors.dfcd310b.js → sapl/static/sapl/frontend/js/chunk-vendors.24ea266c.js

File diff suppressed because one or more lines are too long

BIN
sapl/static/sapl/frontend/js/chunk-vendors.dfcd310b.js.gz → sapl/static/sapl/frontend/js/chunk-vendors.24ea266c.js.gz

Binary file not shown.

0
sapl/static/sapl/frontend/js/compilacao.0684a9a9.js → sapl/static/sapl/frontend/js/compilacao.f85808e4.js

0
sapl/static/sapl/frontend/js/compilacao.0684a9a9.js.gz → sapl/static/sapl/frontend/js/compilacao.f85808e4.js.gz

7
sapl/static/sapl/frontend/js/global.3df943f5.js

File diff suppressed because one or more lines are too long

BIN
sapl/static/sapl/frontend/js/global.3df943f5.js.gz

Binary file not shown.

7
sapl/static/sapl/frontend/js/global.af074d20.js

File diff suppressed because one or more lines are too long

BIN
sapl/static/sapl/frontend/js/global.af074d20.js.gz

Binary file not shown.

BIN
sapl/static/sapl/frontend/js/online.0f0e1e97.js.gz

Binary file not shown.

2
sapl/static/sapl/frontend/js/online.0f0e1e97.js → sapl/static/sapl/frontend/js/online.36999bd0.js

File diff suppressed because one or more lines are too long

BIN
sapl/static/sapl/frontend/js/online.36999bd0.js.gz

Binary file not shown.

0
sapl/static/sapl/frontend/js/painel.f7b68b0b.js → sapl/static/sapl/frontend/js/painel.fcb12a07.js

0
sapl/static/sapl/frontend/js/painel.f7b68b0b.js.gz → sapl/static/sapl/frontend/js/painel.fcb12a07.js.gz

BIN
sapl/static/sapl/frontend/js/sessao.20b23ff0.js.gz

Binary file not shown.

2
sapl/static/sapl/frontend/js/sessao.20b23ff0.js → sapl/static/sapl/frontend/js/sessao.2833f62a.js

File diff suppressed because one or more lines are too long

BIN
sapl/static/sapl/frontend/js/sessao.2833f62a.js.gz

Binary file not shown.

13
sapl/utils.py

@ -136,6 +136,19 @@ autor_modal = '''
</div> </div>
''' '''
proposicao_modal = '''
<div id="modal_proposicao" title="Selecione a data da Proposicao" align="center">
<form>
<input id="q" type="date" placeholder="__/__/____"
class="form-control hasDatepicker" maxlength="10" >
<input id="pesquisar-proposicao" type="submit" value="Pesquisar"
class="btn btn-primary btn-sm"/>
</form>
<div id="div-resultado"></div>
<input type="submit" id="selecionar" value="Selecionar"
hidden="true" />
</div>
'''
def montar_row_autor(name): def montar_row_autor(name):
autor_row = to_row( autor_row = to_row(

2
sapl/webpack-stats.json

@ -1 +1 @@
{"status":"done","publicPath":"/static/sapl/frontend/","chunks":{"null":[{"name":"css/chunk-681dd124.3d0928b2.css","publicPath":"/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css","path":"../sapl/sapl/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css"},{"name":"js/chunk-681dd124.08a628b0.js","publicPath":"/static/sapl/frontend/js/chunk-681dd124.08a628b0.js","path":"../sapl/sapl/static/sapl/frontend/js/chunk-681dd124.08a628b0.js"},{"name":"css/chunk-681dd124.3d0928b2.css.map","publicPath":"/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css.map","path":"../sapl/sapl/static/sapl/frontend/css/chunk-681dd124.3d0928b2.css.map"}],"chunk-vendors":[{"name":"css/chunk-vendors.c41142f2.css","publicPath":"/static/sapl/frontend/css/chunk-vendors.c41142f2.css","path":"../sapl/sapl/static/sapl/frontend/css/chunk-vendors.c41142f2.css"},{"name":"js/chunk-vendors.dfcd310b.js","publicPath":"/static/sapl/frontend/js/chunk-vendors.dfcd310b.js","path":"../sapl/sapl/static/sapl/frontend/js/chunk-vendors.dfcd310b.js"},{"name":"css/chunk-vendors.c41142f2.css.map","publicPath":"/static/sapl/frontend/css/chunk-vendors.c41142f2.css.map","path":"../sapl/sapl/static/sapl/frontend/css/chunk-vendors.c41142f2.css.map"}],"compilacao":[{"name":"css/compilacao.eff62463.css","publicPath":"/static/sapl/frontend/css/compilacao.eff62463.css","path":"../sapl/sapl/static/sapl/frontend/css/compilacao.eff62463.css"},{"name":"js/compilacao.0684a9a9.js","publicPath":"/static/sapl/frontend/js/compilacao.0684a9a9.js","path":"../sapl/sapl/static/sapl/frontend/js/compilacao.0684a9a9.js"},{"name":"css/compilacao.eff62463.css.map","publicPath":"/static/sapl/frontend/css/compilacao.eff62463.css.map","path":"../sapl/sapl/static/sapl/frontend/css/compilacao.eff62463.css.map"}],"global":[{"name":"css/global.a77827ad.css","publicPath":"/static/sapl/frontend/css/global.a77827ad.css","path":"../sapl/sapl/static/sapl/frontend/css/global.a77827ad.css"},{"name":"js/global.3df943f5.js","publicPath":"/static/sapl/frontend/js/global.3df943f5.js","path":"../sapl/sapl/static/sapl/frontend/js/global.3df943f5.js"},{"name":"css/global.a77827ad.css.map","publicPath":"/static/sapl/frontend/css/global.a77827ad.css.map","path":"../sapl/sapl/static/sapl/frontend/css/global.a77827ad.css.map"}],"online":[{"name":"css/online.b7332556.css","publicPath":"/static/sapl/frontend/css/online.b7332556.css","path":"../sapl/sapl/static/sapl/frontend/css/online.b7332556.css"},{"name":"js/online.0f0e1e97.js","publicPath":"/static/sapl/frontend/js/online.0f0e1e97.js","path":"../sapl/sapl/static/sapl/frontend/js/online.0f0e1e97.js"},{"name":"css/online.b7332556.css.map","publicPath":"/static/sapl/frontend/css/online.b7332556.css.map","path":"../sapl/sapl/static/sapl/frontend/css/online.b7332556.css.map"}],"painel":[{"name":"css/painel.fd494bea.css","publicPath":"/static/sapl/frontend/css/painel.fd494bea.css","path":"../sapl/sapl/static/sapl/frontend/css/painel.fd494bea.css"},{"name":"js/painel.f7b68b0b.js","publicPath":"/static/sapl/frontend/js/painel.f7b68b0b.js","path":"../sapl/sapl/static/sapl/frontend/js/painel.f7b68b0b.js"},{"name":"css/painel.fd494bea.css.map","publicPath":"/static/sapl/frontend/css/painel.fd494bea.css.map","path":"../sapl/sapl/static/sapl/frontend/css/painel.fd494bea.css.map"}],"sessao":[{"name":"css/sessao.559521f7.css","publicPath":"/static/sapl/frontend/css/sessao.559521f7.css","path":"../sapl/sapl/static/sapl/frontend/css/sessao.559521f7.css"},{"name":"js/sessao.20b23ff0.js","publicPath":"/static/sapl/frontend/js/sessao.20b23ff0.js","path":"../sapl/sapl/static/sapl/frontend/js/sessao.20b23ff0.js"},{"name":"css/sessao.559521f7.css.map","publicPath":"/static/sapl/frontend/css/sessao.559521f7.css.map","path":"../sapl/sapl/static/sapl/frontend/css/sessao.559521f7.css.map"}]}} {"status":"done","publicPath":"/static/sapl/frontend/","chunks":{"null":[{"name":"css/chunk-681dd124.34410740.css","publicPath":"/static/sapl/frontend/css/chunk-681dd124.34410740.css","path":"../sapl/sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css"},{"name":"js/chunk-681dd124.08a628b0.js","publicPath":"/static/sapl/frontend/js/chunk-681dd124.08a628b0.js","path":"../sapl/sapl/static/sapl/frontend/js/chunk-681dd124.08a628b0.js"},{"name":"css/chunk-681dd124.34410740.css.map","publicPath":"/static/sapl/frontend/css/chunk-681dd124.34410740.css.map","path":"../sapl/sapl/static/sapl/frontend/css/chunk-681dd124.34410740.css.map"}],"chunk-vendors":[{"name":"css/chunk-vendors.c215cd7a.css","publicPath":"/static/sapl/frontend/css/chunk-vendors.c215cd7a.css","path":"../sapl/sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css"},{"name":"js/chunk-vendors.24ea266c.js","publicPath":"/static/sapl/frontend/js/chunk-vendors.24ea266c.js","path":"../sapl/sapl/static/sapl/frontend/js/chunk-vendors.24ea266c.js"},{"name":"css/chunk-vendors.c215cd7a.css.map","publicPath":"/static/sapl/frontend/css/chunk-vendors.c215cd7a.css.map","path":"../sapl/sapl/static/sapl/frontend/css/chunk-vendors.c215cd7a.css.map"}],"compilacao":[{"name":"css/compilacao.eff62463.css","publicPath":"/static/sapl/frontend/css/compilacao.eff62463.css","path":"../sapl/sapl/static/sapl/frontend/css/compilacao.eff62463.css"},{"name":"js/compilacao.f85808e4.js","publicPath":"/static/sapl/frontend/js/compilacao.f85808e4.js","path":"../sapl/sapl/static/sapl/frontend/js/compilacao.f85808e4.js"},{"name":"css/compilacao.eff62463.css.map","publicPath":"/static/sapl/frontend/css/compilacao.eff62463.css.map","path":"../sapl/sapl/static/sapl/frontend/css/compilacao.eff62463.css.map"}],"global":[{"name":"css/global.3b8f6afb.css","publicPath":"/static/sapl/frontend/css/global.3b8f6afb.css","path":"../sapl/sapl/static/sapl/frontend/css/global.3b8f6afb.css"},{"name":"js/global.af074d20.js","publicPath":"/static/sapl/frontend/js/global.af074d20.js","path":"../sapl/sapl/static/sapl/frontend/js/global.af074d20.js"},{"name":"css/global.3b8f6afb.css.map","publicPath":"/static/sapl/frontend/css/global.3b8f6afb.css.map","path":"../sapl/sapl/static/sapl/frontend/css/global.3b8f6afb.css.map"}],"online":[{"name":"css/online.b7332556.css","publicPath":"/static/sapl/frontend/css/online.b7332556.css","path":"../sapl/sapl/static/sapl/frontend/css/online.b7332556.css"},{"name":"js/online.36999bd0.js","publicPath":"/static/sapl/frontend/js/online.36999bd0.js","path":"../sapl/sapl/static/sapl/frontend/js/online.36999bd0.js"},{"name":"css/online.b7332556.css.map","publicPath":"/static/sapl/frontend/css/online.b7332556.css.map","path":"../sapl/sapl/static/sapl/frontend/css/online.b7332556.css.map"}],"painel":[{"name":"css/painel.fd494bea.css","publicPath":"/static/sapl/frontend/css/painel.fd494bea.css","path":"../sapl/sapl/static/sapl/frontend/css/painel.fd494bea.css"},{"name":"js/painel.fcb12a07.js","publicPath":"/static/sapl/frontend/js/painel.fcb12a07.js","path":"../sapl/sapl/static/sapl/frontend/js/painel.fcb12a07.js"},{"name":"css/painel.fd494bea.css.map","publicPath":"/static/sapl/frontend/css/painel.fd494bea.css.map","path":"../sapl/sapl/static/sapl/frontend/css/painel.fd494bea.css.map"}],"sessao":[{"name":"css/sessao.559521f7.css","publicPath":"/static/sapl/frontend/css/sessao.559521f7.css","path":"../sapl/sapl/static/sapl/frontend/css/sessao.559521f7.css"},{"name":"js/sessao.2833f62a.js","publicPath":"/static/sapl/frontend/js/sessao.2833f62a.js","path":"../sapl/sapl/static/sapl/frontend/js/sessao.2833f62a.js"},{"name":"css/sessao.559521f7.css.map","publicPath":"/static/sapl/frontend/css/sessao.559521f7.css.map","path":"../sapl/sapl/static/sapl/frontend/css/sessao.559521f7.css.map"}]}}
Loading…
Cancel
Save