feat: wip
This commit is contained in:
@@ -42,10 +42,20 @@ public struct EquipmentSettingsForm {
|
||||
self.ratedStaticPressures = .init(staticPressures: sharedSettings.equipmentMetadata.ratedStaticPressures)
|
||||
}
|
||||
|
||||
private var equipmentTypeValidation: Bool {
|
||||
guard equipmentType == .furnaceAndCoil else { return true }
|
||||
return sharedSettings.heatingCapacity != nil
|
||||
}
|
||||
|
||||
private var filterDropValidation: Bool {
|
||||
guard includesFilterDrop else { return true }
|
||||
return sharedSettings.manufacturersIncludedFilterPressureDrop != nil
|
||||
}
|
||||
|
||||
public var isValid: Bool {
|
||||
guard equipmentType == .furnaceAndCoil
|
||||
else { return ratedStaticPressures.isValid }
|
||||
return ratedStaticPressures.isValid && sharedSettings.heatingCapacity != nil
|
||||
ratedStaticPressures.isValid
|
||||
&& equipmentTypeValidation
|
||||
&& filterDropValidation
|
||||
}
|
||||
|
||||
// Note: These need to be in display order.
|
||||
|
||||
Reference in New Issue
Block a user