Account Dashboard Mitigation#345
Conversation
91da94a to
fba95b2
Compare
8197690 to
9bb6f75
Compare
|
Can we split off the delete account functionality from this ticket? It seems like the odd one out here. |
9bb6f75 to
1db43a7
Compare
MelissaAutumn
left a comment
There was a problem hiding this comment.
Few nits. We probably should leave number / currency formatting to Intl.NumberFormat or vue-i18n if that handles it the same.
| * - Converts storage bytes to GB | ||
| * - Removes unnecessary decimal places | ||
| */ | ||
| export const formatSubscriptionData = ( |
There was a problem hiding this comment.
Can you add context for the single letter variables in the docblock? Mention they should be filled with vue-i18n's n,t,d vars.
There was a problem hiding this comment.
Definitely! Added in latest commit, thanks!
|
|
||
| # Get the plan associated with the product | ||
| try: | ||
| plan = Plan.objects.get(product=subscription_item.product) |
There was a problem hiding this comment.
You can use user.plan now. You might need to fix your local db so it's correctly filled out as it was added in #337.
There was a problem hiding this comment.
Nice! Makes sense, changed in the latest commit, thanks!
| currencyDisplay: 'narrowSymbol', | ||
| }); | ||
|
|
||
| return formatted.replace(/[\d\s.,]/g, ''); |
There was a problem hiding this comment.
I don't think we need to retrieve the currency symbol, either vue-i18n should handle it or Intl.NumberFormat should.
There was a problem hiding this comment.
Interesting, I was already using n from vue-i18n so that we could later extract the currency from the produced output but TIL that there's a way to use i18n-n component itself with separate slots for currency symbol, integer, group and fraction :O (https://vue-i18n.intlify.dev/guide/essentials/number#custom-formatting).
Updated here, thanks!
| }, | ||
| }; | ||
|
|
||
| const numberFormats = { |
Description of changes
Screenshots
Known issues / Things to improve
Related issues
Solves #344
Solves #368