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
Refactor: agency links context #1390
Conversation
Testing locally - all looks good
Testing locally -
|
return TemplateResponse(request, TEMPLATE_UNVERIFIED, page.context_dict()) | ||
ctx = page.context_dict() | ||
ctx["agency_links"] = agency_links | ||
ctx["back_button"] = back_button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great solution 🎊 So much better than my hacky past logic!
Ah, yeah I forgot to mention a required step. You'll want to have an |
@angela-tran Got it! I went through the flow properly (entered in an eligible Courtesy Card user) and got to the LP screen, then manually went to http://localhost:11369/enrollment/retry and it worked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed this code looks much clearer! Nice work 👍
Thanks for the reviews @machikoyasuda and @thekaveman! |
Closes #1054
This PR implements the proposed solution on the ticket so that for the three pages that show agency links (help, unverified, and retry):
{% if "agency" in agency_button.classes %}
check{% if "btn-primary" in back_button.classes %}
checkTesting locally
/help
and/unverified
are easy to test by going through the flow (use Courtesy Card with ineligible user credentials).To test the
/enrollment/retry
view, you can modify the code as follows. Then, make sure to populate an agency in your session (either through the agency selector modal or going directly to an agency's slug) so that you can go directly to the endpoint and see that agency's contact links.