Commit graph

11 commits

Author SHA1 Message Date
John Mizerek
c4792189dd App Store Version 2: Beacon scanning, preload caching, business selector
Features:
- Beacon scanner service for detecting nearby beacons
- Beacon cache for offline-first beacon resolution
- Preload cache for instant menu display
- Business selector screen for multi-location support
- Rescan button widget for quick beacon refresh
- Sign-in dialog for guest checkout flow
- Task type model for server tasks

Improvements:
- Enhanced menu browsing with category filtering
- Improved cart view with better modifier display
- Order history with detailed order tracking
- Chat screen improvements
- Better error handling in API service

Fixes:
- CashApp payment return crash fix
- Modifier nesting issues resolved
- Auto-expand modifier groups

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:51:54 -08:00
John Mizerek
65b5b82546 Add customer-to-staff chat feature and group order invites
- Add real-time chat between customers and staff via WebSocket
- Add HTTP polling fallback when WebSocket unavailable
- Chat auto-closes when worker ends conversation with dialog notification
- Add user search API for group order invites (phone/email/name)
- Store group order invites in app state
- Add login check before starting chat with sign-in prompt
- Remove table change button (not allowed currently)
- Fix About screen to show dynamic version from pubspec
- Update snackbar styling to green with black text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:08:09 -08:00
John Mizerek
29646a8a04 Add custom tip, order type selection, and menu improvements
Cart/Payment:
- Custom tip option (0-200%) with dialog input
- Tip buttons now include "Custom" option
- Default custom tip starts at 25%

Order Flow:
- New order type selection screen (Dine-In, Takeout, Delivery)
- Group order invite screen (placeholder)
- App router updated with new routes

Menu Display:
- Category headers now text-only (removed image loading)
- Simplified category background with gradient and styled text

Beacon Scanning:
- Improved beacon detection flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:31:25 -08:00
John Mizerek
924367c70e Improve snackbar styling and fix business switching
Snackbar Improvements:
- All snackbars now have colored backgrounds (green/red/orange/blue)
- Added icons to snackbar messages (check_circle, error, warning, info)
- Floating behavior with bottom margin to avoid obscuring action buttons
- Consistent styling across menu_browse, cart_view, and login screens

App State Fixes:
- Clear cartItemCount when switching businesses (setBusiness, setServicePoint, setBusinessAndServicePoint, clearAll)
- Prevents stale cart count showing after switching restaurants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 11:47:42 -08:00
John Mizerek
008b6d45b2 Add polling service for order status notifications
Client-side implementation:
- New service: order_polling_service.dart - Timer-based polling every 30s
- Updated AppState: track active order ID and current status
- Cart integration: start polling after order submission
- In-app notifications: color-coded SnackBar for status changes
- Notification widget: animated banner (created for future use)

Status notification colors:
- Blue = Submitted (1)
- Orange = Preparing (2)
- Green = Ready (3)
- Purple = Completed (4)

Polling workflow:
1. User submits order → polling starts with status=1
2. Every 30s: check backend for status changes
3. On update: show notification + update AppState
4. Continues until order completed or app closed

Simple polling approach (Option 2) with planned migration to self-hosted WebSocket push for instant updates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 16:07:23 -08:00
John Mizerek
0a8c12c1d3 Enhance UI with Material Design 3 and fix cart quantity handling
UI Improvements:
- Menu items displayed as attractive cards with icons and better typography
- Restaurant selection upgraded to card-based layout with shadows
- Animated pulsing beacon scanner with gradient effect
- Enhanced item customization sheet with drag handle and pill-style pricing
- Category headers with highlighted background and borders
- Business and service point names now shown in app bar

Persistent Login:
- Created AuthStorage service for credential persistence using SharedPreferences
- Auto-restore authentication on app launch
- Seamless login flow: scan → browse → login on cart add
- Users stay logged in across app restarts

Cart Functionality Fixes:
- Fixed duplicate item handling: now properly increments quantity
- Prevented adding inactive items by skipping unselected modifiers
- Fixed self-referential items (item cannot be its own child)
- Added debug logging for cart state tracking
- Success messages now show accurate item counts

Technical Improvements:
- AppState tracks business/service point names for display
- Beacon scanner passes location names through navigation
- Quantity calculation checks existing cart items before adding
- Better null safety with firstOrNull pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 09:40:23 -08:00
John Mizerek
c445664df8 Implement production-ready beacon auto-selection system
- Multi-cycle BLE scanning (5 cycles x 2 seconds) overcomes Android detection limits
- RSSI averaging and variance calculation for confident beacon selection
- Detects all 3 test beacons with 100% accuracy
- Login flow optimized: beacon scan → browse menu → login on cart add
- Anonymous users can browse full menu before authentication
- Beacon scanning now occurs before login requirement

Technical improvements:
- Added API endpoints for beacon listing and business mapping
- Updated AppState to handle business/service point selection
- Implemented intelligent beacon scoring with proximity ranking
- Added graceful fallbacks for no-beacon scenarios

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 23:01:23 -08:00
John Mizerek
6f3dc7e477 Fix nested modifier saving with proper parent tracking
- Fixed _addModifiersRecursively to track OrderLineItemID through recursion
- Changed from hardcoded parentOrderLineItemId: 0 to actual parent IDs
- Added logic to find root item's OrderLineItemID before starting recursion
- Added logic to find each modifier's OrderLineItemID for its children
- Fixed API_BASE_URL to AALISTS_API_BASE_URL for environment consistency
- Added comprehensive debug logging for troubleshooting

This fix ensures nested modifiers (e.g., Customize Spread > Extra) are
properly saved to the database with correct parent-child relationships.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 14:40:55 -08:00
John Mizerek
f505eeb722 Implement complete cart management system
Add full cart functionality with API integration:
- Created Cart and OrderLineItem models with robust JSON parsing
- Implemented cart API methods (getOrCreateCart, setLineItem, getCart, submitOrder)
- Added cart state management to AppState with item count tracking
- Built cart view screen with item display, quantity editing, and removal
- Added cart badge to menu screen showing item count
- Implemented real add-to-cart logic with recursive modifier handling
- Added category name display in menu browsing
- Fixed API response case sensitivity (ORDER/ORDERLINEITEMS)
- Enhanced MenuItem model with categoryName field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 11:14:19 -08:00
John Mizerek
e5a494c435 checkpoint 2025-12-28 22:31:56 -08:00
John Mizerek
c7071a57c9 Initial commit (Payfrit Flutter app scaffold) 2025-12-28 12:28:45 -08:00