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

Build new licence history page #1182

Merged
merged 99 commits into from
Aug 29, 2024
Merged

Build new licence history page #1182

merged 99 commits into from
Aug 29, 2024

Conversation

rvsiyad
Copy link
Contributor

@rvsiyad rvsiyad commented Jul 10, 2024

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

Billing & Data rely on the NALD ‘mod log’ to be able to see that all 3 legs are in sync when managing a licence. For example, when a licence is varied (a new licence version is created), new charge and return versions are also created (if applicable).

This PR is focused on building a new 'History' page to replicate ‘mod log’ within our system. It should display all licence, charge and return versions for the licence in a single table (no pagination), ordered by created date in descending order.

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

Billing & Data rely on the NALD ‘mod log’ to be able to see that all 3 legs are in sync when managing a licence.
For example, when a licence is varied (a new licence version is created), new charge and return versions are also created (if applicable).

This PR is focused on building a new 'History' page to replicate ‘mod log’ within our system. It should display all licence,
charge and return versions for the licence in a single table (no pagination), ordered by created date in descending order.
@rvsiyad rvsiyad added the enhancement New feature or request label Jul 10, 2024
@rvsiyad rvsiyad self-assigned this Jul 10, 2024
rvsiyad added 27 commits July 10, 2024 14:25
@rvsiyad rvsiyad requested a review from Cruikshanks August 28, 2024 10:56
Cruikshanks and others added 5 commits August 29, 2024 11:29
This makes it more consistent with the other controllers.

Co-authored-by: Roble <[email protected]>                     50 chars is here ->
We have updated the pageTitle to include the licence reference. However, we don't want to repeat that in the main H1.

So, we can now just hard code the H1 as `History`.

Co-authored-by: Roble <[email protected]>
Decided that the licence instance returned is sufficient for passing as is to the presenter which can then extract the properties it needs.

Co-authored-by: Roble <[email protected]>
Split the work of dealing with the different version types into their own methods. They can then deal with the differences as opposed to using generic methods that are only needed for certain version types.

Co-authored-by: Roble <[email protected]>
Cruikshanks added a commit that referenced this pull request Aug 29, 2024
https://eaflood.atlassian.net/browse/WATER-4566

> Part of the work to display NALD mod log records as history in WRLS

We recently added a new `history()` modifier to the charge, licence, and return version models that allows us to pull through mod log, and in some cases user details when querying for a record. We then call `$` instance methods to determine, who created a record or what the reason was.

We're making use of it in [Build new licence history page](#1182) but that change has highlighted to make `$createdAt()` work we have to ensure we include `createdAt` in the parent query's `select()`.

This should really be dealt with in the `history()` modifier. This change makes it so!
Cruikshanks added a commit that referenced this pull request Aug 29, 2024
https://eaflood.atlassian.net/browse/WATER-4566

> Part of the work to display NALD mod log records as history in WRLS

We recently added a new `history()` modifier to the charge, licence, and return version models that allows us to pull through the mod log and, in some cases, user details when querying for a record. We then call `$` instance methods to determine who created a record or what the reason was.

We're using it in [Build new licence history page](#1182), but that change has highlighted that to make `$createdAt()` work, we have to ensure we include `createdAt` in the parent query's `select()`.

This should be dealt with in the `history()` modifier. This change makes it so!
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

@rvsiyad rvsiyad merged commit b8fc0aa into main Aug 29, 2024
6 checks passed
@rvsiyad rvsiyad deleted the build-new-licence-history-page branch August 29, 2024 16:14
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.

2 participants