Skip to content

Commit

Permalink
little bit of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdial89f committed Nov 18, 2023
1 parent edea356 commit 69e80a8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 52 deletions.
47 changes: 19 additions & 28 deletions src/services/ui/src/pages/actions/IssueRai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,25 @@ const attachmentList = [
},
] as const;

const FormDescriptionText = () => {
return (
<p className="font-light mb-6 max-w-4xl">
Issuance of a Formal RAI in OneMAC will create a Formal RAI email sent to
the State. This will also create a section in the package details summary
for you and the State to have record. Please attach the Formal RAI Letter
along with any additional information or comments in the provided text
box. Once you submit this form, a confirmation email is sent to you and to
the State.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this form.
</strong>
</p>
);
};

export const IssueRai = () => {
const { id, type } = useParams<{
const { id } = useParams<{
id: string;
type: string;
}>();
const { data: item } = useGetItem(id!);
const [successModalIsOpen, setSuccessModalIsOpen] = useState(false);
Expand Down Expand Up @@ -153,18 +168,7 @@ export const IssueRai = () => {
<p className="my-1">
<I.RequiredIndicator /> Indicates a required field
</p>
<p className="font-light mb-6 max-w-4xl">
Issuance of a Formal RAI in OneMAC will create a Formal RAI email
sent to the State. This will also create a section in the package
details summary for you and the State to have record. Please
attach the Formal RAI Letter along with any additional information
or comments in the provided text box. Once you submit this form, a
confirmation email is sent to you and to the State.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this
form.
</strong>
</p>
<FormDescriptionText />
</section>
{/*-------------------------------------------------------- */}
<section className="grid grid-cols-2">
Expand Down Expand Up @@ -264,20 +268,7 @@ export const IssueRai = () => {
)}
/>
{/*-------------------------------------------------------- */}
<div className="my-2">
<p className="font-light mb-6 max-w-4xl">
Issuance of a Formal RAI in OneMAC will create a Formal RAI email
sent to the State. This will also create a section in the package
details summary for you and the State to have record. Please
attach the Formal RAI Letter along with any additional information
or comments in the provided text box. Once you submit this form, a
confirmation email is sent to you and to the State.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this
form.
</strong>
</p>
</div>
<FormDescriptionText />
{Object.keys(form.formState.errors).length !== 0 ? (
<Alert className="mb-6" variant="destructive">
Missing or malformed information. Please see errors above.
Expand Down
41 changes: 17 additions & 24 deletions src/services/ui/src/pages/actions/RespondToRai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,23 @@ const attachmentList = [
},
] as const;

const FormDescriptionText = () => {
return (
<p className="font-light mb-6 max-w-4xl">
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.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this form.
</strong>
</p>
);
};

export const RespondToRai = () => {
const { id, type } = useParams<{
const { id } = useParams<{
id: string;
type: string;
}>();
const { data: item } = useGetItem(id!);
const [successModalIsOpen, setSuccessModalIsOpen] = useState(false);
Expand Down Expand Up @@ -154,16 +167,7 @@ export const RespondToRai = () => {
<p className="my-1">
<I.RequiredIndicator /> Indicates a required field
</p>
<p className="font-light mb-6 max-w-4xl">
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.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this
form.
</strong>
</p>
<FormDescriptionText />
</section>
{/*-------------------------------------------------------- */}
<section className="grid grid-cols-2">
Expand Down Expand Up @@ -263,18 +267,7 @@ export const RespondToRai = () => {
)}
/>
{/*-------------------------------------------------------- */}
<div className="my-2">
<p className="font-light mb-6 max-w-4xl">
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.{" "}
<strong className="bold">
If you leave this page, you will lose your progress on this
form.
</strong>
</p>
</div>
<FormDescriptionText />
{Object.keys(form.formState.errors).length !== 0 ? (
<Alert className="mb-6" variant="destructive">
Missing or malformed information. Please see errors above.
Expand Down

0 comments on commit 69e80a8

Please sign in to comment.