Commit graph

520 commits

Author SHA1 Message Date
John Mizerek
400df7624f Simplify address API - delivery addresses only
- 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>
2026-01-28 00:12:18 -08:00
John Mizerek
6d5620d513 Filter out business addresses from user address list 2026-01-28 00:02:25 -08:00
John Mizerek
cadc66e46a Add address types endpoint, fix dev mode SMS skip
- 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>
2026-01-28 00:00:01 -08:00
John Mizerek
477cf6b8b5 Auto-login single-business users, add switch/add business links
- 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)
2026-01-27 21:49:08 -08:00
John Mizerek
80aa65d7fa Fix populateBusinessSelect - remove continueBtn references
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:38:52 -08:00
John Mizerek
6f0229247f Fix login - remove orphaned businessForm event listener
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:38:08 -08:00
John Mizerek
51e979a679 Remove URL params - use localStorage for auth
- 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>
2026-01-27 21:32:47 -08:00
John Mizerek
f96d8f4fe3 Update HUD default business to 47
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:27:45 -08:00
John Mizerek
49ef916f34 Remove demo mode from HUD, fix task creation timezone
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:25:05 -08:00
John Mizerek
d4cc4b4a6c Fix service bell task creation for Android app
- 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>
2026-01-27 20:52:59 -08:00
John Mizerek
c5ebb24b39 Fix completeProfile.cfm syntax error
Use mail() service inside cfscript instead of cfmail tag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 13:33:40 -08:00
John Mizerek
3ceedaa818 Show magic OTP 123456 on dev signup page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 13:32:23 -08:00
John Mizerek
a16e8668a8 Add auth redirect to portal index
Redirects unauthenticated users to signup.html

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 13:26:30 -08:00
John Mizerek
16f63bebe5 Fix seedData.cfm: remove UserEmail column reference
Users table doesn't have email column.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:44:53 -08:00
John Mizerek
3a683751b8 Allow public access to /api/dev/ endpoints
Dev endpoints have their own isDevEnvironment check inside.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:41:26 -08:00
John Mizerek
05cf73446f Add dev environment configuration and tools
- api/config/environment.cfm: Central config for dev vs prod settings
  - Verbose errors, debug logging, magic OTP bypass
  - Rate limiting toggle, email catch-all, token expiry settings
- api/dev/: Development-only endpoints
  - seedData.cfm: Create/reset test users
  - timeTravel.cfm: Manipulate timestamps for testing
  - index.cfm: Dev tools index

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:39:28 -08:00
John Mizerek
8e3bb681e7 Add OTP-based signup page for website onboarding
- 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>
2026-01-26 11:49:44 -08:00
John Mizerek
ed3f9192d5 Add Task Admin feature to portal
- Add Quick Task Templates: admin creates task shortcuts, tap to create tasks instantly
- Add Scheduled Tasks: admin defines recurring tasks with cron expressions
- New API endpoints: /api/admin/quickTasks/* and /api/admin/scheduledTasks/*
- New database tables: QuickTaskTemplates, ScheduledTaskDefinitions
- Portal UI: Task Admin page with shortcut buttons and scheduled task management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:51:41 -08:00
John Mizerek
43a8d18541 Update callServer task endpoint
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:40:41 -08:00
John Mizerek
405914c586 Fix subtotal/itemCount null handling in history API
Use val() instead of ?: for SUM results that may be empty strings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:59:33 -08:00
John Mizerek
e9eb708de1 Fix null value handling in setOrderType API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:41:31 -08:00
John Mizerek
d783f91075 Fix null value handling in setLineItem API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:40:32 -08:00
John Mizerek
186c3fcf68 Fix null value handling in getActiveCart API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:39:25 -08:00
John Mizerek
6727f42194 Fix null/empty value handling in order APIs
Wrap numeric fields with val() to prevent "can't cast empty string to number"
errors when database values are null or empty strings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:30:13 -08:00
John Mizerek
5f3f5a7345 Enable address endpoints and switch Stripe to live mode
- Add address list/add/delete/setDefault to public endpoint allowlist
- Switch Stripe from test to live mode for production payments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:26:14 -08:00
John Mizerek
c2ae037e71 App Store Version 2: Multi-menu support, beacon lookup, category scheduling
Features:
- Multi-menu support with time-based availability
- Menu hours validation against business operating hours
- Setup wizard now creates Menu records and links categories
- New menus.cfm API for menu CRUD operations
- Category schedule filtering (day/time based visibility)
- Beacon UUID lookup API for customer app
- Parent/child business relationships for franchises
- Category listing API for menu builder

Portal improvements:
- Menu builder theming to match admin UI
- Brand color picker fix
- Header image preview improvements

API fixes:
- Filter demo/hidden businesses from restaurant list
- Improved error handling throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:51:44 -08:00
John Mizerek
72f5b7eb12 Filter out demo and hidden businesses from restaurant list
Businesses with BusinessIsDemo=1 or BusinessIsHidden=1 will not appear
in the nearby restaurants list. Hidden businesses will be searchable
in a future update.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:14:45 -08:00
John Mizerek
3b7225e57f Fix brand color picker - use showModal instead of openModal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:02:13 -08:00
John Mizerek
046f57b302 Fix header preview to show full image with contain sizing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:00:36 -08:00
John Mizerek
4c40e9a2e9 Fix portal header image by using uppercase Lucee JSON keys
Lucee's serializeJSON converts all struct keys to UPPERCASE.
Updated loadBusinessInfo to check for uppercase key variants.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:59:17 -08:00
John Mizerek
74b09beedf Theme menu builder to match portal admin UI and fix header image display
- Added portal sidebar navigation to menu builder
- Updated color scheme to use portal CSS variables (gray-* instead of custom vars)
- Fixed header image preview to use HeaderImageURL from API response
- Fixed upload handler to use correct extension from response
- Added sidebar toggle and logout functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 11:54:05 -08:00
John Mizerek
a2a686ae76 Pass business ID to HUD when opening from portal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:41:33 -08:00
John Mizerek
3df846a31b Fix HUD business name - get from listPending API
The previous approach called getBusiness which requires auth.
Now listPending returns BUSINESS_NAME and HUD uses that.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:33:09 -08:00
John Mizerek
30570c3772 Add business name to HUD header, fix portal HUD link
- HUD now displays "Payfrit Tasks - <BusinessName>" by fetching from getBusiness API
- Fixed portal Task HUD button to link to /hud/index.html instead of /hud/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:23:52 -08:00
John Mizerek
0dc64b7868 Beacon save: auto-create service point and lt_ link, app is authoritative
- When saving a beacon, automatically create service point with same name
- Create lt_Beacon_Businesses_ServicePoints link record
- If UUID already exists, update instead of creating duplicate
- App is authoritative: reassigns beacon/servicepoint/lt_ to current business

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:42:38 -08:00
John Mizerek
31e71068d1 Add note about redundant BusinessID in employee table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:07:58 -08:00
John Mizerek
736b19d0cf Add employee reassignment script for consolidating to VeGainz
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 14:00:29 -08:00
John Mizerek
dc50d82eee Add service points reassign script 2026-01-18 13:56:26 -08:00
John Mizerek
977fd7dffa KDS: Show restaurant name in header, remove Loading text 2026-01-18 13:54:37 -08:00
John Mizerek
849cea6404 Add expo/pickup tasks for takeaway and delivery orders when kitchen finishes 2026-01-18 13:44:55 -08:00
John Mizerek
13554c1b02 Fix user search to support name, email, and phone 2026-01-18 13:29:25 -08:00
John Mizerek
ef92c86fcc Add team member search/add with phone or email support 2026-01-18 13:27:02 -08:00
John Mizerek
108a90531e KDS: Fix station selection logic, add debug logging 2026-01-18 13:22:27 -08:00
John Mizerek
4e4f3cf465 Remove all bid URL params - use localStorage exclusively for business selection 2026-01-18 13:18:10 -08:00
John Mizerek
96e598c6af KDS: Read businessId from shared portal localStorage instead of URL params 2026-01-18 13:15:08 -08:00
John Mizerek
f51ef7bab2 Fix KDS button to use index.html 2026-01-18 13:10:03 -08:00
John Mizerek
6ead6ddbb7 Add reassign_all to public paths 2026-01-18 13:08:14 -08:00
John Mizerek
867e1c8a78 Add temp beacon reassign script 2026-01-18 13:07:27 -08:00
John Mizerek
85f64c2add Fix brand color save - escape hash symbol in CFML
Use chr(35) instead of # literal to avoid CFML variable interpolation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 12:33:18 -08:00
John Mizerek
0038c481ab Fix brand color modal cancel button and simplify API query
- Changed hideModal() to closeModal() in color picker
- Simplified queryExecute parameter handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 12:26:36 -08:00