From f13b059ce723ceb1d3ed8aa1f1a56ec06879b72b Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Jun 2026 12:56:57 +0000 Subject: [PATCH] fix: header sticky; makeRow formats valor cells with fmtNum; fmtNum shows .00 only when needed --- src/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index f9d13b5..2ecbb1b 100644 --- a/src/index.html +++ b/src/index.html @@ -32,6 +32,7 @@ color: #fff; padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 14px; + position: sticky; top: 0; z-index: 100; } .header-left { display: flex; align-items: center; gap: 14px; flex: 1; } .header-title { font-size: 15px; font-weight: 700; white-space: nowrap; } @@ -642,7 +643,9 @@ function makeRow(tblId, rowIndex, rowData) { if (col === 'valor' || col === 'retirada') td.className = 'num'; const inp = document.createElement('input'); inp.type = 'text'; - inp.value = rowData[col] !== undefined ? (rowData[col] === 0 ? '' : rowData[col]) : ''; + inp.value = rowData[col] !== undefined + ? (rowData[col] === 0 ? '' : fmtNum(rowData[col])) + : ''; inp.placeholder = col === 'valor' || col === 'retirada' ? '0,00' : (col === 'hora' ? 'HH:MM' : ''); inp.dataset.tbl = tblId; inp.dataset.row = rowIndex;