Commit graph

421 commits

Author SHA1 Message Date
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
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
John Mizerek
3089f84873 Add beacon UUID sharding system and fix task customer info
- Add beacon-sharding API endpoints for scalable iBeacon addressing
  (64 shard UUIDs × 65k businesses = ~4.2M capacity)
- Fix callServer.cfm to save UserID when creating Call Server tasks
- Fix getDetails.cfm to return customer info from Task.UserID when
  Order.UserID is null (for tasks without orders)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:16:08 -08:00
John Mizerek
31a89018f5 Launch prep: fix menu builder, payment flow, comment out pre-launch features
- Fix menu builder dropdown showing empty names (return MenuName instead of Name)
- Add default menu selection (setDefault action, DefaultMenuID in getForBuilder)
- Fix createPaymentIntent column names for dev schema (ID, StripeAccountID, etc.)
- Fix menu-builder favicon and remove redundant business label
- Comment out Tabs/Running Checks feature for launch (HTML + JS)
- Comment out Service Point Marketing/Grants feature for launch (HTML + JS)
- Add testMarkPaid.cfm for testing orders without Stripe webhooks
- Task API updates for worker payout ledger integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:18:33 -08:00
John Mizerek
d7632c5d35 Menu builder and portal updates
- Menu builder UI improvements
- Portal CSS and JS updates
- Station assignment updates
- Add business tabs update endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:08:54 -08:00
John Mizerek
e21a7f7266 Remove DeliveryMultiplier from Businesses query (column no longer exists)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:11:34 -08:00
John Mizerek
152ac572c7 Add detailed error message to getOrCreateCart for debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:07:03 -08:00
John
16a3b7c9a3 Replace queryExecute with queryTimed across all endpoints for perf tracking
Converts 200+ endpoint files to use queryTimed() wrapper which tracks
DB query count and execution time. Restores perf dashboard files that
were accidentally moved to _scripts/. Includes portal UI updates.
2026-02-02 00:28:37 -08:00
John Mizerek
f52d14bb7e Add Service Point Sharing infrastructure
Grant-based system allowing businesses to share service points with
other businesses. Includes grant CRUD API, time/eligibility/economics
policies, enforcement at cart creation and order submit, Stripe payment
routing for owner fees, and portal UI for managing grants.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:34:03 -08:00
John Mizerek
82293c944d Add CLAUDE.md project documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 20:06:57 -08:00
John Mizerek
89f339a9fd Fix order history and active cart API response keys
- Replace tt_OrderTypes JOIN with CASE statement (table casing on Linux)
- Fix key mismatches: Name->BusinessName, UUID->OrderUUID, StatusID->OrderStatusID

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 10:12:03 -08:00
John Mizerek
4dfd0db833 Make menu-builder sidebar consistent with portal index
Move business card to top, remove logout button and sidebar-footer,
add missing Task Admin nav item.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:48:42 -08:00
John Mizerek
87e38649c4 Use business name initial for user avatar instead of first name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:47:02 -08:00
John Mizerek
7b19979118 Show user's first initial in profile avatar instead of hardcoded U
Save FirstName to localStorage on login (both OTP and password paths).
Portal reads it back and displays the first letter in the user avatar.
Falls back to 'U' if no name is stored. Cleared on logout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:38:36 -08:00
John Mizerek
05a52c6159 Move business card to top of sidebar, remove empty footer
Business info card now sits between the Payfrit logo and the nav links.
Sidebar footer removed entirely.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:29:02 -08:00
John Mizerek
e4afa61f13 Remove Switch/Add Business from sidebar footer
These actions are now only in the user dropdown menu in the top-right.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:28:16 -08:00
John Mizerek
fcfaa5b869 Move Switch/Add Business to user dropdown, remove sidebar logout
User icon dropdown now has: Settings, Switch Business, Add New Business,
Logout. Removed redundant logout from sidebar footer.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:27:16 -08:00
John Mizerek
d6478da03f Fix brand color display and header upload collision
- Brand color: add # prefix when loading from DB (stored without #,
  CSS needs it for backgroundColor)
- Header upload: delete destination file before rename to prevent
  collision when re-uploading same extension
- Header preview: prepend BASE_PATH to image URL for local dev

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:10:45 -08:00
John Mizerek
db90d9911a Add OTP email login to business portal
Replace default password login with email-based OTP flow. User enters
email, receives 6-digit code, enters it to log in. Password login
retained as fallback via link. On dev, magic OTP code is shown directly
for easy testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:03:40 -08:00
John Mizerek
77fb8b9780 Add user dropdown menu with Settings and Logout options
The user icon in the top-right header now opens a dropdown
with Settings and Logout links, making both accessible on mobile
where the sidebar is hidden.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:18:36 -08:00
John Mizerek
0258531c3d Remove debug alerts from portal.js
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:15:22 -08:00
John Mizerek
6ba3f3dffd Add debug alerts to diagnose mobile settings load issue
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:12:28 -08:00
John Mizerek
2562c51c27 Normalize API response keys to uppercase for consistent access
Lucee serializeJSON casing varies by server config (preserveCaseForStructKey).
Normalize all biz object keys to uppercase on the JS side so lookups
work regardless of server config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:08:03 -08:00
John Mizerek
abbe1d60a6 Add temporary debug alerts for mobile header/color issue
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:02:45 -08:00
John Mizerek
80b4c0da52 Fix header image and brand color swatch on mobile
- Hide wrapper div instead of img (avoids mobile empty-src issues)
- Use img onload handler to show wrapper after image loads
- Use backgroundColor instead of background shorthand for swatch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:59:21 -08:00
John Mizerek
69c51b90cb Fix header preview box and brand color swatch for mobile
- Header preview: max-width 1200px, white background, no border-radius on img
- Brand color swatch: change span to div with min-width/min-height and
  flex-shrink:0 to prevent collapse on mobile flex layouts
- Remove headerPreviewWrapper brand color tinting (wrapper stays white)
- Fix swatch border from white-alpha to black-alpha for visibility on white cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:50:25 -08:00
John Mizerek
db5cd90875 Switch header preview from CSS background-image to <img> tag
CSS background-image with padding-bottom trick for aspect ratio was not
rendering on mobile. Using an actual <img> element with width:100% is
universally reliable across all browsers and devices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:48:47 -08:00
John Mizerek
d86ca5a894 Fix header image display on mobile and brand color preview
- Replace fixed 120px height with aspect-ratio padding (33.3%) so image
  scales properly on narrow mobile screens
- Use background-size: cover instead of contain for better fill
- Add wrapper div that shows brand color behind the header image
- Update saveBrandColor to also update the header wrapper background

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:45:46 -08:00
John Mizerek
b65d536342 Left-justify header image preview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:42:22 -08:00
John Mizerek
c41b3950d2 Change header preview background to white
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:40:15 -08:00
John Mizerek
6b1d4b724b Change header image preview background from dark (#333) to light (#e9ecef)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:38:41 -08:00