-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CCAP-453][CCAP-439][CCAP-537] Update content on providerresponse/provider-number screen, update provider id validation logic, remove broken link #869
Changes from 6 commits
9568b63
fcaaa39
9bafd92
84cbe0d
3ca9368
d5b7ca5
4387084
a120a54
6747314
75dca6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
package org.ilgcc.app.data; | ||
|
||
import java.math.BigInteger; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ProviderRepository extends JpaRepository<Provider, BigInteger> { | ||
|
||
@Query(value = "SELECT CASE WHEN COUNT(*) > 0 THEN TRUE ELSE FALSE END FROM providers " | ||
+ "WHERE status IN :statuses AND provider_id = :providerId " | ||
+ "AND date_of_last_approval >= :threeYearsAgo", nativeQuery = true) | ||
boolean existsByStatusInAndProviderIdAndDateOfLastApprovalAfter(@Param("statuses") List<String> statuses, | ||
@Param("providerId") BigInteger providerId, @Param("threeYearsAgo") LocalDate threeYearsAgo); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,10 +34,20 @@ public Map<String, List<String>> runValidation(FormSubmission formSubmission, Su | |
Map<String, List<String>> errorMessages = new HashMap<>(); | ||
String inputValue = (String) formSubmission.getFormData().get(PROVIDER_NUMBER); | ||
|
||
if (validateProviderId && !providerRepositoryService.isProviderIdValid(inputValue)) { | ||
if (validateProviderId) { | ||
Locale locale = LocaleContextHolder.getLocale(); | ||
errorMessages.put(PROVIDER_NUMBER, | ||
List.of(messageSource.getMessage("provider-response-ccap-registration.error.invalid-number", null, locale))); | ||
|
||
if (inputValue == null || inputValue.isBlank()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I love the most specific error messages here. I think it makes it much clearer what the actual issue is. |
||
errorMessages.put(PROVIDER_NUMBER, | ||
List.of(messageSource.getMessage("errors.provide-provider-number", null, locale))); | ||
} else if (inputValue.length() < 8 || inputValue.length() > 15) { | ||
errorMessages.put(PROVIDER_NUMBER, | ||
List.of(messageSource.getMessage("errors.provide-provider-number-length", null, locale))); | ||
} else if (!providerRepositoryService.isProviderIdValid(inputValue)) { | ||
errorMessages.put(PROVIDER_NUMBER, | ||
List.of(messageSource.getMessage("provider-response-provider-number.error.invalid-number", null, | ||
locale))); | ||
} | ||
} | ||
|
||
return errorMessages; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -522,22 +522,18 @@ flow: | |
nextScreens: | ||
- name: paid-by-ccap | ||
condition: EnableProviderRegistration | ||
- name: ccap-registration | ||
- name: provider-number | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @spokenbird - heads up that this PR is actually renaming the ccap-registration screen to provider-number so it will actually always appear at the beginning of the flow. This means that you probably no longer need to add the GenerateDummyClientSubmissionForDev to the paid by CCAP screen |
||
paid-by-ccap: | ||
condition: EnableProviderRegistration | ||
nextScreens: | ||
- name: provider-number | ||
condition: IsPaidByCCAP | ||
- name: registration-start | ||
provider-number: | ||
condition: EnableProviderRegistration | ||
nextScreens: | ||
- name: confirmation-code | ||
registration-start: | ||
condition: EnableProviderRegistration | ||
nextScreens: | ||
- name: registration-getting-started | ||
ccap-registration: | ||
provider-number: | ||
crossFieldValidationAction: ValidateProviderNumber | ||
beforeSaveAction: SaveApplicationId | ||
onPostAction: GenerateDummyClientSubmissionForDev | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,8 @@ errors.provide-state=Please choose the state. | |
errors.provide-zip=Please enter a zip code with 5 digits. | ||
errors.provide-county=Select a county | ||
errors.provide-program-name=Please provide a program name. | ||
errors.provide-provider-number=Enter your provider number. | ||
errors.provide-provider-number=Enter your provider ID number. | ||
errors.provide-provider-number-length=Enter an 8-15 digit number. | ||
errors.provide-applicant-number=Enter a valid code with 6 numbers and letters | ||
errors.select-one-option=Please select one option | ||
errors.select-at-least-one-day=Please select at least one day | ||
|
@@ -237,7 +238,7 @@ onboarding-provider-info-review.link=Edit their info | |
#onboarding-provider-info-confirm | ||
onboarding-provider-info-confirm.title=Confirm provider info | ||
onboarding-provider-info-confirm.header=Thanks! Now we can help you contact {0} when you''re done. | ||
onboarding-provider-info-confirm.notice=<div class='notice--success spacing-below-60'><p>At the end of this application, you'll have the option to <strong>text or email a secure link</strong> to '{0}'.</p><p>Using the link, your provider can quickly complete their part of the application.</p></div> | ||
onboarding-provider-info-confirm.notice=<div class='notice--success spacing-below-60'><p>At the end of this application, you''ll have the option to <strong>text or email a secure link</strong> to '{0}'.</p><p>Using the link, your provider can quickly complete their part of the application.</p></div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed this typo, missing the double apostrophe, when clicking through the app and fixed it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for fixing this.
cram-cfa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# | ||
onboarding-confirm-provider.title=Confirm provider | ||
|
@@ -1165,12 +1166,21 @@ provider-response-submit-start.responded.button=Return to home | |
|
||
provider-response-submit-start.provider-placeholder=child care provider | ||
|
||
#ccap-registration | ||
provider-response-ccap-registration.title=Provider number | ||
provider-response-ccap-registration.header=What is your provider number? | ||
provider-response-ccap-registration.subtext=This is a 8-15 digit number issued by the Department of Human Services. | ||
provider-response-ccap-registration.no-provider-number=I don't have a provider number. | ||
provider-response-ccap-registration.error.invalid-number=Make sure the provider number is valid | ||
#provider-number | ||
provider-response-provider-number.title=Provider ID number | ||
provider-response-provider-number.header=What is your provider ID number? | ||
provider-response-provider-number.subtext=This is an 8-15 digit number issued by the Department of Human Services. | ||
provider-response-provider-number.no-provider-number=I don't have a provider number. | ||
cram-cfa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
provider-response-provider-number.error.invalid-number=Make sure the provider ID number is valid. | ||
|
||
provider-response-provider-number.accordion.title=Where can I find this number? | ||
provider-response-provider-number.accordion.intro=Your provider ID number can be found on the following forms: | ||
provider-response-provider-number.accordion.document1=CCAP Approval Notice (Form IL444-3455A) | ||
provider-response-provider-number.accordion.document2=Child Care Certificate/Certificate Report (Form IL444-3492) | ||
provider-response-provider-number.accordion.document3=Child Care Certificate Report for centers (Form IL444-3492A) | ||
provider-response-provider-number.accordion.document4=Monthly Enrollment Report for Site Administered Providers | ||
|
||
|
||
|
||
#confirmation-code | ||
provider-response-confirmation-code.title=Confirmation code | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
<th:block | ||
th:replace="~{fragments/inputs/submitButton :: submitButton(text=${buttonLabel != null ? buttonLabel : 'Submit'})}"/> | ||
<div> | ||
<a th:if="hasSkipLocation" | ||
<a th:if="${hasSkipLocation}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was apparently always broken, fwiw. |
||
th:id="${'skip-to-'+skipLocation}" | ||
th:text="${hasSkipTextValue ? skipText : 'Skip'}" | ||
th:href="|/flow/${flow}/${skipLocation}|"></a> | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}" xmlns:th="http://www.thymeleaf.org"> | ||
<head th:replace="~{fragments/head :: head(title='TEMPLATE')}"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="~{fragments/toolbar :: toolbar}"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="~{fragments/goBack :: goBackLink}"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<th:block th:replace="~{fragments/cardHeader :: cardHeader(header=#{placeholder}, subtext=#{placeholder})}"/> | ||
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::formContent})}"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
<!-- Put inputs here --> | ||
</div> | ||
<div class="form-card__footer"> | ||
<th:block th:replace="~{fragments/inputs/submitButton :: submitButton(text=#{general.inputs.continue})}"/> | ||
</div> | ||
<th:block | ||
th:replace="~{fragments/inputs/screenWithOneInputAndSkip :: | ||
screenWithOneInputAndSkip( | ||
title=#{'provider-response-provider-number.title'}, | ||
iconFragment=~{fragments/gcc-icons :: registeredProvider}, | ||
header=#{provider-response-provider-number.header}, | ||
required='true', | ||
subtext=#{provider-response-provider-number.subtext}, | ||
buttonLabel=#{general.button.continue}, | ||
formAction=${formAction}, | ||
inputContent=~{::inputContent})}"> | ||
|
||
<th:block th:ref="inputContent"> | ||
<div class="spacing-below-60 move-40-up"> | ||
<th:block th:replace="~{'fragments/honeycrisp/reveal' :: reveal( | ||
controlId='r1', | ||
linkLabel=~{::revealLabel1}, | ||
content=~{::revealContent1}, | ||
forceShowContent='true')}"> | ||
<th:block th:ref="revealLabel1"> | ||
<th:span th:text="#{provider-response-provider-number.accordion.title}"></th:span> | ||
</th:block> | ||
<th:block th:ref="revealContent1"> | ||
<p th:text="#{provider-response-provider-number.accordion.intro}"></p> | ||
<ul class="list--bulleted"> | ||
<li th:utext="#{provider-response-provider-number.accordion.document1}"></li> | ||
<li th:utext="#{provider-response-provider-number.accordion.document2}"></li> | ||
<li th:utext="#{provider-response-provider-number.accordion.document3}"></li> | ||
<li th:utext="#{provider-response-provider-number.accordion.document4}"></li> | ||
</ul> | ||
</th:block> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="~{fragments/footer :: footer}"/> | ||
</body> | ||
</html> | ||
</div> | ||
<th:block | ||
th:replace="~{fragments/inputs/overrides/number :: number(inputName='providerResponseProviderNumber', ariaLabel='header', required='true')}"/> | ||
</th:block> | ||
</th:block> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tunneled into staging and tested this query using psql. the test worked :)