Draft booking flow

This commit is contained in:
mr
2026-03-16 08:52:31 +01:00
parent 12ba346427
commit 465b91fd6e
4 changed files with 21 additions and 6 deletions

View File

@@ -58,10 +58,15 @@ func GenerateShallow(request *tools.APIRequest) (*Planner, error) {
func generate(request *tools.APIRequest, shallow bool) (*Planner, error) {
accessor := booking.NewAccessor(request)
bookings, code, err := accessor.Search(nil, "*", false)
// Include both confirmed (IsDraft=false) and draft (IsDraft=true) bookings
// so the planner reflects the full picture: first-come first-served on all
// pending reservations regardless of confirmation state.
confirmed, code, err := accessor.Search(nil, "*", false)
if code != 200 || err != nil {
return nil, err
}
drafts, _, _ := accessor.Search(nil, "*", true)
bookings := append(confirmed, drafts...)
p := &Planner{
GeneratedAt: time.Now(),