UX: fraction buttons for pz unit in use form + fix qty display

- _pzFractionLabel(): formats 2.5 → '2½', 2.25 → '2¼', etc.
- formatQuantity/formatQuantityParts: use fraction label for pz (was rounding to int)
- loadUseInventoryInfo normal mode: show ¼/½/¾/1 intero quick-select buttons for pz
- setPzFraction(): sets quantity input + syncs active button highlight
- adjustUseQty pz: step = 0.5 (half-piece) instead of 1; syncs frac button on ±
- CSS: .pz-fraction-btns, .fraction-btn-row, .frac-btn, .frac-btn.active
This commit is contained in:
dadaloop82
2026-04-07 13:03:32 +00:00
parent dc36ce2ae4
commit 72535ce41c
2 changed files with 80 additions and 6 deletions
+34
View File
@@ -963,6 +963,40 @@ body {
color: var(--text-light);
}
/* Fraction quick-select for pz unit */
.pz-fraction-btns {
width: 100%;
}
.pz-fraction-btns .form-hint {
font-size: 0.82rem;
color: var(--text-light);
text-align: center;
margin: 0 0 6px;
}
.fraction-btn-row {
display: flex;
gap: 6px;
}
.frac-btn {
flex: 1;
padding: 8px 4px;
border: 2px solid var(--primary);
background: transparent;
color: var(--primary);
border-radius: var(--radius-sm);
font-size: 0.88rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.frac-btn.active {
background: var(--primary);
color: #fff;
}
.frac-btn:hover:not(.active) {
background: var(--primary-light, rgba(74,158,255,0.12));
}
/* ===== SCANNER ===== */
.scan-container {
display: flex;