Commit graph

14 commits

Author SHA1 Message Date
John Mizerek
ef6efa0762 Filter default modifiers from KDS display
Only show customized modifiers on the Kitchen Display System,
hiding default/unaltered selections to reduce clutter.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 00:29:53 -08:00
John Mizerek
a6259bccb0 Revert deduplication hack - root cause fixed in app
The duplicate modifiers were caused by the app creating nested groups.
That's now fixed, so we can remove the deduplication workaround.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 22:52:12 -08:00
John Mizerek
f6c3729874 Deduplicate modifiers in KDS display
Prevents showing the same modifier twice when data has duplicates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 22:45:55 -08:00
John Mizerek
70781ab75e Show Takeaway/Delivery instead of Table name in KDS
- Updated listForKDS.cfm to include OrderTypeName in response
- Added getLocationLabel/getLocationValue helpers in kds.js
- Takeaway orders now show "Type: Takeaway"
- Delivery orders now show "Type: Delivery"
- Dine-in orders continue to show "Table: [name]"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 22:38:33 -08:00
John Mizerek
0a10380639 Add template modifier support and fix KDS breadcrumbs
- setLineItem.cfm: Attach default children from ItemTemplateLinks
  (fixes drink choices not being saved for combos)
- listForKDS.cfm: Include ItemParentName for modifier categories
- kds.js: Display modifiers as "Category: Selection" format
- Various other accumulated fixes for menu builder, orders, and admin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 18:45:06 -08:00
John Mizerek
e20aede25f Fix KDS to show all selected modifiers including defaults
Previously the KDS was skipping modifiers marked as "checked by default",
but for exclusive selection groups (like drink choices) the customer's
actual selection should always be visible to the kitchen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 18:09:54 -08:00
John Mizerek
8092384702 Add team endpoint and chat features for portal
- Add /api/portal/team.cfm for employee listing
- Add chat endpoints (getMessages, sendMessage, markRead, getActiveChat)
- Add OTP authentication endpoints
- Add address management endpoints (delete, setDefault, states)
- Add task completion and chat task endpoints
- Update Application.cfm allowlist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 17:03:55 -08:00
John Mizerek
634148f727 Add Categories table support, KDS station selection, and portal fixes
Categories Migration:
- Add ItemCategoryID column to Items table (api/admin/addItemCategoryColumn.cfm)
- Migration script to populate Categories from unified schema (api/admin/migrateToCategories.cfm)
- Updated items.cfm and getForBuilder.cfm to use Categories table with fallback

KDS Station Selection:
- KDS now prompts for station selection on load (Kitchen, Bar, or All Stations)
- Station filter persists in localStorage
- Updated listForKDS.cfm to filter orders by station
- Simplified KDS UI with station badge in header

Portal Improvements:
- Fixed drag-and-drop in station assignment (proper event propagation)
- Fixed Back button links to use BASE_PATH for local development
- Added console logging for debugging station assignment
- Order detail API now calculates Subtotal, Tax, Tip, Total properly

Admin Tools:
- setupBigDeansStations.cfm - Create Kitchen and Bar stations for Big Dean's

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 15:31:45 -08:00
John Mizerek
1f4d06edba Add Payfrit Works (WDS) support and task completion flow
Task System:
- Tasks auto-created when KDS marks order Ready (status 3)
- Duplicate task prevention via TaskOrderID check
- Task completion now marks associated order as Completed (status 4)
- Fixed isNull() check for TaskCompletedOn (use len() instead)
- Added TaskOrderID to task queries for order linking

Worker APIs:
- api/workers/myBusinesses.cfm with GROUP BY to prevent duplicates
- api/tasks/listMine.cfm for worker's claimed tasks with filters
- api/tasks/complete.cfm updates both task and order status
- api/tasks/accept.cfm for claiming tasks

KDS/Portal:
- KDS only shows orders with status < 4
- Portal dashboard improvements

Admin/Debug:
- Debug endpoints for tasks and businesses
- Test data reset endpoint

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:52:04 -08:00
John Mizerek
0765dc1e27 Add business portal, Stripe Connect, beacon APIs, and task system
Portal:
- New business portal UI (portal/index.html, portal.css, portal.js)
- Dashboard with real-time stats (orders today, revenue, pending, menu items)
- Business info endpoint (api/businesses/get.cfm)
- Portal stats endpoint (api/portal/stats.cfm)
- Menu page links to existing full-featured menu editor

Stripe Connect:
- Onboarding endpoint (api/stripe/onboard.cfm)
- Status check endpoint (api/stripe/status.cfm)
- Payment intent creation (api/stripe/createPaymentIntent.cfm)
- Webhook handler (api/stripe/webhook.cfm)

Beacon APIs:
- List all beacons (api/beacons/list_all.cfm)
- Get business from beacon (api/beacons/getBusinessFromBeacon.cfm)

Task System:
- List pending tasks (api/tasks/listPending.cfm)
- Accept task (api/tasks/accept.cfm)

Other:
- HUD interface for quick order status display
- KDS debug/test pages
- Updated Application.cfm with public endpoint allowlist
- Order status check improvements

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 23:38:26 -08:00
John Mizerek
ecea71c533 Implement polling-based order status notifications
Backend changes:
- New API endpoint: checkStatusUpdate.cfm - polls order status and detects changes
- Updated admin.html: added test section for manually updating order status
- Status flow: 1(submitted) → 2(preparing) → 3(ready) → 4(completed)
- Human-readable status messages for each state

Testing interface:
- Order ID input field
- Status dropdown selector
- Direct integration with existing updateStatus.cfm endpoint

This enables real-time status notifications for customer orders with 30-second polling interval (Option 2 approach, with planned migration to self-hosted push).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 16:07:09 -08:00
John Mizerek
b812222314 Add KDS admin interface for manual order creation
- Created admin.html for BusinessID=17 to manually create test orders
- Service point selector with all tables
- Dynamic menu item rows with quantities
- Three-step order creation: cart → line items → submit
- Modern gradient UI with purple theme
- Success/error notifications
- Form auto-resets after successful order creation

Technical details:
- Fixed case sensitivity: API returns uppercase keys (ORDER, ORDERLINEITEMS)
- Fixed parameter naming: BusinessID (not OrderBusinessID)
- Added links to KDS display and debug view

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 15:38:13 -08:00
John Mizerek
4f694850e6 Fix KDS nested modifier display with breadcrumb paths
- Rewrote modifier rendering to display leaf modifiers only
- Added breadcrumb paths for full context (e.g., "Customize Spread: Extra")
- Eliminated nested div wrappers that were breaking the display
- Added comprehensive debug logging for troubleshooting
- Modifiers now show complete hierarchy without clutter

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 14:40:53 -08:00
John Mizerek
d7f68e8098 Add KDS web interface files
- index.html: Complete KDS interface with dark theme
  - Responsive grid layout for order cards
  - Status indicator with connection monitoring
  - Configuration panel for settings
  - Empty state display

- kds.js: Real-time order management JavaScript
  - Auto-refresh with configurable interval
  - Order status updates via API
  - Elapsed time calculation with visual warnings
  - Hierarchical line item rendering with recursive modifiers
  - LocalStorage-based configuration persistence

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 17:46:11 -08:00