Add scheduled tasks with a Project tab section and lead tools
This commit is contained in:
@@ -171,6 +171,7 @@ private struct ProjectBlock: View {
|
||||
let project: Project
|
||||
let todo: Result<Todo, ApiError>?
|
||||
@Environment(Store.self) private var store
|
||||
@Environment(Overlays.self) private var overlays
|
||||
|
||||
var body: some View {
|
||||
let active = (store.tasks[project.id] ?? []).filter { $0.status == .active }
|
||||
@@ -203,6 +204,18 @@ private struct ProjectBlock: View {
|
||||
TaskRows(active: active)
|
||||
heading("TODO")
|
||||
TodoBlock(project: project, todo: todo, active: active)
|
||||
HStack(alignment: .firstTextBaseline) {
|
||||
heading("Schedules")
|
||||
Spacer()
|
||||
Button("New") {
|
||||
Task {
|
||||
await editSchedule(project, nil, store, overlays)
|
||||
}
|
||||
}
|
||||
.buttonStyle(WebButtonStyle())
|
||||
.help("Create a task in this project on a timer")
|
||||
}
|
||||
ScheduleRows(project: project)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user