WIP: Adds database field to delegate airflow to another room, adds select to room form.
Some checks failed
CI / Linux Tests (push) Failing after 6m39s

This commit is contained in:
2026-02-06 12:11:01 -05:00
parent 728a6c3000
commit f2c79ad56f
8 changed files with 134 additions and 7 deletions

View File

@@ -30,6 +30,10 @@ enum RoomRowType {
struct RoomCreateParser: ParserPrinter {
// FIX: The delegated to field won't work here, as we potentially have not created
// the room yet, so we will need an intermediate representation for the csv data
// that uses a room's name or disregard and require user to delegate airflow in
// the ui.
var body: some ParserPrinter<Substring.UTF8View, Room.Create> {
ParsePrint {
Prefix { $0 != UInt8(ascii: ",") }.map(.string)
@@ -45,6 +49,10 @@ struct RoomCreateParser: ParserPrinter {
}
",".utf8
Int.parser()
",".utf8
Optionally {
Room.ID.parser()
}
}
.map(.memberwise(Room.Create.init))
}