TCCP: Display account fee as a number #8281
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change, the TCCP list view now displays a dollar amount for each card's "account fee". This value is based off the values of several different columns in the TCCP dataset:
If a card has any fee type besides "Other", we can estimate the annual fee by multiplying the monthly fee by 12 and the weekly fee by 52. If a card has an "Other" fee, we can't do that, because it isn't represented in a predictable way in the various related "Other fee" columns, for example "Other Periodic Fee Name".
For this reason, if a card has an "Other" fee, it will show up as "See details" (we will iterate on this). If a card has no fee, it will show up as "None". If a card has a value that can be computed, we show that dollar amount.
How to test this PR
If running locally, you'll need to run
cfgov/manage.py migrate
to migrate the field type for the currency fields. Once you've done that, run a local server and visit http://localhost:8000/consumer-tools/credit-cards/explore-cards/cards/ to see a list of cards. Experiment with the credit tier selector to see different results.Screenshots
Looking at the "poor" tier, the middle column is the "Account fee" column:
Checklist