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 new data formatters to base presenter #350

Merged
merged 7 commits into from
Aug 10, 2023

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4070
https://eaflood.atlassian.net/browse/WATER-4073

Whilst working on Create endpoint to generate fake data we added a number of formatters. These take DB data and re-format it to match how the UI displays the values.

We will need these formatters in future changes we'll be making, the first of which is a re-designed bill run page.

So, to help prepare for that we are adding those formatters to our BasePresenter so they are available to any future presenters we add.

https://eaflood.atlassian.net/browse/WATER-4070
https://eaflood.atlassian.net/browse/WATER-4073

Whilst working on [Create endpoint to generate fake data](#347) we added a number of formatters. These take data from the DB and re-format them to match how the UI displays the values.

We believe we are going to need these formatters in future changes we'll be making, the first of which is a re-designed bill run page.

So, to help prepare for that we are adding those formatters to our `BasePresenter` so they are available to any future presenters we add.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Aug 10, 2023
@Cruikshanks Cruikshanks self-assigned this Aug 10, 2023
Now we have added a second and will likely add more we decided a formatter with a 'generic' name would be confusing.
This one is a little different in that abstraction dates are not held as dates, but as a day and month. You add the year when you need to calculate the abstraction period.
In the bill run page when looking at the transaction detail the period needs to be formatted in this way.
@Cruikshanks Cruikshanks marked this pull request as ready for review August 10, 2023 11:18
@Cruikshanks Cruikshanks merged commit 94b7a2f into main Aug 10, 2023
@Cruikshanks Cruikshanks deleted the add-new-general-formatters-to-base-presenter branch August 10, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant