Feat: Fixing equipment settings form

This commit is contained in:
2024-06-05 10:13:41 -04:00
parent 6ec3eacb8d
commit c13b3740f2
10 changed files with 545 additions and 693 deletions

View File

@@ -1,6 +1,6 @@
import Foundation
public enum CoolingCapacity: Double, Equatable, CaseIterable {
public enum CoolingCapacity: Double, Hashable, CaseIterable, Identifiable, CustomStringConvertible {
case half = 0.5
case threeQuarter = 0.75
case one = 1
@@ -11,6 +11,33 @@ public enum CoolingCapacity: Double, Equatable, CaseIterable {
case threeAndAHalf = 3.5
case four = 4
case five = 5
public var id: Self { self }
public static var `default`: Self { .three }
public var description: String {
switch self {
case .half:
return "1/2 Ton"
case .threeQuarter:
return "3/4 Ton"
case .one:
return "1 Ton"
case .oneAndAHalf:
return "1.5 Tons"
case .two:
return "2 Tons"
case .twoAndAHalf:
return "2.5 Tons"
case .three:
return "3 Tons"
case .threeAndAHalf:
return "3.5 Tons"
case .four:
return "4 Tons"
case .five:
return "5 Tons"
}
}
}