Remove Inverted Display toggle; fix template modifier name not saving

- Removed IsInvertedGroup toggle and badge from menu builder UI
- Fixed saveFromBuilder.cfm not updating Name for template modifiers
  (only selection rules were saved, name changes were silently lost)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-03-11 17:40:42 -07:00
parent 75de1ab999
commit 4a13bd7583
2 changed files with 5 additions and 13 deletions

View file

@ -333,15 +333,17 @@ try {
sortOrder: modSortOrder sortOrder: modSortOrder
}); });
// Update template's selection rules // Update template's name and selection rules
queryTimed(" queryTimed("
UPDATE Items UPDATE Items
SET RequiresChildSelection = :requiresSelection, SET Name = :name,
RequiresChildSelection = :requiresSelection,
MaxNumSelectionReq = :maxSelections, MaxNumSelectionReq = :maxSelections,
IsInvertedGroup = :isInverted IsInvertedGroup = :isInverted
WHERE ID = :modID WHERE ID = :modID
", { ", {
modID: modDbId, modID: modDbId,
name: mod.name,
requiresSelection: requiresSelection, requiresSelection: requiresSelection,
maxSelections: maxSelections, maxSelections: maxSelections,
isInverted: (structKeyExists(mod, "isInverted") && mod.isInverted) ? 1 : 0 isInverted: (structKeyExists(mod, "isInverted") && mod.isInverted) ? 1 : 0

View file

@ -2245,16 +2245,6 @@
<p style="color: var(--gray-500); font-size: 11px; margin: 4px 0 0;"> <p style="color: var(--gray-500); font-size: 11px; margin: 4px 0 0;">
Required = customer must select at least one option. Max 0 = unlimited. Required = customer must select at least one option. Max 0 = unlimited.
</p> </p>
<div class="property-group" style="margin-top: 12px;">
<label>Inverted Display</label>
<select onchange="MenuBuilder.updateOption('${parent.id}', '${option.id}', 'isInverted', this.value === 'true')">
<option value="false" ${!option.isInverted ? 'selected' : ''}>No</option>
<option value="true" ${option.isInverted ? 'selected' : ''}>Yes</option>
</select>
<p style="color: var(--gray-500); font-size: 11px; margin: 4px 0 0;">
When enabled, KDS and cart only show removed items (e.g., "NO Mustard") instead of listing all defaults.
</p>
</div>
</div> </div>
` : ''} ` : ''}
<div class="property-group"> <div class="property-group">
@ -4247,7 +4237,7 @@
${mod.isDefault ? '<span class="item-type-badge">Default</span>' : ''} ${mod.isDefault ? '<span class="item-type-badge">Default</span>' : ''}
${mod.requiresSelection ? '<span class="item-type-badge" style="background: #dc3545; color: white;">Required</span>' : ''} ${mod.requiresSelection ? '<span class="item-type-badge" style="background: #dc3545; color: white;">Required</span>' : ''}
${mod.maxSelections > 0 ? `<span class="item-type-badge">Max ${mod.maxSelections}</span>` : ''} ${mod.maxSelections > 0 ? `<span class="item-type-badge">Max ${mod.maxSelections}</span>` : ''}
${mod.isInverted ? '<span class="item-type-badge" style="background: #6f42c1; color: white;">Inverted</span>' : ''}
${hasOptions ? `<span class="item-type-badge">${mod.options.length} options</span>` : ''} ${hasOptions ? `<span class="item-type-badge">${mod.options.length} options</span>` : ''}
</div> </div>
</div> </div>