Skip to content

Commit

Permalink
fix(waiver forms): Waiver form QE remediation (#379)
Browse files Browse the repository at this point in the history
* QE remediation

* whoops

* Fix regex
  • Loading branch information
mdial89f authored Feb 13, 2024
1 parent 201b5e3 commit 67f5afb
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/packages/shared-types/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export const attachmentTitleMap: Record<string, string> = {
bCapCostSpreadsheets:
"1915(b) Comprehensive (Capitated) Waiver Cost Effectiveness Spreadsheets",
bCapIndependentAssessment:
"1915(b) Comprehensive (Capitated) Waiver Independent Assessment",
"1915(b) Comprehensive (Capitated) Waiver Independent Assessment (first two renewals only)",
b4WaiverApplication:
"1915(b)(4) FFS Selective Contracting (Streamlined) Waiver Application Pre-print",
b4IndependentAssessment:
"1915(b)(4) FFS Selective Contracting (Streamlined) Independent Assessment",
"1915(b)(4) FFS Selective Contracting (Streamlined) Independent Assessment (first two renewals only)",
};
export type AttachmentKey = keyof typeof attachmentTitleMap;
export type AttachmentTitle = typeof attachmentTitleMap[AttachmentKey];
Expand Down
2 changes: 1 addition & 1 deletion src/services/ui/src/components/Routing/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const B_WAIVER_SUBMISSION_OPTIONS = "/new-submission/waiver/b";
export const B4_WAIVER_OPTIONS = "/new-submission/waiver/b/b4";
export const BCAP_WAIVER_OPTIONS = "/new-submission/waiver/b/capitated";
export const WAIVER_1915_B_AMEND_CAP =
"/new-submission/waiver/b/capitated/amend/create";
"/new-submission/waiver/b/capitated/amendment/create";
export const WAIVER_1915_B_RENEWAL_CAP =
"/new-submission/waiver/b/capitated/renewal/create";
export const WAIVER_1915_B_INITIAL_CAP =
Expand Down
2 changes: 1 addition & 1 deletion src/services/ui/src/pages/create/options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ export const BCAP_WAIVER_OPTIONS: OptionData[] = [
{
title: "1915(b) Comprehensive (Capitated) Waiver Amendment ",
description: "Amend an existing 1915(b) Comprehensive (Capitated) Waiver",
linkTo: "/new-submission/waiver/b/capitated/amend/create",
linkTo: "/new-submission/waiver/b/capitated/amendment/create",
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const Capitated1915BWaiverAmendment = () => {
className="my-6 space-y-8 mx-auto justify-center flex flex-col"
>
<h1 className="text-2xl font-semibold mt-4 mb-2">
Amend a 1915(b) Waiver
1915(b) Comprehensive (Capitated) Waiver Amendment
</h1>
<SectionCard title="1915(b) Waiver Amendment Request Details">
<Content.FormIntroText />
Expand All @@ -106,7 +106,7 @@ export const Capitated1915BWaiverAmendment = () => {
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
All other 1915(b) Waivers
1915(b)
</span>
</div>
<Inputs.FormField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const Capitated1915BWaiverInitial = () => {
className="my-6 space-y-8 mx-auto justify-center flex flex-col"
>
<h1 className="text-2xl font-semibold mt-4 mb-2">
1915(b) Initial Waiver Submission
1915(b) Comprehensive (Capitated) Initial Waiver
</h1>
<SectionCard title="Initial Waiver Details">
<Content.FormIntroText />
Expand All @@ -107,7 +107,7 @@ export const Capitated1915BWaiverInitial = () => {
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
All other 1915(b) Waivers
1915(b)
</span>
</div>
<Inputs.FormField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,18 @@ export const Capitated1915BWaiverRenewal = () => {
className="my-6 space-y-8 mx-auto justify-center flex flex-col"
>
<h1 className="text-2xl font-semibold mt-4 mb-2">
Renew a 1915(b) Waiver
1915(b) Comprehensive (Capitated) Renewal Waiver
</h1>
<SectionCard title="1915(b) Waiver Renewal Details">
<Content.FormIntroText />
<div className="flex flex-col">
<Inputs.FormLabel className="font-semibold">
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
1915(b)
</span>
</div>
<Inputs.FormField
control={form.control}
name="waiverNumber"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const Contracting1915BWaiverAmendment = () => {
className="my-6 space-y-8 mx-auto justify-center flex flex-col"
>
<h1 className="text-2xl font-semibold mt-4 mb-2">
Amend a 1915(b) Waiver
1915(b)(4) FFS Selective Contracting Waiver Amendment
</h1>
<SectionCard title="1915(b) Waiver Amendment Request Details">
<Content.FormIntroText />
Expand All @@ -103,7 +103,7 @@ export const Contracting1915BWaiverAmendment = () => {
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
1915(b)(4) FFS Selective Contracting waviers
1915(b)
</span>
</div>
<Inputs.FormField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const Contracting1915BWaiverInitial = () => {
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
1915(b)(4) FFS Selective Contracting waviers
1915(b)
</span>
</div>
<Inputs.FormField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const Contracting1915BWaiverRenewal = () => {
className="my-6 space-y-8 mx-auto justify-center flex flex-col"
>
<h1 className="text-2xl font-semibold mt-4 mb-2">
Renew a 1915(b) Waiver
1915(b)(4) FFS Selective Contracting Renewal Waiver
</h1>
<SectionCard title="1915(b) Waiver Renewal Details">
<Content.FormIntroText />
Expand All @@ -127,7 +127,7 @@ export const Contracting1915BWaiverRenewal = () => {
Waiver Authority
</Inputs.FormLabel>
<span className="text-lg font-thin">
1915(b)(4) FFS Selective Contracting waviers
1915(b)
</span>
</div>
<Inputs.FormField
Expand Down
8 changes: 4 additions & 4 deletions src/services/ui/src/pages/form/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export const zInitialWaiverNumberSchema = z
export const zRenewalWaiverNumberSchema = z
.string()
.regex(
/^[A-Z]{2}-\d{4,5}\.R\d{2}\.00$/,
"Renewal Number must be in the format of SS-####.R##.00 or SS-#####.R##.00 For renewals, the “R##” starts with ‘01’ and ascends."
/^[A-Z]{2}-\d{4,5}\.R(?!00)\d{2}\.\d{2}$/,
"Renewal Number must be in the format of SS-####.R##.00 or SS-#####.R##.00 For renewals, the “R##” starts with '01' and ascends."
)
.refine((value) => isAuthorizedState(value), {
message:
Expand All @@ -73,7 +73,7 @@ export const zAmendmentWaiverNumberSchema = z
.string()
.regex(
/^[A-Z]{2}-\d{4,5}\.R\d{2}\.(?!00)\d{2}$/,
"The 1915(b) Waiver Amendment Number must be in the format of SS-####.R##.## or SS-#####.R##.##. For amendments, the last two digits start with ‘01’ and ascends."
"The 1915(b) Waiver Amendment Number must be in the format of SS-####.R##.## or SS-#####.R##.##. For amendments, the last two digits start with '01' and ascends."
)
.refine((value) => isAuthorizedState(value), {
message:
Expand All @@ -88,7 +88,7 @@ export const zAmendmentOriginalWaiverNumberSchema = z
.string()
.regex(
/^[A-Z]{2}-\d{4,5}\.R\d{2}\.\d{2}$/,
"The 1915(b) Waiver Amendment Number must be in the format of SS-####.R##.## or SS-#####.R##.##. For amendments, the last two digits start with ‘01’ and ascends."
"The 1915(b) Waiver Amendment Number must be in the format of SS-####.R##.## or SS-#####.R##.##. For amendments, the last two digits start with '01' and ascends."
)
.refine((value) => isAuthorizedState(value), {
message:
Expand Down
2 changes: 1 addition & 1 deletion src/services/ui/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const router = createBrowserRouter([
element: <P.CHIPEligibilityLandingPage />,
},
{
path: "/new-submission/waiver/b/capitated/amend/create",
path: "/new-submission/waiver/b/capitated/amendment/create",
element: <P.Capitated1915BWaiverAmendmentPage />,
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/services/ui/src/utils/labelMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const mapSubmissionCrumb = (path: Route) => {
case "/new-submission/spa/chip/create":
return "Submit new CHIP SPA";
case "/new-submission/waiver/b/capitated/initial/create":
return "1915(b) Comprehensive (Capitated) New Initial Waiver";
return "1915(b) Comprehensive (Capitated) Initial Waiver";
case "/new-submission/waiver/b/capitated/renewal/create":
return "1915(b) Comprehensive (Capitated) Renewal Waiver";
case "/new-submission/waiver/b/capitated/amend/create":
case "/new-submission/waiver/b/capitated/amendment/create":
return "1915(b) Comprehensive (Capitated) Waiver Amendment";
case "/new-submission/waiver/b/b4/initial/create":
return "1915(b)(4) FFS Selective Contracting Initial Waiver";
Expand Down

0 comments on commit 67f5afb

Please sign in to comment.