Fix iOS build errors - Update TaskDetail model usage for Double cost fields
Fixed type conversion issues in iOS Swift files to handle KotlinDouble for cost fields instead of String. Updated all task-related views to properly convert between String (for TextField input) and KotlinDouble (for API calls). Changes: - TaskCard.swift: Updated preview data with new TaskDetail signature (added residenceName, createdBy, createdByUsername, intervalDays; changed estimatedCost from String to Double; removed actualCost and notes) - TasksSection.swift: Updated two preview TaskDetail instances with new signature - CompleteTaskView.swift: Convert actualCost String to KotlinDouble for API - EditTaskView.swift: Convert estimatedCost between KotlinDouble and String for display and API calls - TaskFormView.swift: Convert estimatedCost String to KotlinDouble for API Pattern used: - Display: KotlinDouble -> String using .doubleValue - API: String -> Double -> KotlinDouble using KotlinDouble(double:) Build now succeeds with all type conversions properly handling Decimal/Double values from backend instead of String. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -318,7 +318,7 @@ struct TaskFormView: View {
|
||||
priority: Int32(priority.id),
|
||||
status: selectedStatus.map { KotlinInt(value: $0.id) },
|
||||
dueDate: dueDateString,
|
||||
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost,
|
||||
estimatedCost: estimatedCost.isEmpty ? nil : KotlinDouble(double: Double(estimatedCost) ?? 0.0),
|
||||
archived: false
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user