-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'spiderface' of github.com:Enterprise-CMCS/macpro-mako i…
…nto spiderface
- Loading branch information
Showing
14 changed files
with
431 additions
and
819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { z } from "zod"; | ||
import { | ||
attachmentArraySchema, | ||
attachmentArraySchemaOptional, | ||
} from "../attachments"; | ||
|
||
const baseContractingWaiverSchema = z.object({ | ||
// zAmendmentWaiverNumberSchema | ||
id: z.string(), | ||
proposedEffectiveDate: z.date(), | ||
attachments: z.object({ | ||
b4WaiverApplication: z.object({ | ||
label: z | ||
.string() | ||
.default( | ||
"1915(b)(4) FFS Selective Contracting (Streamlined) Waiver Application Pre-print", | ||
), | ||
files: attachmentArraySchema(), | ||
}), | ||
tribalConsultation: z.object({ | ||
label: z.string().default("Tribal Consultation"), | ||
files: attachmentArraySchemaOptional(), | ||
}), | ||
other: z.object({ | ||
label: z.string().default("Other"), | ||
files: attachmentArraySchemaOptional(), | ||
}), | ||
}), | ||
additionalInformation: z.string().max(4000).nullable().default(null), | ||
}); | ||
|
||
export const amendmentFeSchema = baseContractingWaiverSchema.extend({ | ||
// zAmendmentOriginalWaiverNumberSchema | ||
waiverNumber: z.number(), | ||
seaActionType: z.string().default("Amend"), | ||
}); | ||
|
||
export const renewalFeSchema = baseContractingWaiverSchema.extend({ | ||
// zAmendmentOriginalWaiverNumberSchema | ||
waiverNumber: z.number(), | ||
seaActionType: z.string().default("Renew"), | ||
attachments: z.object({ | ||
b4WaiverApplication: z.object({ | ||
label: z | ||
.string() | ||
.default( | ||
"1915(b)(4) FFS Selective Contracting (Streamlined) Waiver Application Pre-print", | ||
), | ||
files: attachmentArraySchema(), | ||
}), | ||
b4IndependentAssessment: z.object({ | ||
label: z | ||
.string() | ||
.default( | ||
"1915(b)(4) FFS Selective Contracting (Streamlined) Independent Assessment (first two renewals only)", | ||
), | ||
files: attachmentArraySchemaOptional(), | ||
}), | ||
tribalConsultation: z.object({ | ||
label: z.string().default("Tribal Consultation"), | ||
files: attachmentArraySchemaOptional(), | ||
}), | ||
other: z.object({ | ||
label: z.string().default("Other"), | ||
files: attachmentArraySchemaOptional(), | ||
}), | ||
}), | ||
}); | ||
|
||
export const initialFeSchema = baseContractingWaiverSchema.extend({ | ||
seaActionType: z.string().default("New"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./new-submission"; | ||
export * as CapitatedWaivers from "./waiver/capitated"; | ||
export * as ContractingWaivers from "./waiver/contracting"; |
121 changes: 121 additions & 0 deletions
121
react-app/src/features/forms/waiver/contracting/Amendment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
import { | ||
ActionForm, | ||
DatePicker, | ||
FAQ_TAB, | ||
FormControl, | ||
FormField, | ||
FormItem, | ||
FormLabel, | ||
FormMessage, | ||
Input, | ||
RequiredIndicator, | ||
} from "@/components"; | ||
import { Link } from "react-router-dom"; | ||
import { contractingWaivers } from "shared-types"; | ||
|
||
export const AmendmentForm = () => { | ||
return ( | ||
<ActionForm | ||
schema={contractingWaivers.amendmentFeSchema} | ||
title="1915(b) Waiver Amendment Request Details" | ||
fields={({ control }) => ( | ||
<> | ||
<div className="flex flex-col"> | ||
<FormLabel className="font-semibold" htmlFor="1975b"> | ||
Waiver Authority | ||
</FormLabel> | ||
<span className="text-lg font-thin" id="1975b"> | ||
1915(b) | ||
</span> | ||
</div> | ||
<FormField | ||
control={control} | ||
name="waiverNumber" | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel className="font-semibold"> | ||
Existing Waiver Number to Amend <RequiredIndicator /> | ||
</FormLabel> | ||
<p className="text-gray-500 font-light"> | ||
Enter the existing waiver number you are seeking to amend in | ||
the format it was approved, using a dash after the two | ||
character state abbreviation. | ||
</p> | ||
<FormControl className="max-w-sm"> | ||
<Input | ||
ref={field.ref} | ||
value={field.value} | ||
onChange={(e) => | ||
field.onChange(e.currentTarget.value.toUpperCase()) | ||
} | ||
/> | ||
</FormControl> | ||
<FormMessage /> | ||
</FormItem> | ||
)} | ||
/> | ||
<FormField | ||
control={control} | ||
name="id" | ||
render={({ field }) => ( | ||
<FormItem> | ||
<div className="flex gap-4"> | ||
<FormLabel className="font-semibold"> | ||
1915(b) Waiver Amendment Number <RequiredIndicator /> | ||
</FormLabel> | ||
<Link | ||
to="/faq/waiver-amendment-id-format" | ||
target={FAQ_TAB} | ||
rel="noopener noreferrer" | ||
className="text-blue-900 underline" | ||
> | ||
What is my 1915(b) Waiver Amendment Number? | ||
</Link> | ||
</div> | ||
<p className="text-gray-500 font-light"> | ||
The Waiver Number must be in the format of SS-####.R##.## or | ||
SS-#####.R##.##. For amendments, the last two digits start | ||
with {"'01'"} and ascends. | ||
</p> | ||
<FormControl className="max-w-sm"> | ||
<Input | ||
ref={field.ref} | ||
value={field.value} | ||
onChange={(e) => | ||
field.onChange(e.currentTarget.value.toUpperCase()) | ||
} | ||
/> | ||
</FormControl> | ||
<FormMessage /> | ||
</FormItem> | ||
)} | ||
/> | ||
<FormField | ||
control={control} | ||
name="proposedEffectiveDate" | ||
render={({ field }) => ( | ||
<FormItem className="max-w-lg"> | ||
<FormLabel className="text-lg font-semibold block"> | ||
Proposed Effective Date of 1915(b) Waiver Amendment{" "} | ||
<RequiredIndicator /> | ||
</FormLabel> | ||
<FormControl className="max-w-sm"> | ||
<DatePicker onChange={field.onChange} date={field.value} /> | ||
</FormControl> | ||
<FormMessage /> | ||
</FormItem> | ||
)} | ||
/> | ||
</> | ||
)} | ||
attachments={{ | ||
faqLink: "/faq/waiverb-attachments", | ||
}} | ||
defaultValues={{ id: "" }} | ||
documentPollerArgs={{ | ||
property: "id", | ||
documentChecker: (checks) => checks.actionIs("Amend"), | ||
}} | ||
/> | ||
); | ||
}; |
97 changes: 97 additions & 0 deletions
97
react-app/src/features/forms/waiver/contracting/Initial.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { | ||
ActionForm, | ||
DatePicker, | ||
FAQ_TAB, | ||
FormControl, | ||
FormField, | ||
FormItem, | ||
FormLabel, | ||
FormMessage, | ||
Input, | ||
RequiredIndicator, | ||
} from "@/components"; | ||
import { Link } from "react-router-dom"; | ||
import { contractingWaivers } from "shared-types"; | ||
|
||
export const InitialForm = () => { | ||
return ( | ||
<ActionForm | ||
schema={contractingWaivers.initialFeSchema} | ||
title="1915(b) Comprehensive (Capitated) Renewal Waiver" | ||
fields={({ control }) => ( | ||
<> | ||
<div className="flex flex-col"> | ||
<FormLabel className="font-semibold" htmlFor="1975b"> | ||
Waiver Authority | ||
</FormLabel> | ||
<span className="text-lg font-thin" id="1975b"> | ||
1915(b) | ||
</span> | ||
</div> | ||
<FormField | ||
control={control} | ||
name="id" | ||
render={({ field }) => ( | ||
<FormItem> | ||
<div className="flex gap-4"> | ||
<FormLabel className="text-lg font-semibold mr-1"> | ||
Initial Waiver Number <RequiredIndicator /> | ||
</FormLabel> | ||
<Link | ||
to={"/faq/initial-waiver-id-format"} | ||
target={FAQ_TAB} | ||
rel="noopener noreferrer" | ||
className="text-blue-900 underline" | ||
> | ||
What is my Initial Waiver Number? | ||
</Link> | ||
</div> | ||
<p | ||
className="text-gray-500 font-light" | ||
id="waiver-number-format" | ||
> | ||
Must be a new initial number with the format SS-####.R00.00 or | ||
SS-#####.R00.00 | ||
</p> | ||
<FormControl className="max-w-sm"> | ||
<Input | ||
ref={field.ref} | ||
value={field.value} | ||
onChange={(e) => | ||
field.onChange(e.currentTarget.value.toUpperCase()) | ||
} | ||
/> | ||
</FormControl> | ||
<FormMessage /> | ||
</FormItem> | ||
)} | ||
/> | ||
<FormField | ||
control={control} | ||
name="proposedEffectiveDate" | ||
render={({ field }) => ( | ||
<FormItem className="max-w-lg"> | ||
<FormLabel className="text-lg font-semibold block"> | ||
Proposed Effective Date of 1915(b) Initial Waiver{" "} | ||
<RequiredIndicator /> | ||
</FormLabel> | ||
<FormControl className="max-w-sm"> | ||
<DatePicker onChange={field.onChange} date={field.value} /> | ||
</FormControl> | ||
<FormMessage /> | ||
</FormItem> | ||
)} | ||
/> | ||
</> | ||
)} | ||
attachments={{ | ||
faqLink: "/faq/waiverb-attachments", | ||
}} | ||
defaultValues={{ id: "" }} | ||
documentPollerArgs={{ | ||
property: "id", | ||
documentChecker: (checks) => checks.actionIs("New"), | ||
}} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.