From 1b5edbfa16cf8e7757b6312ae5656b3822ae3a77 Mon Sep 17 00:00:00 2001 From: Sree P Date: Fri, 13 Oct 2023 14:20:18 -0700 Subject: [PATCH] Adding special situations section Co-authored-by: Lauren Kemperman --- .../app/inputs/LaDigitalAssister.java | 12 ++++++-- .../submission/conditions/GoingToSchool.java | 13 ++++++++ .../app/submission/conditions/IsPregnant.java | 13 ++++++++ .../conditions/OutOfStateBenefits.java | 13 ++++++++ src/main/resources/flows-config.yaml | 30 ++++++++++++------- src/main/resources/messages.properties | 12 ++++++-- .../laDigitalAssister/householdBenefits.html | 17 +++++------ .../householdBenefitsWho.html | 14 +++++---- .../laDigitalAssister/householdPregnancy.html | 17 +++++------ .../householdPregnancyWho.html | 14 +++++---- .../laDigitalAssister/householdSchool.html | 16 +++++++--- .../laDigitalAssister/householdSchoolWho.html | 14 +++++---- .../householdSpecialSituations.html | 2 +- .../LaDigitalAssisterFlowJourneyTest.java | 30 +++++++++++++++++++ 14 files changed, 158 insertions(+), 59 deletions(-) create mode 100644 src/main/java/org/ladocuploader/app/submission/conditions/GoingToSchool.java create mode 100644 src/main/java/org/ladocuploader/app/submission/conditions/IsPregnant.java create mode 100644 src/main/java/org/ladocuploader/app/submission/conditions/OutOfStateBenefits.java diff --git a/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java b/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java index 5882b36c4..21e3977f9 100644 --- a/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java +++ b/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java @@ -71,9 +71,17 @@ public class LaDigitalAssister extends FlowInputs { private String mailingAddressStreetAddress1; - private String goingToSchool; + private String schoolInd; - private String isPregnant; + private String students; + + private String pregnancyInd; + + private String pregnancies; + + private String outOfStateBenefitsInd; + + private String outOfStateBenefitsRecipients; private String receivedOutOfStateBenefits; diff --git a/src/main/java/org/ladocuploader/app/submission/conditions/GoingToSchool.java b/src/main/java/org/ladocuploader/app/submission/conditions/GoingToSchool.java new file mode 100644 index 000000000..597b1afe8 --- /dev/null +++ b/src/main/java/org/ladocuploader/app/submission/conditions/GoingToSchool.java @@ -0,0 +1,13 @@ +package org.ladocuploader.app.submission.conditions; + +import formflow.library.data.Submission; +import org.springframework.stereotype.Component; + +@Component +public class GoingToSchool extends BasicCondition { + + @Override + public Boolean run(Submission submission) { + return run(submission, "schoolInd", "true"); + } +} diff --git a/src/main/java/org/ladocuploader/app/submission/conditions/IsPregnant.java b/src/main/java/org/ladocuploader/app/submission/conditions/IsPregnant.java new file mode 100644 index 000000000..7959ece73 --- /dev/null +++ b/src/main/java/org/ladocuploader/app/submission/conditions/IsPregnant.java @@ -0,0 +1,13 @@ +package org.ladocuploader.app.submission.conditions; + +import formflow.library.data.Submission; +import org.springframework.stereotype.Component; + +@Component +public class IsPregnant extends BasicCondition { + + @Override + public Boolean run(Submission submission) { + return run(submission, "pregnancyInd", "true"); + } +} diff --git a/src/main/java/org/ladocuploader/app/submission/conditions/OutOfStateBenefits.java b/src/main/java/org/ladocuploader/app/submission/conditions/OutOfStateBenefits.java new file mode 100644 index 000000000..bab3b72b3 --- /dev/null +++ b/src/main/java/org/ladocuploader/app/submission/conditions/OutOfStateBenefits.java @@ -0,0 +1,13 @@ +package org.ladocuploader.app.submission.conditions; + +import formflow.library.data.Submission; +import org.springframework.stereotype.Component; + +@Component +public class OutOfStateBenefits extends BasicCondition { + + @Override + public Boolean run(Submission submission) { + return run(submission, "outOfStateBenefitsInd", "true"); + } +} diff --git a/src/main/resources/flows-config.yaml b/src/main/resources/flows-config.yaml index 90a59ba1c..b4b46b19b 100644 --- a/src/main/resources/flows-config.yaml +++ b/src/main/resources/flows-config.yaml @@ -77,17 +77,6 @@ flow: - name: householdSignPost condition: IsMultiplePersonHousehold - name: ssnForm - ssnForm: - nextScreens: - - name: householdSpecialSituations - ssnFaq: - nextScreens: - - name: householdSpecialSituations - householdSpecialSituations: - nextScreens: - - name: householdSchool - condition: IsMultiplePersonHousehold - - name: school householdSignPost: nextScreens: - name: householdInfo @@ -98,24 +87,43 @@ flow: householdList: nextScreens: - name: ssnForm + ssnForm: + nextScreens: + - name: householdSpecialSituations + ssnFaq: + nextScreens: + - name: householdSpecialSituations + householdSpecialSituations: + nextScreens: + - name: householdSchool householdSchool: nextScreens: - name: householdSchoolWho + condition: GoingToSchool + - name: householdPregnancy householdSchoolWho: nextScreens: - name: householdPregnancy householdPregnancy: nextScreens: - name: householdPregnancyWho + condition: IsPregnant + - name: householdBenefits householdPregnancyWho: nextScreens: - name: householdBenefits householdBenefits: nextScreens: - name: householdBenefitsWho + condition: OutOfStateBenefits + - name: householdPrepareFood + condition: ProgramsIncludeSnap + - name: sensitiveQuestions householdBenefitsWho: nextScreens: - name: householdPrepareFood + condition: ProgramsIncludeSnap + - name: sensitiveQuestions householdPrepareFood: nextScreens: - name: householdSeasonalFarmWorker diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 8a13cdedf..ea2f30109 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -474,19 +474,25 @@ special-situations-household.p1=We'll see if there are special situations for an # School school.title=School -school.header=Are you going to school right now, either full or part time? +school.header=Is anyone in your household going to school right now, either full or part time? school.content.p1=Includes anyone who is enrolled at least half of their time in "an institution of higher education". school.content.p2=That would include: school.content.li1=A regular curriculum at a college or university that offers degrees school.content.li2=A business, technical, trade, or vocational school that normally requires a high school diploma or equivalent (GED) +school-who.title=School who +school-who.header=Who is going to school? # Pregnancy pregnancy.title=Pregnancy -pregnancy.header=Are you pregnant? +pregnancy.header=Is anyone in your household pregnant? +pregnancy-who.title=Pregnancy who +pregnancy-who.header=Who is pregnant? # Out of state benefits out-of-state-benefits.title=Out of state benefits -out-of-state-benefits.header=Have you received cash assistance or SNAP benefits from another state? +out-of-state-benefits.header=Has anyone in your household received cash assistance or SNAP benefits from another state? +out-of-state-benefits-who.title=Out of state benefits who +out-of-state-benefits-who.header=Who has received cash assistance or SNAP benefits from another state? # Household prepare food household-prepare-food.title=Prepare food diff --git a/src/main/resources/templates/laDigitalAssister/householdBenefits.html b/src/main/resources/templates/laDigitalAssister/householdBenefits.html index 996398337..e8d52f59a 100644 --- a/src/main/resources/templates/laDigitalAssister/householdBenefits.html +++ b/src/main/resources/templates/laDigitalAssister/householdBenefits.html @@ -1,6 +1,6 @@ - +
@@ -8,22 +8,19 @@
- - + + -
- -
- +
- + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdBenefitsWho.html b/src/main/resources/templates/laDigitalAssister/householdBenefitsWho.html index 996398337..cd90e23b2 100644 --- a/src/main/resources/templates/laDigitalAssister/householdBenefitsWho.html +++ b/src/main/resources/templates/laDigitalAssister/householdBenefitsWho.html @@ -1,6 +1,6 @@ - +
@@ -8,15 +8,17 @@
- - + +
- + +
@@ -24,6 +26,6 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdPregnancy.html b/src/main/resources/templates/laDigitalAssister/householdPregnancy.html index 996398337..2dca2b660 100644 --- a/src/main/resources/templates/laDigitalAssister/householdPregnancy.html +++ b/src/main/resources/templates/laDigitalAssister/householdPregnancy.html @@ -1,6 +1,6 @@ - +
@@ -8,22 +8,19 @@
- - + + -
- -
- +
- + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdPregnancyWho.html b/src/main/resources/templates/laDigitalAssister/householdPregnancyWho.html index 996398337..62a273db0 100644 --- a/src/main/resources/templates/laDigitalAssister/householdPregnancyWho.html +++ b/src/main/resources/templates/laDigitalAssister/householdPregnancyWho.html @@ -1,6 +1,6 @@ - +
@@ -8,15 +8,17 @@
- - + +
- + +
@@ -24,6 +26,6 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdSchool.html b/src/main/resources/templates/laDigitalAssister/householdSchool.html index 996398337..6cc014f40 100644 --- a/src/main/resources/templates/laDigitalAssister/householdSchool.html +++ b/src/main/resources/templates/laDigitalAssister/householdSchool.html @@ -1,6 +1,6 @@ - +
@@ -8,15 +8,23 @@
- - + +
+

+

+
    +
  • +
  • +
diff --git a/src/main/resources/templates/laDigitalAssister/householdSchoolWho.html b/src/main/resources/templates/laDigitalAssister/householdSchoolWho.html index 996398337..b4bc28acd 100644 --- a/src/main/resources/templates/laDigitalAssister/householdSchoolWho.html +++ b/src/main/resources/templates/laDigitalAssister/householdSchoolWho.html @@ -1,6 +1,6 @@ - +
@@ -8,15 +8,17 @@
- - + +
- + +
@@ -24,6 +26,6 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdSpecialSituations.html b/src/main/resources/templates/laDigitalAssister/householdSpecialSituations.html index ef1c7bfc7..b21d8ebe7 100644 --- a/src/main/resources/templates/laDigitalAssister/householdSpecialSituations.html +++ b/src/main/resources/templates/laDigitalAssister/householdSpecialSituations.html @@ -10,7 +10,7 @@
+ th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{special-situations.header}, subtext=#{special-situations-household.p1})}"/>