Commit graph

388 commits

Author SHA1 Message Date
John Mizerek
2905d0f9f8 Fix missing closing tag in CFML 2026-02-12 14:26:17 -08:00
John Mizerek
800d1f1246 Add brand color extraction and auto-header detection to setup wizard 2026-02-12 14:20:35 -08:00
John Mizerek
02d77b662a Fix hours extraction to explicitly require weekend hours 2026-02-12 14:08:50 -08:00
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
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
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
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
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 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
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
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
John Mizerek
14c9336025 Fix getDetails customer info 2026-02-06 18:22:45 -08:00
John Mizerek
407f68655e Add UserID and customer info to service bell tasks
- 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>
2026-02-06 17:57:22 -08:00
John Mizerek
d8565deda1 Fix customer data query - remove invalid t.UserID join
Tasks table doesn't have UserID column. Customer data comes from Order.UserID only.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:52:40 -08:00
John Mizerek
b1a263bb36 Fix task APIs to get ServicePointName from Task.ServicePointID
- 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>
2026-02-06 17:46:04 -08:00
John Mizerek
8c247eb000 KDS: Dark minimal theme matching HUD, fix updateStatus column names
- 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>
2026-02-06 17:45:11 -08:00
John Mizerek
17d17071d1 Fix service bell task to include ServicePointID
- 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>
2026-02-06 17:42:56 -08:00
John Mizerek
d8333b3747 Add ServicePointName to task list endpoints
Returns service point name in listMine and listPending responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:34:12 -08:00
John Mizerek
5e9be8c2ca Fix min() function call in complete.cfm
Lucee's min() only takes 2 args, not 3. Use nested min() calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:30:12 -08:00
John Mizerek
f2a186c727 Fix tt_TaskTypes column name in callServer.cfm
Column is ID, not tt_TaskTypeID (per new naming convention).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:27:24 -08:00
John Mizerek
8696e3002f Fix callServer.cfm TaskTypeID null constraint error
TaskTypeID column is NOT NULL, so insert 0 instead of NULL when
no TaskTypeID is provided.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:25:15 -08:00