feat: Customer rating dialog on task completion #2

Merged
schwifty merged 1 commit from schwifty/customer-rating into main 2026-03-24 00:39:45 +00:00
Contributor

Summary

  • Adds customer rating dialog (4 yes/no questions) matching Android RatingDialog
  • Shown when API returns rating_required on task completion
  • Updates APIService.completeTask() to accept workerRating payload
  • Handles rating flow during beacon auto-complete

Flow

  1. Worker completes service point task
  2. API returns rating_required → rating dialog appears
  3. Worker answers: prepared, scope clear, respectful, would serve again
  4. Resubmits with workerRating payload → task completes

Files

File Change
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 project
## Summary - Adds customer rating dialog (4 yes/no questions) matching Android RatingDialog - Shown when API returns `rating_required` on task completion - Updates `APIService.completeTask()` to accept `workerRating` payload - Handles rating flow during beacon auto-complete ## Flow 1. Worker completes service point task 2. API returns `rating_required` → rating dialog appears 3. Worker answers: prepared, scope clear, respectful, would serve again 4. Resubmits with `workerRating` payload → task completes ## Files | File | Change | |------|--------| | `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 project |
schwifty added 1 commit 2026-03-22 12:30:50 +00:00
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
schwifty merged commit 551637f0ec into main 2026-03-24 00:39:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: payfrit/payfrit-works-ios#2
No description provided.