Commit graph

3 commits

Author SHA1 Message Date
John Mizerek
9c91737b1a Fix modifier hierarchy and add order status polling
Flutter App Changes:
- Fixed modifier saving to maintain full hierarchy (containers + selections)
- Fixed cart display to show breadcrumb paths (e.g., "Customize Patties > Mustard grilled")
- Added order status polling service (30-second intervals)
- Updated AppState to track active order and status
- Fixed Android Bluetooth permissions for release builds
- Disabled minification to preserve beacon library in release builds
- Added ProGuard rules for beacon/Bluetooth classes
- Added foreground service permissions for beacon monitoring

Technical Details:
- menu_browse_screen.dart: Added _hasSelectedDescendants() to ensure container items are saved
- cart_view_screen.dart: Added _buildModifierPaths() for breadcrumb display
- order_polling_service.dart: Polls checkStatusUpdate.cfm every 30s
- api.dart: Added checkOrderStatus() method
- Android permissions: Removed neverForLocation flag, added FOREGROUND_SERVICE
- ProGuard: Disabled shrinking, added keep rules for beacon classes

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 21:37:55 -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
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