diff --git a/sapl/painel/views.py b/sapl/painel/views.py index 500f4b8ac..93feedd4e 100644 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -363,9 +363,11 @@ def get_votos(response, materia): if type(materia) == OrdemDia: registro = RegistroVotacao.objects.filter( ordem=materia, materia=materia.materia).last() + tipo = 'ordem' elif type(materia) == ExpedienteMateria: registro = RegistroVotacao.objects.filter( expediente=materia, materia=materia.materia).last() + tipo = 'expediente' if not registro: response.update({ @@ -377,6 +379,24 @@ def get_votos(response, materia): 'tipo_resultado': 'Ainda não foi votada.', }) + if materia.tipo_votacao == 2: + if tipo == 'ordem': + votos_parlamentares = VotoParlamentar.objects.filter( + ordem_id=materia.id).order_by( + 'parlamentar__nome_parlamentar') + else: + votos_parlamentares = VotoParlamentar.objects.filter( + expediente_id=materia.id).order_by( + 'parlamentar__nome_parlamentar') + + + for i, p in enumerate(response['presentes']): + try: + if votos_parlamentares.get(parlamentar_id=p['parlamentar_id']).voto: + response['presentes'][i]['voto'] = 'Voto Informado' + except ObjectDoesNotExist: + response['presentes'][i]['voto'] = '' + else: total = (registro.numero_votos_sim + registro.numero_votos_nao + diff --git a/sapl/static/styles/app.scss b/sapl/static/styles/app.scss index 7ca2d652a..74fcd42b4 100644 --- a/sapl/static/styles/app.scss +++ b/sapl/static/styles/app.scss @@ -497,7 +497,7 @@ p { /* Estilização da Listagem de Votos em sessões plenárias */ #styleparlamentar { - border: 1px solid #d6e1e5; + border: 0px solid #d6e1e5; border-top-color: rgb(214, 225, 229); border-right-color: rgb(214, 225, 229); border-bottom-color: rgb(214, 225, 229); diff --git a/sapl/templates/painel/index.html b/sapl/templates/painel/index.html index bfe6ade37..6be08b115 100644 --- a/sapl/templates/painel/index.html +++ b/sapl/templates/painel/index.html @@ -99,9 +99,9 @@
Matéria em Votação