Add scheduled tasks with a Project tab section and lead tools

This commit is contained in:
Ian Gulliver
2026-10-21 15:15:20 -07:00
parent 4b4763779d
commit f445e1cac3
21 changed files with 1689 additions and 347 deletions
+9
View File
@@ -3,6 +3,9 @@ package store
import (
"context"
"database/sql"
"time"
"g.fc.run/ai/byre/internal/api"
)
type Work struct {
@@ -19,6 +22,8 @@ type Work struct {
AdvanceStages []string
LeadDeliveries []LeadDelivery
QueuedDelivery []QueuedDelivery
DueSchedules []api.Schedule
NextSchedule *time.Time
}
func (s *Store) Coordinate(ctx context.Context) (Work, error) {
@@ -88,6 +93,10 @@ func (s *Store) Coordinate(ctx context.Context) (Work, error) {
return err
}
work.QueuedDelivery, err = queuedDeliveries(ctx, tx)
if err != nil {
return err
}
work.DueSchedules, work.NextSchedule, err = dueSchedules(ctx, tx)
return err
})
return work, err