Fix KDS to show all selected modifiers including defaults

Previously the KDS was skipping modifiers marked as "checked by default",
but for exclusive selection groups (like drink choices) the customer's
actual selection should always be visible to the kitchen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-01-12 18:09:54 -08:00
parent ccb27f679f
commit e20aede25f

View file

@ -332,11 +332,14 @@ function renderAllModifiers(modifiers, allItems) {
const leafModifiers = []; const leafModifiers = [];
function collectLeafModifiers(mods) { function collectLeafModifiers(mods) {
mods.forEach(mod => { mods.forEach(mod => {
if (mod.ItemIsCheckedByDefault === 1 || mod.ItemIsCheckedByDefault === true || mod.ItemIsCheckedByDefault === "1") return; // Show ALL selected modifiers - don't skip defaults
// The customer made a choice and it should be visible on the KDS
const children = allItems.filter(item => item.OrderLineItemParentOrderLineItemID === mod.OrderLineItemID); const children = allItems.filter(item => item.OrderLineItemParentOrderLineItemID === mod.OrderLineItemID);
if (children.length === 0) { if (children.length === 0) {
// This is a leaf node (actual selection)
leafModifiers.push({ mod, path: getModifierPath(mod) }); leafModifiers.push({ mod, path: getModifierPath(mod) });
} else { } else {
// Has children, recurse deeper
collectLeafModifiers(children); collectLeafModifiers(children);
} }
}); });