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 View Licence Bills page #986

Merged
merged 18 commits into from
May 7, 2024
Merged

Add View Licence Bills page #986

merged 18 commits into from
May 7, 2024

Conversation

jonathangoulding
Copy link
Collaborator

https://eaflood.atlassian.net/browse/WATER-4316

The existing service handling view licence is slow because it loads all the data for the tabs in one render. Work has been done previously to refactor the summary page to load only the summary information.

This change will introduce a bills controller, service and presenter to handle the view licence bills page.

This will share the same view as the summary page and load the same 'common data' established in previous work.

https://eaflood.atlassian.net/browse/WATER-4316

The existing service handling view licence is slow because it loads all the data for the tabs in one render. Work has been done previously to refactor the summary page to load only the summary information.

This change will introduce a bills controller, service and presenter to handle the view licence bills page.

This will share the same view as the summary page and load the same 'common data' established in [previous work](#957).
@jonathangoulding jonathangoulding self-assigned this May 7, 2024
@jonathangoulding jonathangoulding added the housekeeping Refactoring, tidying up or other work which supports the project label May 7, 2024
const billsData = await FetchLicenceBillsService.go(licenceId, page)
const pageData = ViewLicenceBillsPresenter.go(billsData.bills)

const pagination = PaginatorPresenter.go(100, Number(page), `/system/licences/${licenceId}/bills`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirm this works with a bigger license

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked and this does work when the numbers are fudged. But it would be better to test with a licence with more data.

@jonathangoulding jonathangoulding marked this pull request as ready for review May 7, 2024 13:33
@jonathangoulding jonathangoulding merged commit 346a95c into main May 7, 2024
5 of 6 checks passed
@jonathangoulding jonathangoulding deleted the view-licence-bills-page branch May 7, 2024 16:01
Cruikshanks added a commit that referenced this pull request May 14, 2024
https://eaflood.atlassian.net/browse/WATER-4316

In [Add View Licence Bills page](#986) we added support for displaying the bills linked to a licence in the view licence page's 'Bills' tab.

Only we didn't spot that it should only be 'sent' bills.

This change updates the relevant fetch service to ensure the bills we get back are only those with a status of 'sent'.
Cruikshanks added a commit that referenced this pull request May 14, 2024
https://eaflood.atlassian.net/browse/WATER-4316

In [Add View Licence Bills page](#986) we added support for displaying the bills linked to a licence in the view licence page's 'Bills' tab.

Only we didn't spot that it should only be 'sent' bills.

This change updates the relevant fetch service to ensure the bills we get back are only those with a status of 'sent'.
Cruikshanks added a commit that referenced this pull request May 14, 2024
https://eaflood.atlassian.net/browse/WATER-4316

In [Add View Licence Bills page](#986) we added support for displaying the bills linked to a licence in the view licence page's 'Bills' tab.

Only we didn't spot that it should only be 'sent' bills.

This change updates the relevant fetch service to ensure the bills we get back are only those with a status of 'sent'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants