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 copy from existing returns #1056

Closed
wants to merge 19 commits into from

Conversation

robertparkinson
Copy link
Collaborator

@robertparkinson robertparkinson commented May 29, 2024

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

As part of our work to replace NALD for handing return requirements we want to be able to copy data from an existing returns. This PR adds the option to the "How do you want to set up the returns" page and checks to see if there is any existing returns for the current licence. If there is show the extra option.

@robertparkinson robertparkinson changed the title add copy from existing returns Add copy from existing returns May 30, 2024
@robertparkinson robertparkinson self-assigned this May 30, 2024
@robertparkinson robertparkinson marked this pull request as ready for review May 30, 2024 14:57
Copy link
Contributor

@Beckyrose200 Beckyrose200 left a comment

Choose a reason for hiding this comment

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

Looks really good, just a few comments :)

Copy link
Contributor

@Beckyrose200 Beckyrose200 left a comment

Choose a reason for hiding this comment

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

Few more small comments :)

@@ -5,23 +5,25 @@
* @module SetupService
*/

const FetchReturnRequirementsService = require('./fetch-return-requirements.service.js')
const SetupPresenter = require('../../presenters/return-requirements/setup.presenter.js')
const SessionModel = require('../../models/session.model.js')
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a nit comment but these two need to be swapped round
const SessionModel = require('../../models/session.model.js')
const SetupPresenter = require('../../presenters/return-requirements/setup.presenter.js')

// Thing under test
const ReturnRequirementModel = require('../../app/models/return-requirement.model.js')

describe('Return version model', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
describe('Return version model', () => {
describe('Return requirement model', () => {

'use strict'

/**
* @module ReturnVersionHelper
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @module ReturnVersionHelper
* @module ReturnRequirementHelper

*
* @param {Object} [data] Any data you want to use instead of the defaults used here or in the database
*
* @returns {Promise<module:ReturnVersionModel>} The instance of the newly created record
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @returns {Promise<module:ReturnVersionModel>} The instance of the newly created record
* @returns {Promise<module:ReturnRequirementModel>} The instance of the newly created record

@Cruikshanks Cruikshanks self-assigned this Jun 4, 2024
Copy link
Contributor

@Beckyrose200 Beckyrose200 left a comment

Choose a reason for hiding this comment

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

@Cruikshanks Cruikshanks marked this pull request as draft June 5, 2024 19:22
@Cruikshanks
Copy link
Member

Superseded by #1081 and #1071

@Cruikshanks Cruikshanks closed this Jun 7, 2024
@Cruikshanks Cruikshanks deleted the return-requirements-from-existing-returns branch June 13, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants