Correção erro em parametros.html
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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,37 +61,33 @@
|
||||
</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="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 }}"
|
||||
onkeydown="if(event.key==='Enter'){ event.preventDefault(); salvarInline('{{ param.id }}') }" />
|
||||
<span class="badge-status">{{ 'Ativo ✅' if param.ativo else 'Inativo ❌' }}</span>
|
||||
</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 %}>
|
||||
Ativo
|
||||
</label>
|
||||
<div class="actions">
|
||||
<button type="button" class="btn btn-sm btn-secondary btn-testar" data-id="{{ param.id }}">🧪 Testar</button>
|
||||
<button class="btn btn-sm btn-primary" onclick="salvarInline('{{ param.id }}')">💾 Salvar</button>
|
||||
<a href="/parametros/delete/{{ param.id }}" class="btn btn-sm btn-danger" onclick="return confirm('Deseja excluir?')">🗑️ Excluir</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mensagem-info" id="resultado-inline-{{ param.id }}" style="margin-top: 0.5rem; display:none;"></div>
|
||||
<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 }}"
|
||||
onkeydown="if(event.key==='Enter'){ event.preventDefault(); salvarInline('{{ param.id }}') }" />
|
||||
<span class="badge-status">{{ 'Ativo ✅' if param.ativo else 'Inativo ❌' }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<p style="color:gray;">Nenhuma fórmula cadastrada.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<textarea class="edit-formula" data-id="{{ param.id }}" title="{{ param.formula }}">{{ param.formula }}</textarea>
|
||||
|
||||
<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 %}>
|
||||
Ativo
|
||||
</label>
|
||||
<div class="actions">
|
||||
<button type="button" class="btn btn-sm btn-secondary btn-testar" data-id="{{ param.id }}">🧪 Testar</button>
|
||||
<button class="btn btn-sm btn-primary" onclick="salvarInline('{{ param.id }}')">💾 Salvar</button>
|
||||
<a href="/parametros/delete/{{ param.id }}" class="btn btn-sm btn-danger" onclick="return confirm('Deseja excluir?')">🗑️ Excluir</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mensagem-info" id="resultado-inline-{{ param.id }}" style="margin-top: 0.5rem; display:none;"></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p style="color:gray;">Nenhuma fórmula cadastrada.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- ABA SELIC -->
|
||||
<div id="selic" class="tab-content">
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user