Correção erro em parametros.html
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-11 20:54:47 -03:00
parent 4d2fcff4a8
commit bc05faafea

View File

@@ -32,7 +32,7 @@
<div style="margin-bottom: 0.5rem;">
<strong>Campos disponíveis:</strong>
<div class="campo-badges">
{% for campo in campos_fatura %}
{% for campo in (campos_fatura or []) %}
<span class="badge-campo" onclick="inserirNoEditor('{{ campo }}')">{{ campo }}</span>
{% endfor %}
</div>
@@ -61,9 +61,8 @@
</form>
<hr style="margin-top: 2rem; margin-bottom: 1rem;">
<h3 style="margin-top: 2rem;">📋 Fórmulas Salvas</h3>
<div class="card-list">
{% if
{% for param in lista_parametros %}
<div class="card-list">
{% for param in (formulas or []) %}
<div class="param-card {{ 'ativo' if param.ativo else 'inativo' }}" id="card-{{ param.id }}">
<div style="display:flex; justify-content:space-between; align-items:center;">
<input type="text" class="edit-nome" value="{{ param.nome }}" data-id="{{ param.id }}"
@@ -72,7 +71,6 @@
</div>
<textarea class="edit-formula" data-id="{{ param.id }}" title="{{ param.formula }}">{{ param.formula }}</textarea>
<!-- botão de testar e salvar -->
<div style="display: flex; justify-content: space-between; align-items:center;">
<label>
<input type="checkbox" class="toggle-ativo" data-id="{{ param.id }}" {% if param.ativo %}checked{% endif %}>
@@ -89,10 +87,8 @@
{% else %}
<p style="color:gray;">Nenhuma fórmula cadastrada.</p>
{% endfor %}
</div>
</div>
<!-- ABA SELIC -->
<div id="selic" class="tab-content">
<div class="formulario-box">
@@ -106,12 +102,12 @@
<button type="submit" class="btn btn-primary">⬇️ Atualizar Fatores SELIC</button>
<button type="button" class="btn btn-secondary" onclick="mostrarFeedback('🔁 Atualização', 'Função de recarga futura')">🔄 Recarregar</button>
</div>
<div class="mensagem-info" style="margin-top:1rem;">Última data coletada da SELIC: <strong>{{ ultima_data_selic }}</strong></div>
<div class="mensagem-info" style="margin-top:1rem;">Última data coletada da SELIC: <strong>{{ ultima_data_selic or '-' }}</strong></div>
</form>
<table class="selic-table">
<thead><tr><th>Competência</th><th>Fator</th></tr></thead>
<tbody>
{% for item in selic_dados %}
{% for item in (selic_dados or selic or []) %}
<tr>
<td>{{ "%02d"|format(item.mes) }}/{{ item.ano }}</td>
<td>{{ "%.4f"|format(item.percentual) }}</td>