Skip to content

Commit

Permalink
add more detail to "next steps" cards when income not provided (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyKennedy authored Jul 19, 2022
1 parent 9b3050b commit 90c4c92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion utils/api/benefits/_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export abstract class BaseBenefit<T extends EntitlementResult> {
*/
protected getCardText(): string {
let text = this.eligibility.detail
if (this.eligibility.result === ResultKey.ELIGIBLE) {
if (
this.eligibility.result === ResultKey.ELIGIBLE ||
this.eligibility.result === ResultKey.INCOME_DEPENDENT
) {
if (this.entitlement.result > 0)
text += ` ${this.translations.detail.expectToReceive}`
text += this.getAutoEnrollment()
Expand Down
6 changes: 5 additions & 1 deletion utils/api/benefits/oasBenefit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ export class OasBenefit extends BaseBenefit<EntitlementResultOas> {
let cardCollapsedText = super.getCardCollapsedText()

// if not eligible, don't bother with any of the below
if (this.eligibility.result !== ResultKey.ELIGIBLE) return cardCollapsedText
if (
this.eligibility.result !== ResultKey.ELIGIBLE &&
this.eligibility.result !== ResultKey.INCOME_DEPENDENT
)
return cardCollapsedText

// increase at 75
if (this.currentEntitlementAmount !== this.age75EntitlementAmount)
Expand Down

0 comments on commit 90c4c92

Please sign in to comment.