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

Replace expenses multi questions for dynamic #466

Merged
merged 7 commits into from Dec 20, 2023

Conversation

analoo
Copy link
Contributor

@analoo analoo commented Dec 20, 2023

This PR uses Dynamic Fields to collect expenses data based on the expenses that a user has shared.

There are two key fields: 1) The array that stores all of the expenses selected by the user. 2) The Dynamic field and validations that will be the blueprint for additional fields that are created.

A new BasicArrayCondition checks that the data in the first key field requires a follow up question (collection of amounts).

As you can see, this change will delete A LOT of lines of code. It will reduce the cost of updating the multi select values because it means we do not need to create unique pages or unique validation.

Thanks to @bseeger and @lkemperman-cfa for creating Dynamic fields!!

@sree-cfa sree-cfa temporarily deployed to test-la-doc-uploader-pr-466 December 20, 2023 01:00 Inactive
@analoo analoo force-pushed the replace-expenses-multi-questions-for-dynamic branch from 4feeeda to 15e2811 Compare December 20, 2023 01:10
@sree-cfa sree-cfa temporarily deployed to test-la-doc-uploader-pr-466 December 20, 2023 01:11 Inactive
@analoo analoo force-pushed the replace-expenses-multi-questions-for-dynamic branch from 15e2811 to b3b3242 Compare December 20, 2023 01:21
@sree-cfa sree-cfa temporarily deployed to test-la-doc-uploader-pr-466 December 20, 2023 01:21 Inactive
@sree-cfa sree-cfa temporarily deployed to test-la-doc-uploader-pr-466 December 20, 2023 02:17 Inactive
@sree-cfa sree-cfa temporarily deployed to test-la-doc-uploader-pr-466 December 20, 2023 02:22 Inactive
@analoo analoo added the ready for review This PR is ready for code-review label Dec 20, 2023
<div class="form-card__content">
<div th:each="expense, iter:${inputData.get('householdUtilitiesExpenses[]')}"
class="spacing-below-15">
<div th:if="${expense != 'Other'}">
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we should keep this in since there's a field for this in the PDF - was there a reason for leaving it out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sree-cfa - the design says to ask the amount question for all expeneses except other:
Screenshot 2023-12-20 at 9 48 36 AM

I can add it back in.

@analoo analoo merged commit 6b43423 into main Dec 20, 2023
5 checks passed
@analoo analoo deleted the replace-expenses-multi-questions-for-dynamic branch December 20, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for code-review
Projects
None yet
2 participants