fix: campo codigo do cliente so aceita numeros + botoes de tabela nao quebram linha
Gerador de chave: filtra caracteres nao numericos do campo codigo em tempo real (input event), alem da validacao ja existente no submit. Tabelas: a.botao/button ganham white-space: nowrap, corrigindo o botao 'Abrir' (e outros) quebrando em duas linhas depois que as celulas de dado passaram a permitir quebra de texto longo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
f6cf0f2e53
commit
a3a84abd37
@@ -213,6 +213,7 @@ button, a.botao {
|
|||||||
border: 1px solid transparent; border-radius: 8px;
|
border: 1px solid transparent; border-radius: 8px;
|
||||||
background: var(--cor-acento); color: var(--cor-acento-contraste);
|
background: var(--cor-acento); color: var(--cor-acento-contraste);
|
||||||
font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
|
font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
a.botao { background: transparent; border-color: var(--cor-borda); color: var(--cor-texto); font-weight: 400; margin-right: 6px; }
|
a.botao { background: transparent; border-color: var(--cor-borda); color: var(--cor-texto); font-weight: 400; margin-right: 6px; }
|
||||||
a.botao:hover { border-color: var(--cor-acento); color: var(--cor-acento); }
|
a.botao:hover { border-color: var(--cor-acento); color: var(--cor-acento); }
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ const $erro = document.getElementById('erro');
|
|||||||
const $resultado = document.getElementById('resultado');
|
const $resultado = document.getElementById('resultado');
|
||||||
const $copiar = document.getElementById('copiar');
|
const $copiar = document.getElementById('copiar');
|
||||||
|
|
||||||
|
$codigo.addEventListener('input', () => {
|
||||||
|
$codigo.value = $codigo.value.replace(/\D/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
(function preencherMesAtual() {
|
(function preencherMesAtual() {
|
||||||
const hoje = new Date();
|
const hoje = new Date();
|
||||||
$referencia.value = `${hoje.getFullYear()}-${String(hoje.getMonth() + 1).padStart(2, '0')}`;
|
$referencia.value = `${hoje.getFullYear()}-${String(hoje.getMonth() + 1).padStart(2, '0')}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user