From 47d8fcbfa9bf328367297567ca13b8544fdd8856 Mon Sep 17 00:00:00 2001 From: 13bfrancis <40218571+13bfrancis@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:29:00 -0400 Subject: [PATCH] More layout --- .../ui/src/components/Inputs/input.tsx | 1 + .../ui/src/pages/form/medicaid-form.tsx | 71 +++++++++++++++++-- src/services/ui/src/router.tsx | 2 + 3 files changed, 70 insertions(+), 4 deletions(-) diff --git a/src/services/ui/src/components/Inputs/input.tsx b/src/services/ui/src/components/Inputs/input.tsx index f6b24530bf..cf613eda2e 100644 --- a/src/services/ui/src/components/Inputs/input.tsx +++ b/src/services/ui/src/components/Inputs/input.tsx @@ -15,6 +15,7 @@ const Input = React.forwardRef( className )} ref={ref} + id={props.name} {...props} /> ); diff --git a/src/services/ui/src/pages/form/medicaid-form.tsx b/src/services/ui/src/pages/form/medicaid-form.tsx index e1bbe7329c..2c26b049ff 100644 --- a/src/services/ui/src/pages/form/medicaid-form.tsx +++ b/src/services/ui/src/pages/form/medicaid-form.tsx @@ -1,11 +1,16 @@ import { SubmitHandler, useForm } from "react-hook-form"; import { z } from "zod"; import { zodResolver } from "@hookform/resolvers/zod"; +import * as I from "@/components/Inputs"; +import { SimplePageContainer } from "@/components"; +import { PropsWithChildren } from "react"; +import { Link } from "react-router-dom"; const formSchema = z.object({ id: z.string(), additionalInformation: z.string(), - attachments: z.object({}), + // : z.object({}), + // proposedEffectiveDate: z.date(), }); export type MedicaidFormSchema = z.infer; @@ -19,9 +24,67 @@ export const MedicaidForm = () => { console.log(data, formState.errors); }; + console.log(formState.errors); + return ( -
- -
+ +
+
+

Medicaid SPA Details

+

+ Once you submit this form, a confirmation email is sent to you and + to CMS. CMS will use this content to review your package, and you + will not be able to edit this form. If CMS needs any additional + information, they will follow up by email.{" "} + + If you leave this page, you will lose your progress on this form. + +

+
+ +
+
+ SPA ID + + What is my SPA ID? + +
+ + Must follow the format SS-YY-NNNN or SS-YY-NNNN-xxxx. + + + Reminder - CMS recommends that all SPA numbers start with the year + in which the package is submitted. + + +
+ +
+ + Additional Information + + +
+ +
+ Submit + + Cancel + +
+
+
); }; + +const HelpText = ({ children }: PropsWithChildren) =>

{children}

; +const HintText = ({ children }: PropsWithChildren) => ( +

{children}

+); diff --git a/src/services/ui/src/router.tsx b/src/services/ui/src/router.tsx index ae151451a5..57ce81d884 100644 --- a/src/services/ui/src/router.tsx +++ b/src/services/ui/src/router.tsx @@ -6,6 +6,7 @@ import "@/api/amplifyConfig"; import * as C from "@/components"; import { QueryClient } from "@tanstack/react-query"; import { ROUTES } from "@/routes"; +import { MedicaidForm } from "./pages/form/medicaid-form"; export const queryClient = new QueryClient(); export const router = createBrowserRouter([ @@ -66,6 +67,7 @@ export const router = createBrowserRouter([ element: , }, { path: ROUTES.CREATE, element: }, + { path: "/test-route", element: }, // TODO: Remove "/form" and ExampleForm if there's no usage; the Create page // is our current SEATool integration test form. { path: "/form", element: },