Commit graph

260 commits

Author SHA1 Message Date
John Mizerek
0d04ae8463 Resolve merge conflict in myBusinesses.cfm - keep ActiveTaskCount 2026-02-11 22:33:44 -08:00
John Mizerek
e4422996b2 Fix column names in saveWizard.cfm for production DB
- BusinessCommunityMealType → CommunityMealType
- BusinessAddedOn → AddedOn

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 22:33:20 -08:00
John Pinkyfloyd
a2be30b952 Add UUID to getDetail.cfm response for receipt link
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:54:02 -08:00
John Pinkyfloyd
237f09ef93 Add beacon-sharding/get_shard_pool.cfm to public allowlist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 18:33:49 -08:00
John Mizerek
7745e1ed86 Fix pending task count to exclude completed tasks
The PendingTaskCount subquery was only checking ClaimedByUserID = 0
but not CompletedOn IS NULL, causing completed-but-unclaimed tasks
to show up in the business selection screen count.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 17:20:30 -08:00
John Pinkyfloyd
d2985e193a Fix submit.cfm: remove ServicePoints join that was causing column name errors 2026-02-09 16:32:00 -08:00
John Pinkyfloyd
add65346c9 Fix submit.cfm: correct column names for OrderLineItems and ServicePoints queries 2026-02-09 15:58:13 -08:00
John Pinkyfloyd
abf444ffe6 Use PayfritFee from database in Stripe payment intent 2026-02-09 15:50:05 -08:00
John Pinkyfloyd
1787671239 Add PayfritFee to cart API responses 2026-02-09 15:42:57 -08:00
John Pinkyfloyd
e03e021ea2 Add all biz debug 2026-02-09 14:33:25 -08:00
John Pinkyfloyd
a1c3e71db0 Add all businesses debug endpoint 2026-02-09 14:32:01 -08:00
John Pinkyfloyd
696cb90ba9 Fix johns debug query 2026-02-09 14:30:37 -08:00
John Pinkyfloyd
133f57f689 Add Johns Beverages debug endpoint 2026-02-09 14:29:04 -08:00
John Mizerek
b8cf2ce150 Fix beacon sharding to support Major/Minor starting from 0
- 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>
2026-02-09 13:43:32 -08:00
John Pinkyfloyd
872897eabc Add Stripe Checkout Session for web-based payments (iOS app) 2026-02-09 13:10:27 -08:00
John Pinkyfloyd
c155a6ab78 Add Stripe status debug endpoint 2026-02-09 12:49:23 -08:00
John Pinkyfloyd
db5249e5ed Add shards debug endpoint 2026-02-09 12:18:59 -08:00
John Pinkyfloyd
b2187bde4e Fix null BeaconShardID handling in debug endpoint 2026-02-09 12:17:36 -08:00
John Pinkyfloyd
dd85e7b386 Add debug endpoint for La Serenata beacon setup 2026-02-09 12:13:29 -08:00
John Pinkyfloyd
0509e123e7 Add BeaconMinor support to servicepoints API
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>
2026-02-09 11:25:22 -08:00
John Mizerek
48bdbb362e Remove task categories from portal, fix HUD color logic
- 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>
2026-02-08 19:04:25 -08:00
John Mizerek
4cfcb728cc Add test-chat.html for testing customer chat initiation
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>
2026-02-08 15:25:34 -08:00
John Mizerek
8108924dcd Add chat modal to HUD for responding to chat tasks
- 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>
2026-02-08 15:22:19 -08:00
John Mizerek
641b238de8 Add location and color styling to HUD task detail overlay
- 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>
2026-02-08 15:11:30 -08:00
John Mizerek
e60601d9f1 Fix chat task creation and listing
- 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>
2026-02-08 15:03:46 -08:00
John Mizerek
a998ff890a Fix HUD task bar not disappearing after accept/complete
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>
2026-02-08 14:52:50 -08:00
John Mizerek
a318b8668f Fix cart/tax issues and add menu item thumbnails
- uploadItemPhoto: Add EXIF orientation fix, generate thumb/medium/full sizes
- getActiveCart: Disable old cart lookup (always returns no cart)
- getOrCreateCart: Always create fresh cart instead of reusing old ones
- getCart: Add IsDeleted filter, calculate subtotal/tax/total server-side
- getDetail: Remove default 8.25% tax rate (business must configure)
- menu-builder: Add lightbox for full-size images, use thumbnail URLs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 14:22:54 -08:00
John Mizerek
946c2ebdf0 Add modal-based photo upload for better mobile support
- 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>
2026-02-08 13:08:24 -08:00
John Mizerek
cab561a20e Fix photo upload on mobile - prevent page reload issue
- 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>
2026-02-08 13:06:47 -08:00
John Mizerek
9fc984bea3 Fix photo upload on mobile devices
- 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>
2026-02-08 12:56:50 -08:00
John Mizerek
12a8c054f3 Add uploadItemPhoto.cfm to public allowlist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 12:53:55 -08:00
John Mizerek
06dd664203 Add phone number support to OTP login APIs
- 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>
2026-02-08 12:48:21 -08:00
John Mizerek
428129a93e Add sharding support to beacon list and assignments APIs
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>
2026-02-08 12:34:49 -08:00
John Mizerek
2f35eb69eb Add beacon sharding support to lookup API
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>
2026-02-08 12:21:30 -08:00
John Mizerek
9ea3ec87f7 Fix modifiers not showing in app - CategoryID filter excluded them
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>
2026-02-08 11:57:05 -08:00
John Mizerek
3d59a2e5cd Fix service point delete using wrong ID field
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>
2026-02-07 17:32:43 -08:00
John Mizerek
3d6856f108 KDS/HUD: Add online/offline connection detection
- 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>
2026-02-07 17:22:14 -08:00
John Mizerek
fc27e2b87f Remove uploads and logs from git tracking
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>
2026-02-07 16:26:43 -08:00
John
c75352d32a Remove uploads from git tracking - user content should not be versioned
Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-07 16:11:09 -08:00
John Mizerek
b64f48bfcc Update CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 15:19:37 -08:00
John Mizerek
2023e1b5d9 Setup wizard and tasks updates
- Setup wizard save improvements
- Call server task updates
- Task creation changes
- Portal JS updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 15:18:01 -08:00
John Mizerek
30c175bafe Add TaxRate to cart and menu API responses
- 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>
2026-02-07 14:31:26 -08:00
John Mizerek
930394b421 Fix signup to redirect to login for business selection
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>
2026-02-07 14:16:43 -08:00
John Mizerek
e40e87efe0 Allow child businesses to use parent service points without grant
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 11:58:44 -08:00
John Mizerek
87ff082279 Fix header preview background to white
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:15:20 -08:00
John Mizerek
5786f69ba4 Add AvatarUrl to profile API and update ImageExtension on upload
- 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>
2026-02-06 18:49:38 -08:00
John Mizerek
7f6c8253d0 Fix customer lookup: use NULLIF on both Order and Task UserID
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>
2026-02-06 18:46:00 -08:00
John Mizerek
624264ad2e Fix customer lookup: treat Order.UserID=0 as NULL
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>
2026-02-06 18:36:13 -08:00
John Mizerek
e1000dbe19 Fix customer lookup: prioritize Order.UserID over Task.UserID
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>
2026-02-06 18:28:36 -08:00
John Mizerek
c1edb20e53 Fix customer lookup - treat UserID 0 as NULL 2026-02-06 18:24:52 -08:00