Skip to content

Commit

Permalink
Merge branch 'main' into new_workflows_for_ira
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhacde committed Sep 18, 2024
2 parents 539264c + 6adc3e4 commit 5337ac5
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 209 deletions.
2 changes: 1 addition & 1 deletion src/components/string_input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const StringInput: FC<StringInputProps> = ({
} else if (inputValue.length > max) {
setError('Input must be at most ' + max + ' characters long')
} else if (!regexp.test(inputValue)) {
setError('Input must match' + regexp)
setError('Input must match the pattern')
} else {
setError('')
}
Expand Down
315 changes: 315 additions & 0 deletions src/templates/ira_doe_workflow_limited_assessment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
<Tabs>
<Tab eventKey="assessment" title="Assessment">

<DateInput label="Assessment date" path="assessment_date" />

<Select label="Assessment for" path="assessment_for" options={["Whole multifamily building", "Individual unit/home"]}/>

{props.data.assessment_for === 'Whole multifamily building'
? <NumberInput label="Conditioned floor area of multifamily building" path="mf_conditioned_floor_area_sq_ft" hint="Include common areas"/>
: <Select label="Conditioned floor area of single dwelling unit" path="sf_conditioned_floor_area_sq_ft" options={["LESS_THAN_500SF", "500SF_1500SF", "1500SF_2500SF", "GREATER_THAN_2500SF", ]}/>
}

<Select label="Is the year the building was built known?" path="is_year_built_known" options={["YES", "NO"]} />
{props.data.is_year_built_known === "YES" &&
<StringInput label="Year building was built" path="year_built" regexp={/^\d{4}$/} hint="Enter as YYYY"/>
}

<NumberInput label="Electrical panel max amps" path="electrical_panel_max_amps" min="30" max={props.data.assessment_for === "Whole multifamily building" ? Number.MAX_VALUE.toString() : "400"}/>

<Select label="Envelope is professionally air sealed" path="envelope_professionally_air_sealed" options={["YES", "NO", "DO_NOT_KNOW"]} />

### Ceiling/Attic

<Select label="Ceiling insulation type" path="ceiling_insulation_type" options={["BATT", "BLOWN_IN", "CLOSED_CELL_SPRAY_FOAM", "RIGID_BOARD", "NONE", "DO_NOT_KNOW"]} />

<Select label="Ceiling insulation R-value is known?" path="is_ceiling_insulation_r_value_known" options={["YES", "NO"]} />

{props.data.is_ceiling_insulation_r_value_known === "YES"
? <NumberInput label="Ceiling insulation R-value" path="ceiling_insulation_r_value" min={0}/>
: null
}

### Heating/Cooling Ducts
<Select label="Ducts are insulated" path="ducts_are_insulated" options={["YES", "NO", "DO_NOT_KNOW", "NA"]} />

<Select label="Ducts are sealed" path="ducts_are_sealed" options={["YES", "NO", "DO_NOT_KNOW", "NA"]} />

### Whole Dwelling Ventilation

<Select label="Whole home ventilation system type" path="whole_home_ventilation_system_type" options={["BALANCED", "CFIS", "ERV", "EXHAUST", "HRV", "SUPPLY", "NONE"]} />

<Select label="Is whole home ventilation system rated flow CFM known?" path="is_whole_home_ventilation_system_rated_flow_cfm_known" options={["YES", "NO"]} />

{props.data.is_whole_home_ventilation_system_rated_flow_cfm_known === "YES"
? <NumberInput label="Whole home ventilation system rated flow (CFM)" path="whole_home_ventilation_system_rated_flow_cfm" min="0" />
: null
}

## Heating Systems

<Select label="Number of heating systems" path="num_heating_systems" options={["0", "1", "2", "3"]} />

{Number(props.data.num_heating_systems) > 0 &&
<>
<h3>Heating System 1</h3>

<Select label="Fuel and system type" path="heating_systems[0].fuel_and_system_type" options={["ELECTRIC_HEAT_PUMP", "ELECTRIC_RESISTANCE_BASEBOARD", "ELECTRIC_RESISTANCE_BOILER", "ELECTRIC_RESISTANCE_FURNACE", "GAS_PROPANE_BOILER", "GAS_PROPANE_FURNACE", "OIL_BOILER", "OIL_FURNACE", "OTHER"]}/>
{props.data.heating_systems && props.data.heating_systems[0]?.fuel_and_system_type &&
<>
<Select label="Is system efficiency known?" path="heating_systems[0].is_efficiency_known" options={["YES", "NO"]} />

{props.data.heating_systems[0]?.is_efficiency_known === "YES"
? props.data.heating_systems[0].fuel_and_system_type === "ELECTRIC_HEAT_PUMP"
? <NumberInput label="Heating efficiency (HSPF)" path="heating_systems[0].efficiency_hspf" min="0" />
: <NumberInput label="Heating efficiency (AFUE)" path="heating_systems[0].efficiency_afue" min="0" max="1" />
: null
}

<Select label="Is % conditioned area served known?" path="heating_systems[0].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.heating_systems[0]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="heating_systems[0].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}
</>
}

{Number(props.data.num_heating_systems) > 1 &&
<>
<h3>Heating System 2</h3>

<Select label="Fuel and system type" path="heating_systems[1].fuel_and_system_type" options={["ELECTRIC_HEAT_PUMP", "ELECTRIC_RESISTANCE_BASEBOARD", "ELECTRIC_RESISTANCE_BOILER", "ELECTRIC_RESISTANCE_FURNACE", "GAS_PROPANE_BOILER", "GAS_PROPANE_FURNACE", "OIL_BOILER", "OIL_FURNACE", "OTHER"]}/>
{props.data.heating_systems && props.data.heating_systems[1]?.fuel_and_system_type &&
<>
<Select label="Is system efficiency known?" path="heating_systems[1].is_efficiency_known" options={["YES", "NO"]} />

{props.data.heating_systems[1]?.is_efficiency_known === "YES"
? props.data.heating_systems[1].fuel_and_system_type === "ELECTRIC_HEAT_PUMP"
? <NumberInput label="Heating efficiency (HSPF)" path="heating_systems[1].efficiency_hspf" min="0" />
: <NumberInput label="Heating efficiency (AFUE)" path="heating_systems[1].efficiency_afue" min="0" max="1" />
: null
}

<Select label="Is % conditioned area served known?" path="heating_systems[1].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.heating_systems[1]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="heating_systems[1].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}
</>
}

{Number(props.data.num_heating_systems) > 2 &&
<>
<h3>Heating System 3</h3>

<Select label="Fuel and system type" path="heating_systems[2].fuel_and_system_type" options={["ELECTRIC_HEAT_PUMP", "ELECTRIC_RESISTANCE_BASEBOARD", "ELECTRIC_RESISTANCE_BOILER", "ELECTRIC_RESISTANCE_FURNACE", "GAS_PROPANE_BOILER", "GAS_PROPANE_FURNACE", "OIL_BOILER", "OIL_FURNACE", "OTHER"]}/>
{props.data.heating_systems && props.data.heating_systems[2]?.fuel_and_system_type &&
<>
<Select label="Is system efficiency known?" path="heating_systems[2].is_efficiency_known" options={["YES", "NO"]} />

{props.data.heating_systems[2]?.is_efficiency_known === "YES"
? props.data.heating_systems[2].fuel_and_system_type === "ELECTRIC_HEAT_PUMP"
? <NumberInput label="Heating efficiency (HSPF)" path="heating_systems[2].efficiency_hspf" min="0" />
: <NumberInput label="Heating efficiency (AFUE)" path="heating_systems[2].efficiency_afue" min="0" max="1" />
: null
}

<Select label="Is % conditioned area served known?" path="heating_systems[2].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.heating_systems[2]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="heating_systems[2].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}
</>
}

## Cooling Systems

<Select label="Number of cooling systems" path="num_cooling_systems" options={["0", "1", "2", "3"]} />

{Number(props.data.num_cooling_systems) > 0 &&
<>
<h3>Cooling System 1</h3>
<Select label="Is system efficiency known?" path="cooling_systems[0].is_efficiency_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[0]?.is_efficiency_known === "YES" &&
<NumberInput label="Cooling efficiency (SEER)" path="cooling_systems[0].efficiency_seer" min="0" />
}

<Select label="Is % conditioned area served known?" path="cooling_systems[0].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[0]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="cooling_systems[0].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}

{Number(props.data.num_cooling_systems) > 1 &&
<>
<h3>Cooling System 2</h3>
<Select label="Is system efficiency known?" path="cooling_systems[1].is_efficiency_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[1]?.is_efficiency_known === "YES" &&
<NumberInput label="Cooling efficiency (SEER)" path="cooling_systems[1].efficiency_seer" min="0" />
}

<Select label="Is % conditioned area served known?" path="cooling_systems[1].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[1]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="cooling_systems[1].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}

{Number(props.data.num_cooling_systems) > 2 &&
<>
<h3>Cooling System 3</h3>
<Select label="Is system efficiency known?" path="cooling_systems[2].is_efficiency_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[2]?.is_efficiency_known === "YES" &&
<NumberInput label="Cooling efficiency (SEER)" path="cooling_systems[2].efficiency_seer" min="0" />
}

<Select label="Is % conditioned area served known?" path="cooling_systems[2].is_percent_conditioned_floor_area_served_known" options={["YES", "NO"]} />

{props.data.cooling_systems && props.data.cooling_systems[2]?.is_percent_conditioned_floor_area_served_known === "YES" &&
<NumberInput label="% conditioned area served" path="cooling_systems[2].percent_conditioned_floor_area_served" min="0" max="100" />
}
</>
}

</Tab>

<Tab eventKey="report" title="Report">

<PrintSection label="Print Report">
---
# IRA Limited Assessment

**Installer:**<br/>
{props.project.data_.installer?.name ? <span>&nbsp;&nbsp;&nbsp;&nbsp;{props.project.data_.installer?.name}</span> : null} {props.project.data_.installer?.name ? <br/>: null}
{props.project.data_.installer?.company_name ? <span>&nbsp;&nbsp;&nbsp;&nbsp;{props.project.data_.installer?.company_name}</span> : null}{props.project.data_.installer?.company_name ? <br/>: null}

**Assessment Date:** <DateStr date={props.data.install_date}/>

**Assessment For:** {props.data.assessment_for}

<p>
{props.data.assessment_for === 'Whole multifamily building'
? <span><strong>Multifamily Building Conditioned Area (ft<sup>2</sup>):</strong> {props.data.mf_conditioned_floor_area_sq_ft}</span>
: <span><strong>Single-family/unit Conditioned Area (ft<sup>2</sup>):</strong> {props.data.sf_conditioned_floor_area_sq_ft}</span>
}
</p>

**Year Building was Built:** {props.data.is_year_built_known ? props.data.year_built : "NOT_KNOWN"}

**Electrical Panel Max Amps:** {props.data.electrical_panel_max_amps}

**Building Envelope Professionally Air Sealed:** {props.data.envelope_professionally_air_sealed}

**Ceiling Insulation Type:** {props.data.ceiling_insulation_type}

**Ceiling Insulation R-Value:** {props.data.is_ceiling_insulation_r_value_known === "YES"
? props.data.ceiling_insulation_r_value
: "NOT_KNOWN"
}

**Heating/Cooling Ducts are Insulated:** {props.data.ducts_are_insulated}

**Heating/Cooling Ducts are Sealed:** {props.data.ducts_are_sealed}

**Whole Dwelling Ventilation System Type:** {props.data.whole_home_ventilation_system_type}

**Whole-Dwelling Ventilation Rate (CFM):** {props.data.is_whole_home_ventilation_system_rated_flow_cfm_known === "YES"
? props.data.whole_home_ventilation_system_rated_flow_cfm
: "NOT_KNOWN"
}

{props.data.heating_systems &&
<>
{Number(props.data.num_heating_systems) > 0 && props.data.heating_systems[0] &&
<>
<h3>Heating System 1</h3>

<p><strong>Fuel and System Type: </strong>{props.data.heating_systems[0].fuel_and_system_type}</p>

{props.data.heating_systems[0].fuel_and_system_type === 'ELECTRIC_HEAT_PUMP'
? <p><strong>Heating Efficiency (HSPF): </strong>{props.data.heating_systems[0].is_efficiency_known === 'YES' ? props.data.heating_systems[0].efficiency_hspf : "NOT_KNOWN"}</p>
: <p><strong>Heating Efficiency (AFUE): </strong>{props.data.heating_systems[0].is_efficiency_known === 'YES' ? props.data.heating_systems[0].efficiency_afue : "NOT_KNOWN"}</p>
}

<p><strong>Percent Conditioned Area Served: </strong>{props.data.heating_systems[0].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.heating_systems[0].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
{Number(props.data.num_heating_systems) > 1 && props.data.heating_systems[1] &&
<>
<h3>Heating System 2</h3>

<p><strong>Fuel and System Type: </strong>{props.data.heating_systems[1].fuel_and_system_type}</p>

{props.data.heating_systems[1].fuel_and_system_type === 'ELECTRIC_HEAT_PUMP'
? <p><strong>Heating Efficiency (HSPF): </strong>{props.data.heating_systems[1].is_efficiency_known === 'YES' ? props.data.heating_systems[1].efficiency_hspf : "NOT_KNOWN"}</p>
: <p><strong>Heating Efficiency (AFUE): </strong>{props.data.heating_systems[1].is_efficiency_known === 'YES' ? props.data.heating_systems[1].efficiency_afue : "NOT_KNOWN"}</p>
}

<p><strong>Percent Conditioned Area Served: </strong>{props.data.heating_systems[1].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.heating_systems[1].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
{Number(props.data.num_heating_systems) > 2 && props.data.heating_systems[2] &&
<>
<h3>Heating System 3</h3>

<p><strong>Fuel and System Type: </strong>{props.data.heating_systems[2].fuel_and_system_type}</p>

{props.data.heating_systems[2].fuel_and_system_type === 'ELECTRIC_HEAT_PUMP'
? <p><strong>Heating Efficiency (HSPF): </strong>{props.data.heating_systems[2].is_efficiency_known === 'YES' ? props.data.heating_systems[2].efficiency_hspf : "NOT_KNOWN"}</p>
: <p><strong>Heating Efficiency (AFUE): </strong>{props.data.heating_systems[2].is_efficiency_known === 'YES' ? props.data.heating_systems[2].efficiency_afue : "NOT_KNOWN"}</p>
}

<p><strong>Percent Conditioned Area Served: </strong>{props.data.heating_systems[2].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.heating_systems[2].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
</>
}

{props.data.cooling_systems &&
<>
{Number(props.data.num_cooling_systems) > 0 && props.data.cooling_systems[0] &&
<>
<h3>Cooling System 1</h3>

<p><strong>Cooling Efficiency (SEER): </strong>{props.data.cooling_systems[0].is_efficiency_known === 'YES' ? props.data.cooling_systems[0].efficiency_seer : "NOT_KNOWN"}</p>

<p><strong>Percent Conditioned Area Served: </strong>{props.data.cooling_systems[0].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.cooling_systems[0].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
{Number(props.data.num_cooling_systems) > 1 && props.data.cooling_systems[1] &&
<>
<h3>Cooling System 2</h3>

<p><strong>Cooling Efficiency (SEER): </strong>{props.data.cooling_systems[1].is_efficiency_known === 'YES' ? props.data.cooling_systems[1].efficiency_seer : "NOT_KNOWN"}</p>

<p><strong>Percent Conditioned Area Served: </strong>{props.data.cooling_systems[1].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.cooling_systems[1].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
{Number(props.data.num_cooling_systems) > 2 && props.data.cooling_systems[2] &&
<>
<h3>Cooling System 3</h3>

<p><strong>Cooling Efficiency (SEER): </strong>{props.data.cooling_systems[2].is_efficiency_known === 'YES' ? props.data.cooling_systems[2].efficiency_seer : "NOT_KNOWN"}</p>

<p><strong>Percent Conditioned Area Served: </strong>{props.data.cooling_systems[2].is_percent_conditioned_floor_area_served_known === 'YES' ? props.data.cooling_systems[2].percent_conditioned_floor_area_served : "NOT_KNOWN"}</p>
</>
}
</>
}

</PrintSection>
</Tab>

</Tabs>
8 changes: 6 additions & 2 deletions src/templates/templates_config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import DOEWorkflowHeatPumpWaterHeaterTemplate from './doe_workflow_heat_pump_water_heater.mdx'
import DOEWorkflowAtticAirSealTemplate from './doe_workflow_attic_air_sealing.mdx'
import DOEWorkflowAtticInsulationTemplate from './doe_workflow_attic_insulation.mdx'
import DOEWorkflowDuctlessHeatPumpTemplate from './doe_workflow_heat_pump_ductless.mdx'
import DOEWorkflowDuctedHeatPumpTemplate from './doe_workflow_heat_pump_ducted.mdx'
import DOEWorkflowDuctAirSealTemplate from './ira_doe_workflow_duct_air_sealing_and_insulation.mdx'
Expand All @@ -19,6 +17,8 @@ import DOEWorkflowMechanicalVentilation from './ira_doe_workflow_mechanical_vent
import DOEWorkflowSlapFoundationExterior from './ira_doe_workflow_slap_foundation_exterior_sealing_and_insulation.mdx'
import DOEWorkflowWallAirSealingAndInsulation from './ira_doe_workflow_wall_air_sealing_and_insulation_dry_fill.mdx'
import DOEWorkflowAtticAirSealingAndInsulation from './ira_doe_workflow_attic_air_sealing_and_insulation.mdx'
import IRADOEWorkflowLimitedAssessment from './ira_doe_workflow_limited_assessment.mdx'

import { MDXProps } from 'mdx/types'

interface TemplatesConfig {
Expand Down Expand Up @@ -108,6 +108,10 @@ const templatesConfig: TemplatesConfig = {
// title: 'Wall Air Sealing and Insulation (Drill and Fill)',
// template: DOEWorkflowWallAirSealingAndInsulation,
// }
ira_doe_workflow_limited_assessment: {
title: 'IRA Limited Assessment',
template: IRADOEWorkflowLimitedAssessment,
},
}

// Assuming TemplatesConfig is defined somewhere as a type or interface
Expand Down
Loading

0 comments on commit 5337ac5

Please sign in to comment.