payfrit-works/api
John Mizerek fe383f40d0 Fix wizard flow and add detailed modifier view
Major Changes:
1. Fixed infinite loop in wizard flow - uncertain modifiers step now correctly advances to final review instead of looping back to items
2. Moved uncertain modifier assignment to AFTER items review (makes more sense for user to see items first)
3. Added detailed modifier visualization on uncertain modifiers step showing:
   - Source image indicator (which image the modifier was extracted from)
   - Full list of all options with prices
   - Required/optional status
   - Option count summary

Technical Details:
- Backend: Added sourceImageIndex tracking in analyzeMenuImages.cfm to record which image each modifier came from
- Frontend: Enhanced uncertain modifiers step with inline detailed view showing complete modifier structure
- Flow correction: showUncertainModifiersStep() now calls showFinalStep() instead of showItemsStep() to prevent loop
- Improved error handling in API calls with detailed error messages from Claude API

Flow Changes:
- Old: Upload → Business → Categories → Modifiers → Uncertain Modifiers → Items → [LOOP]
- New: Upload → Business → Categories → Modifiers → Items → Uncertain Modifiers → Final Review

Model Configuration:
- Using claude-sonnet-4-20250514 for menu image analysis
- Added better error reporting to surface API issues (auth, credits, etc.)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 16:53:09 -08:00
..
addresses Improve address deduplication and delete matching duplicates 2026-01-14 23:11:28 -08:00
admin Update cleanup script to handle children 2026-01-14 13:32:38 -08:00
assignments Public businesses + servicepoints list endpoints; API allowlist; Lucee-safe JSON 2025-12-28 12:30:06 -08:00
auth Add team endpoint and chat features for portal 2026-01-11 17:03:55 -08:00
beacons Add business portal, Stripe Connect, beacon APIs, and task system 2026-01-01 23:38:26 -08:00
businesses Add hiring toggle functionality to portal Team page 2026-01-11 17:13:59 -08:00
chat Add team endpoint and chat features for portal 2026-01-11 17:03:55 -08:00
config Add menu builder required selection UI and fix portal issues 2026-01-05 01:56:12 -08:00
debug Add team endpoint and chat features for portal 2026-01-11 17:03:55 -08:00
import Add Payfrit Works (WDS) support and task completion flow 2026-01-03 14:52:04 -08:00
menu Show all templates in menu builder regardless of links 2026-01-15 15:17:08 -08:00
orders Fix null date handling in order history API 2026-01-14 21:36:18 -08:00
portal Fix IsActive bit field comparison in team API 2026-01-11 17:39:48 -08:00
servicepoints checkpoint 2025-12-28 22:34:01 -08:00
setup Fix wizard flow and add detailed modifier view 2026-01-15 16:53:09 -08:00
stations Add local dev support and fix menu builder API 2026-01-04 22:47:12 -08:00
stripe Include delivery fee in payment calculation 2026-01-13 11:06:27 -08:00
tasks Add chat expiration and order management improvements 2026-01-13 19:46:39 -08:00
users Add team endpoint and chat features for portal 2026-01-11 17:03:55 -08:00
workers Add Payfrit Works (WDS) support and task completion flow 2026-01-03 14:52:04 -08:00
Application.cfm Add addresses debug endpoint 2026-01-14 22:28:16 -08:00