- allocate_business_namespace: Start Major from 0 (was 1)
- allocate_servicepoint_minor: Start Minor from 0 (was 1)
- register_beacon_hardware: Set BeaconMinor if empty instead of rejecting
- lookup: Allow Major=0 in validation (was LTE 0, now LT 0)
- servicepoints/save: Auto-allocate BeaconMinor on insert, include in response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow setting/reading BeaconMinor on service points for beacon sharding
table assignment. Also fixes bug where save.cfm referenced qOut.ServicePointID
instead of qOut.ID.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove Task Categories section from Task Admin page (deprecated)
- Simplify HUD getCategoryColor() to use TaskTypeColor directly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simple web page for testing the chat flow as a customer.
Enter BusinessID and start a chat that appears on the HUD.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- When accepting a chat task, automatically opens chat modal
- Chat modal shows message history and allows sending replies
- Auto-polls for new messages every 2 seconds
- End Chat button to complete the chat task
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Display ServicePointName in task detail overlay when available
- Style task details text in the bar's category color
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- createChat: Look up business-specific Chat task type instead of hardcoded ID 2
- listPending: Filter by CompletedOn IS NULL to exclude completed tasks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed t.ID to t.TaskID in three places - the API returns TaskID
not ID, so filtering and lookups were failing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show a modal with file input and preview
- Uses alert() instead of toast for error messages (more visible on mobile)
- Preview shows selected image before upload
- Submit button with loading state
- Keeps old uploadPhoto function for compatibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use persistent file input instead of dynamically created one
- Store pending upload info in sessionStorage for mobile camera flow
- Use simpler accept="image/*" for better mobile compatibility
- Handle case where page context is lost after camera returns
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add HEIC/HEIF support for iPhone camera photos
- Make frontend file type validation more permissive for mobile browsers
- Add 'capture' attribute to prefer rear camera on mobile
- Include actual file extension in error messages for debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- sendLoginOTP.cfm: Accept Email, Phone, or Identifier field
Sends OTP via SMS for phone, email for email addresses
- verifyEmailOTP.cfm: Accept phone numbers for verification
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
For businesses using beacon sharding:
- beacons/list.cfm now returns ServicePoints with BeaconMinor as beacons
- assignments/list.cfm now shows sharding assignments (SP + Minor)
- Both APIs include USES_SHARDING flag and sharding info
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The lookup API now handles two formats:
1. Sharding: { "Beacons": [{ "UUID", "Major", "Minor" }] }
Resolves via BeaconShards -> Businesses.BeaconMajor -> ServicePoints.BeaconMinor
2. Legacy: { "UUIDs": ["..."] }
Resolves via old Beacons table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Modifiers are saved with CategoryID=0 and ParentItemID pointing to their
parent item. The query was filtering by CategoryID IN (visible categories)
which excluded all modifiers.
Changed to: (CategoryID IN (visible) OR (CategoryID=0 AND ParentItemID>0))
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The API returns ServicePointID but portal.js was using sp.ID which was undefined.
Changed all sp.ID references to sp.ServicePointID.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Listen to browser online/offline events
- Check navigator.onLine before API calls
- Update status indicator immediately when connection changes
- Auto-refresh when coming back online
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
User-uploaded content and log files should not be version controlled:
- Added uploads/ and *.log to .gitignore
- Removed uploads/ directory from tracking (files remain on disk)
- Removed api/menu/saveFromBuilder.log from tracking
This prevents git reset --hard from overwriting user content during deploys.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- getCart.cfm: Include TaxRate from Businesses table
- getOrCreateCart.cfm: Include TaxRate from Businesses table
- items.cfm: Include TaxRate in menu response for cart calculation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of auto-selecting first business, redirect to login.html
which shows the business selection dropdown for users with multiple businesses.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- profile.cfm now returns AvatarUrl in USER object
- avatar.cfm now updates Users.ImageExtension after successful upload
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When both OrderID and UserID are 0, dont join to User 0 (Payfrit Network).
Instead return no customer info, letting the app show Guest.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
COALESCE treats 0 as valid, so Order.UserID=0 was matching User 0
(Payfrit Network) instead of falling back to Task.UserID.
Use NULLIF to convert 0 to NULL before the fallback.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
For order-based tasks, the customer comes from Order.UserID.
For standalone tasks without an order, fall back to Task.UserID.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Store UserID when creating service bell tasks
- Return CustomerID and CustomerName in listPending and listMine
- Join Users table to fetch customer first/last name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use COALESCE(t.ServicePointID, o.ServicePointID) in JOIN
- Add ServicePointID to JSON response
- Fixes service bell tasks showing table name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Redesign KDS with HUD-matching dark theme (pure black background)
- Header styling identical to HUD: position, font, clock format
- Status indicator moved to bottom-right corner like HUD
- Remove business ID config - now uses portal localStorage only
- Keep station toggle functionality
- Fix updateStatus.cfm: use correct column names for dev DB
(sp.Name instead of sp.ServicePointName, sp.ID instead of sp.ServicePointID)
- Use relative API URL instead of hardcoded production URL
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ServicePointID to INSERT statement for service bell tasks
- Fix tt_TaskTypes query to use ID instead of tt_TaskTypeID
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>