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:
parent
ccb27f679f
commit
e20aede25f
1 changed files with 4 additions and 1 deletions
|
|
@ -332,11 +332,14 @@ function renderAllModifiers(modifiers, allItems) {
|
|||
const leafModifiers = [];
|
||||
function collectLeafModifiers(mods) {
|
||||
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);
|
||||
if (children.length === 0) {
|
||||
// This is a leaf node (actual selection)
|
||||
leafModifiers.push({ mod, path: getModifierPath(mod) });
|
||||
} else {
|
||||
// Has children, recurse deeper
|
||||
collectLeafModifiers(children);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue