wip
This commit is contained in:
@@ -46,7 +46,8 @@ data class TaskCreateRequest(
|
|||||||
val priority: Int,
|
val priority: Int,
|
||||||
val status: Int? = null,
|
val status: Int? = null,
|
||||||
@SerialName("due_date") val dueDate: String,
|
@SerialName("due_date") val dueDate: String,
|
||||||
@SerialName("estimated_cost") val estimatedCost: String? = null
|
@SerialName("estimated_cost") val estimatedCost: String? = null,
|
||||||
|
val archived: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
|||||||
@@ -302,7 +302,8 @@ fun EditTaskScreen(
|
|||||||
priority = selectedPriority!!.id,
|
priority = selectedPriority!!.id,
|
||||||
status = selectedStatus!!.id,
|
status = selectedStatus!!.id,
|
||||||
dueDate = dueDate,
|
dueDate = dueDate,
|
||||||
estimatedCost = estimatedCost.ifBlank { null }
|
estimatedCost = estimatedCost.ifBlank { null },
|
||||||
|
archived = task.archived
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ struct AddTaskView: View {
|
|||||||
priority: Int32(priority.id),
|
priority: Int32(priority.id),
|
||||||
status: selectedStatus.map { KotlinInt(value: $0.id) },
|
status: selectedStatus.map { KotlinInt(value: $0.id) },
|
||||||
dueDate: dueDateString,
|
dueDate: dueDateString,
|
||||||
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost
|
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost,
|
||||||
|
archived: false
|
||||||
)
|
)
|
||||||
|
|
||||||
viewModel.createTask(request: request) { success in
|
viewModel.createTask(request: request) { success in
|
||||||
|
|||||||
@@ -239,7 +239,8 @@ struct AddTaskWithResidenceView: View {
|
|||||||
priority: Int32(priority.id),
|
priority: Int32(priority.id),
|
||||||
status: selectedStatus.map { KotlinInt(value: $0.id) },
|
status: selectedStatus.map { KotlinInt(value: $0.id) },
|
||||||
dueDate: dueDateString,
|
dueDate: dueDateString,
|
||||||
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost
|
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost,
|
||||||
|
archived: false
|
||||||
)
|
)
|
||||||
|
|
||||||
viewModel.createTask(request: request) { success in
|
viewModel.createTask(request: request) { success in
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ struct EditTaskView: View {
|
|||||||
priority: priority.id,
|
priority: priority.id,
|
||||||
status: KotlinInt(value: status.id),
|
status: KotlinInt(value: status.id),
|
||||||
dueDate: dueDate,
|
dueDate: dueDate,
|
||||||
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost
|
estimatedCost: estimatedCost.isEmpty ? nil : estimatedCost,
|
||||||
|
archived: task.archived
|
||||||
)
|
)
|
||||||
|
|
||||||
viewModel.updateTask(id: task.id, request: request) { success in
|
viewModel.updateTask(id: task.id, request: request) { success in
|
||||||
|
|||||||
Reference in New Issue
Block a user