wagtail-enap-designsystem 1.2.1.142__py3-none-any.whl → 1.2.1.143__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wagtail-enap-designsystem might be problematic. Click here for more details.

@@ -62,37 +62,37 @@
62
62
  </p>
63
63
  </div>
64
64
  <div class="tab">
65
- <a class="tabbusca tab-btn {% if tipo == 'cursos' %}active{% endif %}"
65
+ <a class="tabbusca tab-btn {% if tipo == 'cursos' %}active{% endif %} tabcursos"
66
66
  href="?q={{ query }}&tipo=cursos{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
67
67
  Cursos
68
68
  <span class="tab-count">{{ tabs_totais.cursos }}</span>
69
69
  </a>
70
70
 
71
- <a class="tabbusca tab-btn {% if tipo == 'servicos' %}active{% endif %}"
71
+ <a class="tabbusca tab-btn {% if tipo == 'servicos' %}active{% endif %} tabservicos"
72
72
  href="?q={{ query }}&tipo=servicos{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
73
73
  Serviços
74
74
  <span class="tab-count">{{ tabs_totais.servicos }}</span>
75
75
  </a>
76
76
 
77
- <a class="tabbusca tab-btn {% if tipo == 'noticias' %}active{% endif %}"
77
+ <a class="tabbusca tab-btn {% if tipo == 'noticias' %}active{% endif %} tabnoticiais"
78
78
  href="?q={{ query }}&tipo=noticias{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
79
79
  Notícias
80
80
  <span class="tab-count">{{ tabs_totais.noticias }}</span>
81
81
  </a>
82
82
 
83
- <a class="tabbusca tab-btn {% if tipo == 'eventos' %}active{% endif %}"
83
+ <a class="tabbusca tab-btn {% if tipo == 'eventos' %}active{% endif %} tabeventos"
84
84
  href="?q={{ query }}&tipo=eventos{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
85
85
  Eventos e Oficinas
86
86
  <span class="tab-count">{{ tabs_totais.eventos }}</span>
87
87
  </a>
88
88
 
89
- <a class="tabbusca tab-btn {% if tipo == 'pesquisa_conhecimento' %}active{% endif %}"
89
+ <a class="tabbusca tab-btn {% if tipo == 'pesquisa_conhecimento' %}active{% endif %} tabpesquisa"
90
90
  href="?q={{ query }}&tipo=pesquisa_conhecimento{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
91
91
  Pesquisa e Conhecimento
92
92
  <span class="tab-count">{{ tabs_totais.pesquisa_conhecimento }}</span>
93
93
  </a>
94
94
 
95
- <a class="tabbusca tab-btn {% if tipo == 'todos' %}active{% endif %}"
95
+ <a class="tabbusca tab-btn {% if tipo == 'todos' %}active{% endif %} tabtodos"
96
96
  href="?q={{ query }}&tipo=todos{% if ordenacao %}&ordenacao={{ ordenacao }}{% else %}&ordenacao=recentes{% endif %}">
97
97
  Todos
98
98
  <span class="tab-count">{{ tabs_totais.todos }}</span>
@@ -1509,14 +1509,22 @@
1509
1509
  this.desabilitarOutrosBotoes(categoriaId, button);
1510
1510
  }
1511
1511
 
1512
- // Mostrar feedback
1513
- this.showFeedback(`Voto registrado em "${data.projeto_titulo || 'projeto'}"!`, 'success');
1512
+ // Verificar se votação está completa
1513
+ const votacaoCompleta = this.verificarVotacaoCompleta();
1514
+
1515
+ // Mostrar feedback adequado
1516
+ if (votacaoCompleta) {
1517
+ this.showFeedback(`🎉 Parabéns! Você votou em todas as categorias!`, 'success');
1518
+ } else {
1519
+ this.showFeedback(`Voto registrado em "${data.projeto_titulo || 'projeto'}"!`, 'success');
1520
+ }
1514
1521
 
1515
1522
  // Mostrar próximo passo após delay
1516
1523
  setTimeout(() => {
1517
1524
  this.mostrarModalPosVoto(categoriaId);
1518
1525
  }, 2000);
1519
1526
  },
1527
+
1520
1528
 
1521
1529
  // Atualizar contador de votos
1522
1530
  atualizarContador(projetoId, totalVotos) {
@@ -1571,7 +1579,6 @@
1571
1579
  },
1572
1580
 
1573
1581
  // Mostrar modal pós-voto
1574
- // Substitua a função mostrarModalPosVoto() existente por esta versão corrigida:
1575
1582
 
1576
1583
  // Mostrar modal pós-voto
1577
1584
  mostrarModalPosVoto(categoriaAtualId) {
@@ -1579,14 +1586,23 @@
1579
1586
  const proximoIndice = indiceAtual + 1;
1580
1587
  const temProximaCategoria = proximoIndice < this.categoriasOrdem.length;
1581
1588
 
1582
- if (temProximaCategoria) {
1589
+ // NOVA VERIFICAÇÃO: Checar se todas as categorias foram votadas
1590
+ const todasVotadas = this.votosCategoria.size >= this.configuracao.totalCategorias;
1591
+
1592
+ if (temProximaCategoria && !todasVotadas) {
1583
1593
  this.proximaCategoriaData = this.categoriasOrdem[proximoIndice];
1584
1594
  this.gerarPreviewProximaCategoria(this.proximaCategoriaData.id);
1585
1595
  } else {
1586
1596
  this.proximaCategoriaData = null;
1587
1597
  }
1588
1598
 
1589
- // Atualizar a visibilidade dos botões baseado se tem próxima categoria
1599
+ // Se todas foram votadas, mostrar modal de conclusão em vez do modal pós-voto
1600
+ if (todasVotadas) {
1601
+ this.mostrarModalConclusao();
1602
+ return;
1603
+ }
1604
+
1605
+ // Caso contrário, atualizar botões baseado se tem próxima categoria
1590
1606
  this.atualizarBotoesModal(temProximaCategoria);
1591
1607
 
1592
1608
  if (this.elementos.modalPosVoto) {
@@ -1599,10 +1615,27 @@
1599
1615
  const botaoContinuar = document.querySelector('.sistema-btn-continuar');
1600
1616
  const botaoFinalizar = document.querySelector('.sistema-modal-actions .sistema-btn-finalizar');
1601
1617
 
1602
- if (temProximaCategoria) {
1603
- // Ainda categorias - mostrar ambos os botões
1618
+ // Verificar se todas as categorias foram votadas
1619
+ const todasVotadas = this.votosCategoria.size >= this.configuracao.totalCategorias;
1620
+
1621
+ if (todasVotadas) {
1622
+ // TODAS VOTADAS: Esconder botão continuar, destacar finalizar
1623
+ if (botaoContinuar) {
1624
+ botaoContinuar.style.display = 'none';
1625
+ }
1626
+ if (botaoFinalizar) {
1627
+ botaoFinalizar.style.display = 'block';
1628
+ botaoFinalizar.style.width = '100%';
1629
+ botaoFinalizar.innerHTML = `
1630
+ <i class="fas fa-trophy"></i>
1631
+ <span>Parabéns! Finalizar Votação</span>
1632
+ `;
1633
+ }
1634
+ } else if (temProximaCategoria) {
1635
+ // AINDA HÁ CATEGORIAS: Mostrar ambos os botões
1604
1636
  if (botaoContinuar) {
1605
1637
  botaoContinuar.style.display = 'block';
1638
+ botaoContinuar.style.width = '';
1606
1639
  botaoContinuar.innerHTML = `
1607
1640
  Votar na próxima categoria
1608
1641
  <i class="fas fa-arrow-right"></i>
@@ -1610,9 +1643,10 @@
1610
1643
  }
1611
1644
  if (botaoFinalizar) {
1612
1645
  botaoFinalizar.style.display = 'block';
1646
+ botaoFinalizar.style.width = '';
1613
1647
  }
1614
1648
  } else {
1615
- // Última categoria - esconder botão continuar, destacar finalizar
1649
+ // ÚLTIMA CATEGORIA MAS NEM TODAS VOTADAS: Esconder continuar, destacar finalizar
1616
1650
  if (botaoContinuar) {
1617
1651
  botaoContinuar.style.display = 'none';
1618
1652
  }
@@ -1620,12 +1654,47 @@
1620
1654
  botaoFinalizar.style.display = 'block';
1621
1655
  botaoFinalizar.style.width = '100%';
1622
1656
  botaoFinalizar.innerHTML = `
1623
- <i class="fas fa-trophy"></i>
1657
+ <i class="fas fa-check-circle"></i>
1624
1658
  <span>Finalizar Votação</span>
1625
1659
  `;
1626
1660
  }
1627
1661
  }
1628
1662
  },
1663
+
1664
+ verificarVotacaoCompleta() {
1665
+ const todasVotadas = this.votosCategoria.size >= this.configuracao.totalCategorias;
1666
+
1667
+ if (todasVotadas) {
1668
+ console.log('🎉 Todas as categorias foram votadas!');
1669
+
1670
+ // Atualizar interface para indicar conclusão
1671
+ const progressoElements = document.querySelectorAll('.sistema-progresso-status');
1672
+ progressoElements.forEach(element => {
1673
+ if (element) {
1674
+ element.innerHTML = `
1675
+ <i class="fas fa-check-circle" style="color: #059669; margin-right: 0.5rem;"></i>
1676
+ Votação Completa!
1677
+ `;
1678
+ element.style.color = '#059669';
1679
+ element.style.fontWeight = 'bold';
1680
+ }
1681
+ });
1682
+
1683
+ // Opcional: Adicionar efeito visual de conclusão
1684
+ const progressoBars = document.querySelectorAll('.sistema-progresso-fill');
1685
+ progressoBars.forEach(bar => {
1686
+ if (bar) {
1687
+ bar.style.background = 'linear-gradient(90deg, #059669, #10b981)';
1688
+ bar.style.boxShadow = '0 0 10px rgba(5, 150, 105, 0.3)';
1689
+ }
1690
+ });
1691
+
1692
+ return true;
1693
+ }
1694
+
1695
+ return false;
1696
+ },
1697
+
1629
1698
 
1630
1699
  // Gerar preview da próxima categoria
1631
1700
  gerarPreviewProximaCategoria(proximaCategoriaId) {
@@ -1756,6 +1825,7 @@
1756
1825
  atualizarProgresso() {
1757
1826
  const votadas = this.votosCategoria.size;
1758
1827
  const percentual = Math.round((votadas / this.configuracao.totalCategorias) * 100);
1828
+ const completa = votadas >= this.configuracao.totalCategorias;
1759
1829
 
1760
1830
  // Atualizar elementos de progresso
1761
1831
  const elementos = [
@@ -1764,10 +1834,46 @@
1764
1834
  ];
1765
1835
 
1766
1836
  elementos.forEach(({ fill, status, text }) => {
1767
- if (fill) fill.style.width = `${percentual}%`;
1768
- if (status) status.textContent = `${votadas} de ${this.configuracao.totalCategorias} categorias`;
1769
- if (text) text.textContent = `${percentual}% concluído`;
1837
+ if (fill) {
1838
+ fill.style.width = `${percentual}%`;
1839
+ // Adicionar efeito visual quando completa
1840
+ if (completa) {
1841
+ fill.style.background = 'linear-gradient(90deg, #059669, #10b981)';
1842
+ fill.style.boxShadow = '0 0 10px rgba(5, 150, 105, 0.3)';
1843
+ }
1844
+ }
1845
+
1846
+ if (status) {
1847
+ if (completa) {
1848
+ status.innerHTML = `
1849
+ <i class="fas fa-trophy" style="color: #059669; margin-right: 0.5rem;"></i>
1850
+ Parabéns! ${votadas} de ${this.configuracao.totalCategorias} categorias
1851
+ `;
1852
+ status.style.color = '#059669';
1853
+ } else {
1854
+ status.textContent = `${votadas} de ${this.configuracao.totalCategorias} categorias`;
1855
+ status.style.color = '';
1856
+ }
1857
+ }
1858
+
1859
+ if (text) {
1860
+ if (completa) {
1861
+ text.innerHTML = `
1862
+ <i class="fas fa-check-circle" style="color: #059669; margin-right: 0.25rem;"></i>
1863
+ 100% - Votação Completa!
1864
+ `;
1865
+ text.style.color = '#059669';
1866
+ text.style.fontWeight = 'bold';
1867
+ } else {
1868
+ text.textContent = `${percentual}% concluído`;
1869
+ text.style.color = '';
1870
+ text.style.fontWeight = '';
1871
+ }
1872
+ }
1770
1873
  });
1874
+
1875
+ // Log para debug
1876
+ console.log(`📊 Progresso atualizado: ${votadas}/${this.configuracao.totalCategorias} (${percentual}%)`);
1771
1877
  },
1772
1878
 
1773
1879
  // Mostrar feedback
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-enap-designsystem
3
- Version: 1.2.1.142
3
+ Version: 1.2.1.143
4
4
  Summary: Módulo de componentes utilizado nos portais ENAP, desenvolvido com Wagtail + CodeRedCMS
5
5
  Author: Renan Campos
6
6
  Author-email: renan.oliveira@enap.gov.br
@@ -622,7 +622,7 @@ enap_designsystem/templates/admin/exportar_respostas.html,sha256=jF7hGJ6LkbKo536
622
622
  enap_designsystem/templates/admin/meta_tags_manager.html,sha256=jXNvT9etPN88TNT8Ou8ko-AHComioM9p8iU1lpW5m3k,11826
623
623
  enap_designsystem/templates/enap_designsystem/accordion_v2.html,sha256=SE-72OoHu-WucITL-CPR4XJzfLHrq78kmiytaSJB3Lc,4228
624
624
  enap_designsystem/templates/enap_designsystem/base.html,sha256=SfB9LSqHgQdmB-0xNbIsG9PIZFBTvZQfUAnp1R3yv08,13407
625
- enap_designsystem/templates/enap_designsystem/sistema_votacao_page.html,sha256=EN9QwgvRoeH0GJ1u7uIRVQaYMlsTjDR1fOQMqigjtmI,59696
625
+ enap_designsystem/templates/enap_designsystem/sistema_votacao_page.html,sha256=61fptIOaOvzkc-KkcCNW-S0RuB2f1OL2HGaqe_KpIXc,64205
626
626
  enap_designsystem/templates/enap_designsystem/blocks/accordions.html,sha256=WXBQrkO4U0R8SDbdbFRWBx742gdpiYiKEviiyQURZMk,2940
627
627
  enap_designsystem/templates/enap_designsystem/blocks/accordionsv2.html,sha256=-WXIV6zFjdbRAylWhF9mQkMxUr1Df4-d3OazVm1xT9s,5186
628
628
  enap_designsystem/templates/enap_designsystem/blocks/alerts.html,sha256=_lbwHiFS4eauJtlQB6j-xWR31sKH7lv1EKD9oI2cki4,2067
@@ -782,7 +782,7 @@ enap_designsystem/templates/enap_designsystem/pages/durante_evento.html,sha256=c
782
782
  enap_designsystem/templates/enap_designsystem/pages/enap_layout.html,sha256=nZV71dI5MiM2CC6vbcKAX2H0fuqBsz2jvSOwtODEluU,1969
783
783
  enap_designsystem/templates/enap_designsystem/pages/enap_layout_semana.html,sha256=nZV71dI5MiM2CC6vbcKAX2H0fuqBsz2jvSOwtODEluU,1969
784
784
  enap_designsystem/templates/enap_designsystem/pages/mba_especializacao.html,sha256=RvVB5sdS6EJa5WUvvGgcSnr_Ax_DUw4ALEjlXefFQz0,6339
785
- enap_designsystem/templates/enap_designsystem/pages/page_search.html,sha256=-zdZV5hWtsbE-aIa1m_RCniMZ2EhK3GLGJ61PeNd4Z8,50136
785
+ enap_designsystem/templates/enap_designsystem/pages/page_search.html,sha256=ft4m8GGpbEC03xeMuSrfnwbU0IfBiv3oloNFYSo52T8,50203
786
786
  enap_designsystem/templates/enap_designsystem/pages/pagepreview_block.html,sha256=RBqtL0rphuSh5Bi4XPPtXlGUf_zyWFPZY3xwJb8hhZM,235
787
787
  enap_designsystem/templates/enap_designsystem/pages/pos_evento.html,sha256=Y5dgwbLLbE4SmXdt493RcQQpsMqjP3zF5xXxjFXTfrs,3281
788
788
  enap_designsystem/templates/enap_designsystem/pages/pre_evento.html,sha256=XG3PPbp6FP984kB9RubHlgssgJJ3t2CO0C95iPvRLcw,3814
@@ -859,8 +859,8 @@ enap_designsystem/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
859
859
  enap_designsystem/utils/decorators.py,sha256=aq6SbLn0LcH2rfE3ZFit8jkD7pSx9fLVBUUwVB747hg,335
860
860
  enap_designsystem/utils/services.py,sha256=6dG5jLSbwH49jpZV9ZNpWlaZqI49gTlwlr1vaerxdiU,5824
861
861
  enap_designsystem/utils/sso.py,sha256=vjAuoYgoLeQAa_dkkyQ6-LmHvKMaVCxizNFpe5y3iUA,1145
862
- wagtail_enap_designsystem-1.2.1.142.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
863
- wagtail_enap_designsystem-1.2.1.142.dist-info/METADATA,sha256=dVBoU7ce0-TphMXejY60GnAgUy4Sg4Aqjx_HfPfOFD0,3651
864
- wagtail_enap_designsystem-1.2.1.142.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
865
- wagtail_enap_designsystem-1.2.1.142.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
866
- wagtail_enap_designsystem-1.2.1.142.dist-info/RECORD,,
862
+ wagtail_enap_designsystem-1.2.1.143.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
863
+ wagtail_enap_designsystem-1.2.1.143.dist-info/METADATA,sha256=0OOqmu4zwmzNykcpR8WGKgwnYVkv4UIOgLLk-MtrJeQ,3651
864
+ wagtail_enap_designsystem-1.2.1.143.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
865
+ wagtail_enap_designsystem-1.2.1.143.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
866
+ wagtail_enap_designsystem-1.2.1.143.dist-info/RECORD,,