Commit graph

22 commits

Author SHA1 Message Date
873cbba2aa fix: use backend-authoritative change amount for cash transactions
Instead of calculating change client-side (which doesn't account for
balance applied, fees, etc.), the app now uses the Change value returned
by the /tasks/complete.php endpoint after processing.

Changes:
- APIService.completeTask now returns CashCompletionResult with backend values
- Added CashCompletionResult struct (cashReceived, orderTotal, change, fees, routing)
- CashCollectionSheet shows confirmed backend change after completion
- Added ratingRequired error case to APIError enum
- Client-side estimate still shown as preview before confirmation
2026-03-24 00:41:10 +00:00
551637f0ec Merge pull request 'feat: Customer rating dialog on task completion' (#2) from schwifty/customer-rating into main 2026-03-24 00:39:44 +00:00
bd98471f4c Merge pull request 'fix: remove 2,562 build-sim/ artifacts from repo' (#1) from schwifty/remove-build-artifacts into main 2026-03-24 00:39:23 +00:00
ece36cb484 feat: add customer rating dialog on task completion
When a worker completes a service point task and the API requires a
rating, a dialog now appears with 4 yes/no questions matching Android:
- Was the customer prepared?
- Was the scope clear?
- Was the customer respectful?
- Would you serve them again?

The rating is submitted with the task completion request via the
workerRating payload. Also handles rating_required during beacon
auto-complete by dismissing the countdown and showing the dialog.

Files changed:
- RatingDialog.swift (new) — rating dialog UI with toggle chips
- APIService.swift — added workerRating param + ratingRequired error
- TaskDetailScreen.swift — rating flow in completeTask + auto-complete
- project.pbxproj — added RatingDialog.swift to Xcode project
2026-03-22 12:30:18 +00:00
debe0686b7 fix: remove build-sim/ artifacts and add to .gitignore
2,562 Xcode simulator build files were committed by mistake.
Actual source is only ~35 files in PayfritWorks/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 06:01:14 +00:00
John Pinkyfloyd
0639fe12c2 Add Mac context memory for bot spawning
- iOS app architecture and key files
- API endpoints and task flow
- Database access and key queries
- Build commands
- Team info

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-20 14:48:48 -07:00
John Pinkyfloyd
8d9fa1caa6 Migrate API endpoints from CFML to PHP
- Replace all .cfm endpoints with .php (PHP backend migration)
- Update debug strings and test walkthrough documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-14 17:16:36 -07:00
John Pinkyfloyd
bbdc5a91c2 Add role-aware cash collection for staff vs admin
Parse RoleID from myBusinesses API. CashCollectionSheet now shows
role-appropriate messaging: staff keeps cash, admin deposits to business.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:01:24 -08:00
John Pinkyfloyd
8d604649a2 Fix isChat to also check taskTypeName for 'chat' 2026-02-17 11:38:31 -08:00
John Pinkyfloyd
445ec768b4 Fix order items and table members sections to expand full width 2026-02-17 11:32:44 -08:00
John Pinkyfloyd
25bfb9f4df Add chat icon button in customer section for chat tasks 2026-02-17 11:28:36 -08:00
John Pinkyfloyd
4712f40c8b Fix chat task accept - don't set taskAccepted flag to avoid unwanted navigation 2026-02-17 11:26:52 -08:00
John Pinkyfloyd
c020fca1d6 Fix orderTotal conversion - server returns dollars not cents 2026-02-17 09:39:49 -08:00
John Pinkyfloyd
40b1ee5d60 Add debug logging for orderTotal 2026-02-17 09:35:19 -08:00
John Pinkyfloyd
4a2f984c94 Add Cancel Order feature for cash tasks
- Add cancelOrder parameter to completeTask API method
- Add Cancel Order button below Collect Cash in task detail
- Show confirmation alert before canceling
- On confirm, call complete endpoint with CancelOrder: true

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 09:29:56 -08:00
John Pinkyfloyd
d69270a4af iOS parity fixes from Android comparison
- Add profile endpoints (getProfile/updateProfile) to APIService
- Fix beacon dwell time: 5 → 30 samples to match Android (~3s)
- Make chat WebSocket dev-aware (uses IS_DEV flag)
- Add activeTaskCount field to Employment model
- Fix categoryName: remove incorrect fallback to taskTypeName

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 14:07:24 -08:00
John Pinkyfloyd
c71b9f7dea Add ios-marketing idiom for App Store icon display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 19:37:59 -08:00
John Pinkyfloyd
99464d88ce Update app icon
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 13:22:41 -08:00
John Mizerek
e162f4957d Add BeaconShardPool for iBeacon shard UUID scanning
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 14:46:09 -08:00
John Pinkyfloyd
7dfe8f593e Add IS_DEV flag, dev ribbon, new app icon, and UI improvements
- Add global IS_DEV flag controlling API endpoint (dev vs biz.payfrit.com),
  dev ribbon banner, and magic OTP hints
- Add diagonal orange DEV ribbon overlay (Widgets/DevRibbon.swift)
- Replace app icon with properly centered dark-outline SVG on white background
- Fix display name with InfoPlist.strings localization
- Redesign business selection cards with initial letter, status pill, task count
- Make businesses only tappable when pending tasks > 0 (dimmed otherwise)
- Simplify LoginScreen and RootView to use IS_DEV directly
- Fix hardcoded dev URLs to respect IS_DEV flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:07:03 -08:00
John Pinkyfloyd
75c0698ec4 Update app display name to "Payfrit Works"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:41:40 -08:00
John Pinkyfloyd
3d057b481d Initial commit: Payfrit Works iOS native app 2026-02-01 23:38:34 -08:00