fix: split Bimby/Cookeo appliances, add missing i18n keys, improve use_all dialog

- .env: split 'Bimby/Moulinex Cookeo' into 'Bimby' and 'Moulinex Cookeo'
- translations (it/en/de): add use_all_confirm_*, throw_all_confirm_*,
  confirm.cancel, confirm.proceed, location.dispensa/frigo/freezer
- app.js: when ANY opened package exists, always show disambiguation
  dialog ('solo questa confezione?' vs 'tutto?') instead of silently
  finishing one — was previously showing dialog only for 2+ opened packages
This commit is contained in:
dadaloop82
2026-05-06 05:22:49 +00:00
parent f48fb02589
commit ed89e74b94
4 changed files with 47 additions and 17 deletions
+2 -11
View File
@@ -7234,21 +7234,12 @@ async function _doSubmitUseAll() {
const currentLoc = document.getElementById('use-location')?.value || '__all__';
const items = _useCurrentItems.filter(i => parseFloat(i.quantity) > 0);
const openedAtCurrentLoc = items.find(i => i.location === currentLoc && _isOpenedInventoryItem(i));
const allOpened = items.filter(_isOpenedInventoryItem);
let useLocation;
if (openedAtCurrentLoc) {
// Opened package at the currently selected location → finish only the opened item.
// The PHP backend fetches fractional (opened) rows first, so use_all on a specific
// location will clear the opened row and leave sealed packages untouched.
useLocation = currentLoc;
} else if (allOpened.length === 1) {
// One opened package somewhere else → almost certainly this is what the user means
useLocation = allOpened[0].location;
} else if (allOpened.length > 1) {
// Multiple opened packages at different locations → ask the user
if (allOpened.length >= 1) {
// One or more opened packages → always ask the user what they mean
showLoading(false);
_showUseAllDisambiguation(allOpened, items);
return;