diff --git a/src/api/calculator-types-v1.ts b/src/api/calculator-types-v1.ts index ada4599..530c693 100644 --- a/src/api/calculator-types-v1.ts +++ b/src/api/calculator-types-v1.ts @@ -4,7 +4,13 @@ export type IncentiveType = | 'rebate' | 'account_credit' | 'performance_rebate'; -export type AuthorityType = 'federal' | 'state' | 'utility'; +export type AuthorityType = + | 'federal' + | 'state' + | 'utility' + | 'city' + | 'county' + | 'other'; export type AmountType = 'dollar_amount' | 'percent' | 'dollars_per_unit'; export type AmountUnit = diff --git a/src/i18n/strings/es.ts b/src/i18n/strings/es.ts index 169a199..f5740b5 100644 --- a/src/i18n/strings/es.ts +++ b/src/i18n/strings/es.ts @@ -85,6 +85,7 @@ export const templates = { s7a73c90a7c3b43b4: `un calentador de agua con bomba de calor`, s7bd0de02e230dc75: `Calentador de agua`, s7d340cf80adae3a4: `Misuri`, + s7f5b705d1bd02849: `La elegibilidad depende de la ubicación de residencia.`, s8194d17164cbd6de: `Florida`, s81aa671e64f2010e: `Dakota del Norte`, s82397872ac9bddcf: `Tamaño del hogar`, diff --git a/src/state-incentive-details.tsx b/src/state-incentive-details.tsx index 27e97f0..ad85c05 100644 --- a/src/state-incentive-details.tsx +++ b/src/state-incentive-details.tsx @@ -219,6 +219,20 @@ const IncentiveCard: FC<{ incentive: Incentive }> = ({ incentive }) => { , ]; const futureStartYear = getStartYearIfInFuture(incentive); + + // The API cannot precisely tell, from zip code alone, whether the user is in + // a specific city or county; it takes a permissive approach and returns + // incentives for localities the user *might* be in. So this indicates that + // the user should check for themselves. + // + // This is a blunt-instrument approach; in many cases there's actually no + // ambiguity as to which city or county a zip code is in, but the API + // currently doesn't take that into account. + const locationEligibilityText = ['city', 'county', 'other'].includes( + incentive.authority_type, + ) + ? msg('Eligibility depends on residence location.') + : null; return (
@@ -231,7 +245,7 @@ const IncentiveCard: FC<{ incentive: Incentive }> = ({ incentive }) => {
- {incentive.short_description} + {incentive.short_description} {locationEligibilityText}
{futureStartYear && ( diff --git a/translations/es.xlf b/translations/es.xlf index 52040dd..ec0d402 100644 --- a/translations/es.xlf +++ b/translations/es.xlf @@ -580,6 +580,10 @@ Expected in Esperado en + + Eligibility depends on residence location. + La elegibilidad depende de la ubicación de residencia. +