feat-WIP: Adds update to trunk-size form, currently height / width is not working though.

This commit is contained in:
2026-01-13 20:23:25 -05:00
parent f990c4b6db
commit dfee50de8e
7 changed files with 264 additions and 83 deletions

View File

@@ -126,6 +126,8 @@ public enum DuctSizing {
extension DuctSizing {
// Represents the database model that the duct sizes have been calculated
// for.
public struct TrunkContainer: Codable, Equatable, Identifiable, Sendable {
public var id: TrunkSize.ID { trunk.id }
@@ -141,6 +143,7 @@ extension DuctSizing {
}
}
// Represents the database model.
public struct TrunkSize: Codable, Equatable, Identifiable, Sendable {
public let id: UUID
@@ -187,6 +190,23 @@ extension DuctSizing.TrunkSize {
}
}
public struct Update: Codable, Equatable, Sendable {
public let type: TrunkType?
public let rooms: [Room.ID: [Int]]?
public let height: Int?
public init(
type: DuctSizing.TrunkSize.TrunkType? = nil,
rooms: [Room.ID: [Int]]? = nil,
height: Int? = nil
) {
self.type = type
self.rooms = rooms
self.height = height
}
}
// TODO: Make registers non-optional
public struct RoomProxy: Codable, Equatable, Identifiable, Sendable {