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

Select additional submission options page #988

Conversation

Demwunz
Copy link
Contributor

@Demwunz Demwunz commented May 7, 2024

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

Additional options for submission page.

This branch will provide options for "multiple upload", or "none".

Appropriate notifications will be shown to user based on selection.

@Demwunz Demwunz added the enhancement New feature or request label May 7, 2024
@Demwunz Demwunz self-assigned this May 7, 2024
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from 9e546d7 to 7921d8a Compare May 10, 2024 09:41
Demwunz added 3 commits May 14, 2024 14:26
https://eaflood.atlassian.net/browse/WATER-4306

Additional options for submission page.

This will provide option for multiple upload, or none.

Appropriate notifications will be shown to user based on selection.
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from 7921d8a to 4254b22 Compare May 14, 2024 13:27
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from cb81efb to 55b9d35 Compare May 14, 2024 18:52
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from a0bf2d5 to 79329a8 Compare May 15, 2024 08:08
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from 79329a8 to 10791ed Compare May 15, 2024 08:21
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from c072acd to 355386a Compare May 15, 2024 12:34
@Demwunz Demwunz marked this pull request as ready for review May 15, 2024 12:41
@Demwunz Demwunz requested a review from Cruikshanks May 15, 2024 12:41
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.

I don't often say this, but I think we might have too many tests! 😂

If you really think we should be testing both setting and updating values in our pages do please argue the case. But be warned, if I end up agreeing then the principle applies to all the other pages! 😜

@Demwunz Demwunz requested a review from Cruikshanks May 16, 2024 09:21
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from e413ac8 to f3a5fe8 Compare May 16, 2024 09:51
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.

Really sorry @Demwunz I should have spotted the single option select thing on my first pass.

@Demwunz Demwunz requested a review from Cruikshanks May 16, 2024 15:58
@Demwunz Demwunz force-pushed the WATER-4306-select-additional-submission-options-page-layout-and-controls branch from ce76694 to 64b40b2 Compare May 16, 2024 17:19
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.

Just some really minor NITs left to resolve then all done!

@@ -10,6 +10,7 @@ const AddService = require('../services/return-requirements/add.service.js')
const AgreementsExceptionsService = require('../services/return-requirements/agreements-exceptions.service.js')
const CancelService = require('../services/return-requirements/cancel.service.js')
const CheckService = require('../services/return-requirements/check.service.js')
const AdditionalSubmissionOptionsService = require('../services/return-requirements/additional-submission-options.service.js')
Copy link
Member

Choose a reason for hiding this comment

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

NIT - think this just needs to go up a few lines to be under AbstractionPeriodService.

Comment on lines 57 to 60
* When a single agreement and exception is checked by the user, it returns as a string. When multiple agreements and
* exceptions are checked, the 'additionalSubmissionOptions' is returned as an array.
* This function works to make those single
* selected string 'additionalSubmissionOptions' into an array for uniformity.
Copy link
Member

Choose a reason for hiding this comment

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

Just needs an update after the copy and paste.

Suggested change
* When a single agreement and exception is checked by the user, it returns as a string. When multiple agreements and
* exceptions are checked, the 'additionalSubmissionOptions' is returned as an array.
* This function works to make those single
* selected string 'additionalSubmissionOptions' into an array for uniformity.
* When a single additional submission option is checked by the user, it returns as a string. When multiple options are
* checked, the 'additionalSubmissionOptions' is returned as an array. This function works to make those single selected
* string 'additionalSubmissionOptions' into an array for uniformity.

Comment on lines 23 to 28
/**
* NOTE: When a single point is checked by a user, it returns as a string.
* When multiple additionalSubmissionOptions are checked, the 'payload' is returned as an array.
* To make Joi validation straightforward, if the "payload.additionalSubmissionOptions" is a string,
* it is turned into an array and validated as such.
*/
Copy link
Member

Choose a reason for hiding this comment

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

I think this comment can be deleted now.

Suggested change
/**
* NOTE: When a single point is checked by a user, it returns as a string.
* When multiple additionalSubmissionOptions are checked, the 'payload' is returned as an array.
* To make Joi validation straightforward, if the "payload.additionalSubmissionOptions" is a string,
* it is turned into an array and validated as such.
*/

@Demwunz Demwunz requested a review from Cruikshanks May 17, 2024 09:05
@Demwunz Demwunz merged commit e69fcee into main May 17, 2024
6 checks passed
@Demwunz Demwunz deleted the WATER-4306-select-additional-submission-options-page-layout-and-controls branch May 17, 2024 10:08
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