fix: header sticky; makeRow formats valor cells with fmtNum; fmtNum shows .00 only when needed
This commit is contained in:
+4
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user