fix(scale): auto-fill broken for conf products (e.g. latte)

Two root causes:
1. _useNormalUnit was stale ('pz') for conf products because it's only
   updated in normal mode — fix: resolve effective unit from
   _useConfMode.packageUnit when in sub mode
2. Food scales in liquid mode send unit='ml' directly — was falling
   through to raw value, skipping density; fix: detect scaleAlreadyMl
   flag to use ml directly for ml target, or apply density for g target
Also: add scale pre-fill call after switchUseUnit('sub') in conf mode
This commit is contained in:
dadaloop82
2026-04-15 21:12:37 +00:00
parent 7144ec7386
commit 951ef1d64f
2 changed files with 40 additions and 15 deletions
+1 -1
View File
@@ -1239,6 +1239,6 @@
</div>
</div>
<script src="assets/js/app.js?v=20260415e"></script>
<script src="assets/js/app.js?v=20260415f"></script>
</body>
</html>