diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index e042cc8..ee62e12 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -220,10 +220,13 @@ function AppContent({
- Feedback •{" "} - + Source Code - + •{" "} + + Menu Templates + •{" "} + Feedback
diff --git a/src/frontend/src/components/views/ParticipantCategoryFields.tsx b/src/frontend/src/components/views/ParticipantCategoryFields.tsx index 87b3744..8347b02 100644 --- a/src/frontend/src/components/views/ParticipantCategoryFields.tsx +++ b/src/frontend/src/components/views/ParticipantCategoryFields.tsx @@ -45,6 +45,15 @@ function getCategoryRules(category: OrderFormCategory) { ]; } +function keepLastSelection(value: unknown) { + if (!Array.isArray(value)) { + return []; + } + + const cleaned = value.map((entry) => String(entry).trim()).filter(Boolean); + return cleaned.length > 0 ? [cleaned[cleaned.length - 1]] : []; +} + export default function ParticipantCategoryFields({ categories, isClosed, @@ -56,15 +65,27 @@ export default function ParticipantCategoryFields({ const options = toCategoryOptions(category); const selectPlaceholder = `Select ${category.label.toLowerCase()}`; const rules = getCategoryRules(category); + const isSingleCustom = category.custom && !category.multiple; + const selectMode = category.custom + ? "tags" + : category.multiple + ? "multiple" + : undefined; const extra = category.custom ? `Your ${category.label.toLowerCase()} of choice. (Custom entries allowed)` : `Your ${category.label.toLowerCase()} of choice.`; return ( - +