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

add more detail to "next steps" cards when income not provided #355

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
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