feat(ui): add sport backgrounds to share cards, achievement filtering, and wizard validation
- Add ShareCardSportBackground with floating sport icons for share cards - Share cards now show sport-specific backgrounds (single or multiple sports) - Achievement collection share respects sport filter selection - Add ability to share individual achievements from detail sheet - Trip wizard ReviewStep highlights missing required fields in red - Add FieldValidation model to TripWizardViewModel Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,17 @@ final class TripWizardViewModel {
|
||||
hasSetRepeatCities
|
||||
}
|
||||
|
||||
/// Field validation for the review step - shows which fields are missing
|
||||
var fieldValidation: FieldValidation {
|
||||
FieldValidation(
|
||||
sports: selectedSports.isEmpty ? .missing : .valid,
|
||||
dates: hasSetDates ? .valid : .missing,
|
||||
regions: selectedRegions.isEmpty ? .missing : .valid,
|
||||
routePreference: hasSetRoutePreference ? .valid : .missing,
|
||||
repeatCities: hasSetRepeatCities ? .valid : .missing
|
||||
)
|
||||
}
|
||||
|
||||
// MARK: - Sport Availability
|
||||
|
||||
func canSelectSport(_ sport: Sport) -> Bool {
|
||||
@@ -120,3 +131,18 @@ final class TripWizardViewModel {
|
||||
mustStopLocations = []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Field Validation
|
||||
|
||||
struct FieldValidation {
|
||||
enum Status {
|
||||
case valid
|
||||
case missing
|
||||
}
|
||||
|
||||
let sports: Status
|
||||
let dates: Status
|
||||
let regions: Status
|
||||
let routePreference: Status
|
||||
let repeatCities: Status
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user