Users table primary key was renamed from UserID to ID but these
endpoints still referenced the old column name, causing server_error
on login/signup OTP flow.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add queryTimed(), logPerf(), flushPerfBuffer() to environment.cfm
- Auto-create ApiPerfLogs table on first flush
- Hook logPerf into Application.cfm apiAbort for automatic tracking
- Initialize request perf counters in Application.cfm
- Remove local apiAbort() overrides from 7 endpoints
- Instrument 12 high-traffic endpoints with logPerf calls
- Buffer metrics in application scope, batch INSERT every 100 requests
- 30-day auto-cleanup with probabilistic trigger
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all SQL queries, query result references, and ColdFusion code to match
the renamed database schema. Tables use plural CamelCase, PKs are all `ID`,
column prefixes stripped (e.g. BusinessName→Name, UserFirstName→FirstName).
Key changes:
- Strip table-name prefixes from all column references (Businesses, Users,
Addresses, Hours, Menus, Categories, Items, Stations, Orders,
OrderLineItems, Tasks, TaskCategories, TaskRatings, QuickTaskTemplates,
ScheduledTaskDefinitions, ChatMessages, Beacons, ServicePoints, Employees,
VisitorTrackings, ApiPerfLogs, tt_States, tt_Days, tt_AddressTypes,
tt_OrderTypes, tt_TaskTypes)
- Rename PK references from {TableName}ID to ID in all queries
- Rewrite 7 admin beacon files to use ServicePoints.BeaconID instead of
dropped lt_Beacon_Businesses_ServicePoints link table
- Rewrite beacon assignment files (list, save, delete) for new schema
- Fix FK references incorrectly changed to ID (OrderLineItems.OrderID,
Categories.MenuID, Tasks.CategoryID, ServicePoints.BeaconID)
- Update Addresses: AddressLat→Latitude, AddressLng→Longitude
- Update Users: UserPassword→Password, UserIsEmailVerified→IsEmailVerified,
UserIsActive→IsActive, UserBalance→Balance, etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only include category headers that actually have items assigned
to them, preventing empty categories from showing up in the app.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Always return all active menus in the response so chip selector
always appears. Show all items from all menus by default instead
of filtering by current time, which caused empty results outside
menu hours.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Returns active menus in response so mobile apps can show menu
selector chips. Accepts optional MenuID param to filter items
to a specific menu.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When multiple menus exist, checks current time and day against menu
schedules. If exactly one menu matches, auto-selects it. If times
overlap or none match, shows all categories. User can still manually
select any menu or 'All Menus' from the dropdown.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The menuName variable was only defined in the else branch (new menu
creation) but referenced later in category logging. Now looks up the
menu name from DB when using a provided menuId.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
javaCast('null','') makes the variable truly undefined, causing
'variable doesn't exist' errors when referenced in query params.
Use empty string + len() check instead.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Pass menuName in redirect URL from menu-builder
- Show menu name in wizard header and final review
- Skip hours validation in both JS and backend for add-menu mode
- Hide menu name, hours, and community meal fields in final step
- Add id to community meal card for toggling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a new menu is created in Manage Menus, the user is now redirected
to the setup wizard with businessId and menuId params. The wizard skips
business info/header steps and goes straight to photo upload + category
extraction. Backend uses the provided menuId instead of creating a new
menu. Also removes temp debug from menus.cfm.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The endpoint was missing from the public paths whitelist in
Application.cfm, causing all requests to fail with not_logged_in.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes save failure when MenuStartTime/MenuEndTime are null -
Lucee couldn't determine the SQL type without explicit hints.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
showMenuManager() was passing arguments to showModal() which accepts
none, so the modal content was silently discarded. Now follows the
same pattern as all other modal callers in the file.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
saveBrandColor.cfm no longer prepends # before storing. API responses
(get.cfm, items.cfm, getForBuilder.cfm) prepend # if missing so
consumers always get a CSS-ready value.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move menu manager button to toolbar next to Save Menu for visibility
- Implement server-side photo upload for menu items
- Strip base64 data URLs from save payload to reduce size
- Add scheduled tasks, quick tasks, ratings, and task categories APIs
- Add vertical support and brand color features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove TypeID/Label from list response
- Hardcode TypeID=2 (delivery) in add endpoint
- Filter to personal addresses only (BusinessID=0 or NULL)
- Just IsDefault flag, no home/work labels
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add /addresses/types.cfm - returns address types list
- Update /addresses/list.cfm - include TypeID in response
- Update /addresses/add.cfm - accept TypeID instead of hardcoded '2'
- Fix loginOTP.cfm and sendOTP.cfm to skip Twilio SMS on dev server
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Skip business selection for users with only one business
- Add Switch Business and Add New Business links in portal sidebar
- Handle returning users switching businesses (token + no business)
- HUD reads businessId from localStorage instead of ?b= param
- Portal opens HUD/quick-tasks without URL params
- Business select auto-proceeds on selection (no button needed)
- Quick tasks reads from payfrit_portal_business localStorage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update create.cfm to handle TaskTypeID for service bell tasks
- Update hud.js to prefer TaskTypeColor/TaskTypeName for task display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New portal/signup.html with phone → OTP → profile flow
- Handle both new users (signup) and existing users (login)
- Auto-detect user type and use appropriate API endpoints
- Show DEV_OTP on page for local testing
- Updated sendOTP.cfm to gracefully handle missing Twilio
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>