diff --git a/iosApp/iosApp/Subviews/Task/TaskCard.swift b/iosApp/iosApp/Subviews/Task/TaskCard.swift index 4d08477..759f92a 100644 --- a/iosApp/iosApp/Subviews/Task/TaskCard.swift +++ b/iosApp/iosApp/Subviews/Task/TaskCard.swift @@ -258,6 +258,9 @@ struct TaskCard: View { task: TaskDetail( id: 1, residence: 1, + residenceName: "Main House", + createdBy: 1, + createdByUsername: "testuser", title: "Clean Gutters", description: "Remove all debris from gutters", category: TaskCategory(id: 1, name: "maintenance", orderId: 0, description: ""), @@ -265,9 +268,8 @@ struct TaskCard: View { frequency: TaskFrequency(id: 1, name: "monthly", lookupName: "", displayName: "30", daySpan: 0, notifyDays: 0), status: TaskStatus(id: 1, name: "pending", displayName: "", orderId: 0, description: ""), dueDate: "2024-12-15", - estimatedCost: "150.00", - actualCost: nil, - notes: nil, + intervalDays: 30, + estimatedCost: 150.00, archived: false, createdAt: "2024-01-01T00:00:00Z", updatedAt: "2024-01-01T00:00:00Z", diff --git a/iosApp/iosApp/Subviews/Task/TasksSection.swift b/iosApp/iosApp/Subviews/Task/TasksSection.swift index 7ccf423..c1a76c1 100644 --- a/iosApp/iosApp/Subviews/Task/TasksSection.swift +++ b/iosApp/iosApp/Subviews/Task/TasksSection.swift @@ -81,6 +81,9 @@ struct TasksSection: View { TaskDetail( id: 1, residence: 1, + residenceName: "Main House", + createdBy: 1, + createdByUsername: "testuser", title: "Clean Gutters", description: "Remove all debris", category: TaskCategory(id: 1, name: "maintenance", orderId: 1, description: ""), @@ -88,9 +91,8 @@ struct TasksSection: View { frequency: TaskFrequency(id: 1, name: "monthly", lookupName: "", displayName: "Monthly", daySpan: 0, notifyDays: 0), status: TaskStatus(id: 1, name: "pending", displayName: "Pending", orderId: 1, description: ""), dueDate: "2024-12-15", - estimatedCost: "150.00", - actualCost: nil, - notes: nil, + intervalDays: 30, + estimatedCost: 150.00, archived: false, createdAt: "2024-01-01T00:00:00Z", updatedAt: "2024-01-01T00:00:00Z", @@ -111,6 +113,9 @@ struct TasksSection: View { TaskDetail( id: 2, residence: 1, + residenceName: "Main House", + createdBy: 1, + createdByUsername: "testuser", title: "Fix Leaky Faucet", description: "Kitchen sink fixed", category: TaskCategory(id: 2, name: "plumbing", orderId: 1, description: ""), @@ -118,9 +123,8 @@ struct TasksSection: View { frequency: TaskFrequency(id: 6, name: "once", lookupName: "", displayName: "One Time", daySpan: 0, notifyDays: 0), status: TaskStatus(id: 3, name: "completed", displayName: "Completed", orderId: 1, description: ""), dueDate: "2024-11-01", - estimatedCost: "200.00", - actualCost: nil, - notes: nil, + intervalDays: nil, + estimatedCost: 200.00, archived: false, createdAt: "2024-10-01T00:00:00Z", updatedAt: "2024-11-05T00:00:00Z", diff --git a/iosApp/iosApp/Task/CompleteTaskView.swift b/iosApp/iosApp/Task/CompleteTaskView.swift index 9701843..fa267b1 100644 --- a/iosApp/iosApp/Task/CompleteTaskView.swift +++ b/iosApp/iosApp/Task/CompleteTaskView.swift @@ -308,7 +308,7 @@ struct CompleteTaskView: View { completedByEmail: "", companyName: selectedContractor?.company ?? "", completionDate: currentDate, - actualCost: actualCost.isEmpty ? nil : actualCost, + actualCost: actualCost.isEmpty ? nil : KotlinDouble(double: Double(actualCost) ?? 0.0), notes: notes.isEmpty ? nil : notes, rating: KotlinInt(int: Int32(rating)) ) diff --git a/iosApp/iosApp/Task/EditTaskView.swift b/iosApp/iosApp/Task/EditTaskView.swift index f529e62..9481449 100644 --- a/iosApp/iosApp/Task/EditTaskView.swift +++ b/iosApp/iosApp/Task/EditTaskView.swift @@ -37,7 +37,7 @@ struct EditTaskView: View { _selectedPriority = State(initialValue: task.priority) _selectedStatus = State(initialValue: task.status) _dueDate = State(initialValue: task.dueDate ?? "") - _estimatedCost = State(initialValue: task.estimatedCost ?? "") + _estimatedCost = State(initialValue: task.estimatedCost != nil ? String(task.estimatedCost!.doubleValue) : "") } var body: some View { @@ -174,7 +174,7 @@ struct EditTaskView: View { priority: priority.id, status: KotlinInt(value: status.id), dueDate: dueDate, - estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost, + estimatedCost: estimatedCost.isEmpty ? nil : KotlinDouble(double: Double(estimatedCost) ?? 0.0), archived: task.archived ) diff --git a/iosApp/iosApp/Task/TaskFormView.swift b/iosApp/iosApp/Task/TaskFormView.swift index af6a395..7f0bab7 100644 --- a/iosApp/iosApp/Task/TaskFormView.swift +++ b/iosApp/iosApp/Task/TaskFormView.swift @@ -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 )