From 99a6895f2b07013262ea72cd4d31dcf7703552e1 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Sun, 14 Aug 2022 02:20:16 -0300 Subject: [PATCH] inclui correspondencia em rules e add alert em add em lote --- sapl/rules/group_sessao.py | 3 ++- sapl/sessao/views.py | 8 +++++++- sapl/templates/sessao/em_lote/correspondencia.html | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sapl/rules/group_sessao.py b/sapl/rules/group_sessao.py index 0e30c1706..5bc217f05 100644 --- a/sapl/rules/group_sessao.py +++ b/sapl/rules/group_sessao.py @@ -21,6 +21,7 @@ rules_group_sessao = { (sessao.JustificativaAusencia, __base__, __perms_publicas__), (sessao.RetiradaPauta, __base__, __perms_publicas__), (sessao.RegistroLeitura, __base__, __perms_publicas__), - (sessao.ConsideracoesFinais, __base__, __perms_publicas__) + (sessao.ConsideracoesFinais, __base__, __perms_publicas__), + (sessao.Correspondencia, __base__, __perms_publicas__) ] } diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 40b44afe2..1c9074a75 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -5212,14 +5212,20 @@ class CorrespondenciaEmLoteView(PermissionRequiredMixin, FilterView): template_name = 'sessao/em_lote/correspondencia.html' permission_required = ('sessao.add_correspondencia',) + def get_queryset(self): + qs = super().get_queryset() + return qs.filter(sessao_plenaria_id=self.kwargs['pk']) + def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['root_pk'] = self.kwargs['pk'] + s = SessaoPlenaria.objects.get(pk=self.kwargs['pk']) context['subnav_template_name'] = 'sessao/subnav.yaml' - context['title'] = _('Correspondencias em Lote') + context['title'] = _( + 'Correspondencias em Lote ({})').format(s) # Verifica se os campos foram preenchidos msg = None diff --git a/sapl/templates/sessao/em_lote/correspondencia.html b/sapl/templates/sessao/em_lote/correspondencia.html index 31e126f02..d445c6737 100644 --- a/sapl/templates/sessao/em_lote/correspondencia.html +++ b/sapl/templates/sessao/em_lote/correspondencia.html @@ -45,6 +45,8 @@
+

+ OBS: Documentos já inseridos na sessão atual não aparecem na lista abaixo.
Documento @@ -54,7 +56,11 @@