Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited assessments #223

Merged
merged 5 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
5 changes: 5 additions & 0 deletions src/templates/templates_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import IRADOEWorkflowHighEfficiencyWaterHeater from './ira_doe_workflow_high_eff
import IRADOEWorkflowHighEfficiencyModulatingBoiler from './ira_doe_workflow_high_efficiency_modulating_boiler.mdx'
import IRADOEWorkflowFullFrameReplacementWindows from './ira_doe_workflow_full_frame_replacement_windows.mdx'
import IRADOEWorkflowInsertReplacementWindows from './ira_doe_workflow_insert_replacement_windows.mdx'
import IRADOEWorkflowLimitedAssessment from './ira_doe_workflow_limited_assessment.mdx'

import { MDXProps } from 'mdx/types'

Expand Down Expand Up @@ -65,6 +66,10 @@ const templatesConfig: TemplatesConfig = {
title: 'Insert Replacement Windows',
template: IRADOEWorkflowInsertReplacementWindows,
},
ira_doe_workflow_limited_assessment: {
title: 'IRA Limited Assessment',
template: IRADOEWorkflowLimitedAssessment,
},
}

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