Skip to content

Commit

Permalink
fix(faq links): Correcting faq llinks and behavior (#467)
Browse files Browse the repository at this point in the history
* fix(faq links): Correcting faq llinks and behavior

* adjust faq links

* updaded faq links

* found another few

* Final one

* add s

* fixed a couple small things

* bump

* bump

* bump

* Update links and text t match existing site

* update something

* last ones

* last one

* Typo

* yup

* Fix

* corrected up to a point

* update faqs

* add default

* Last fix

* te fix

---------

Co-authored-by: Mike Dial <[email protected]>
  • Loading branch information
benjaminpaige and mdial89f authored Apr 29, 2024
1 parent 1b1bb13 commit f112cfe
Show file tree
Hide file tree
Showing 27 changed files with 52 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ import { attachmentTitleMap } from "shared-types";
export const AttachmentsSection = ({
attachments,
instructions,
faqLink,
faqAttLink,
}: {
attachments: AttachmentRecipe[];
instructions?: string;
faqLink: string;
faqAttLink: string;
}) => {
const form = useFormContext();
return (
<section className={"mb-8"}>
<h2 className="font-bold text-2xl font-sans mb-2">Attachments</h2>
{instructions && <p>{instructions}</p>}
<AttachmentsSizeTypesDesc faqLink={faqLink} />
<AttachmentsSizeTypesDesc faqAttLink={faqAttLink} />
{attachments.map(({ name, required }) => (
<FormField
key={String(name) + "-field"}
Expand Down
15 changes: 8 additions & 7 deletions src/services/ui/src/components/Form/old-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export const SpaIdFormattingDesc = () => (
);

export const AttachmentsSizeTypesDesc = ({
faqLink,
faqAttLink,
includeCMS179 = false,
}: {
faqLink: string;
faqAttLink: string;
includeCMS179?: boolean;
}) => (
<div className="text-gray-700 font-light">
Expand All @@ -58,7 +58,7 @@ export const AttachmentsSizeTypesDesc = ({
for each of the attachment types on the{" "}
{
<Link
to={faqLink}
to={faqAttLink}
target={FAQ_TAB}
rel="noopener noreferrer"
className="text-blue-700 hover:underline"
Expand All @@ -71,16 +71,17 @@ export const AttachmentsSizeTypesDesc = ({
<br />
<p>
We accept the following file formats:{" "}
<strong className="bold">.docx, .jpg, .pdf, .png, .xlsx.</strong> See the
full list on the{" "}
<strong className="bold">
.docx, .docx, .pdf, .jpg, .opd, and more.{" "}
</strong>{" "}
{
<Link
to="/faq/acceptable-file-formats"
to={"/faq/acceptable-file-formats"}
target={FAQ_TAB}
rel="noopener noreferrer"
className="text-blue-700 hover:underline"
>
FAQ Page
See the full list
</Link>
}
.
Expand Down
4 changes: 2 additions & 2 deletions src/services/ui/src/components/Routing/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useNavigate = () => {
query?: Record<string, string>;
hash?: string;
} & Params<T>,
options?: NavigateOptions
options?: NavigateOptions,
) => {
const to = (() => {
let url: string = props.path;
Expand Down Expand Up @@ -50,7 +50,7 @@ export const redirect = <T extends Route>(
path: T;
query?: Record<string, string>;
hash?: string;
} & Params<T>
} & Params<T>,
) => {
const to = (() => {
let url: string = props.path;
Expand Down
12 changes: 6 additions & 6 deletions src/services/ui/src/features/faq/content/oneMACFAQContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const oneMACFAQContent: FAQContent[] = [
sectionTitle: "General",
qanda: [
{
anchorText: "system",
anchorText: "crosswalk-system",
question: "Which system should I use for my state’s submission?",
answerJSX: (
<section id={"system"}>
<section>
<p>
Check which system to submit your state plan in with this
crosswalk training document.
Expand Down Expand Up @@ -414,7 +414,7 @@ export const oneMACFAQContent: FAQContent[] = [
<tbody>
<tr>
<td className="border border-gray-300 px-4 py-2">
RAI Response*
RAI Response Letter*
</td>
<td className="border border-gray-300 px-4 py-2">
Letter responding to RAI questions, any updated SPA pages,
Expand Down Expand Up @@ -916,7 +916,7 @@ export const oneMACFAQContent: FAQContent[] = [
),
},
{
anchorText: "1915(b)-waiver-extension-attachments",
anchorText: "temporary-extensions-b-attachments",
question:
"What are the attachments for a 1915(b) Waiver - Request for Temporary Extension?",
answerJSX: (
Expand Down Expand Up @@ -957,9 +957,9 @@ export const oneMACFAQContent: FAQContent[] = [
),
},
{
anchorText: "1915(c)-waiver-extension-attachments",
anchorText: "temporary-extensions-b-attachments",
question:
"What are the attachments for a 1915(c) Waiver - Request for Temporary Extension",
"What are the attachments for a 1915(c) Waiver - Request for Temporary Extension?",
answerJSX: (
<>
<p>Note: “*” indicates a required attachment.</p>
Expand Down
10 changes: 5 additions & 5 deletions src/services/ui/src/features/faq/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ export const Faq = () => {
</SubNavHeader>
<section className="block md:flex md:flex-row max-w-screen-xl m-auto px-4 lg:px-8 pt-8 gap-10">
<div className="flex-1">
<article key={"Asdf"} className="mb-8">
<article className="mb-8">
<Accordion
type="multiple"
value={openItems}
onValueChange={setOpenItems}
>
{oneMACFAQContent.map(({ sectionTitle, qanda }) => (
<article key={sectionTitle} className="mb-8">
<h2 className="text-2xl mb-4 text-primary">
{sectionTitle}
</h2>
<h2 className="text-2xl mb-4 text-primary">{sectionTitle}</h2>
{qanda.map(({ anchorText, answerJSX, question }) => (
<AccordionItem
value={anchorText}
id={anchorText}
key={anchorText}
>
<AccordionTrigger>{question}</AccordionTrigger>
<AccordionTrigger className="text-left">
{question}
</AccordionTrigger>
<AccordionContent>{answerJSX}</AccordionContent>
</AccordionItem>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Action, Authority, AuthorityUnion } from "shared-types";
import { Action, AuthorityUnion } from "shared-types";
import { ReactElement } from "react";
import {
bWaiverRaiFields,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const defaultIssueRaiFields: ReactElement[] = [
required: false,
},
]}
faqLink={""}
faqAttLink={"/faq"}
/>,
<AdditionalInfoSection
required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const chipSpaRaiFields: ReactElement[] = [
required: false,
},
]}
faqLink={""}
faqAttLink="/faq/chip-spa-rai-attachments"
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const medSpaRaiFields: ReactElement[] = [
</ActionFormDescription>,
<PackageSection key={"content-packagedetails"} />,
<AttachmentsSection
faqAttLink="/faq/medicaid-spa-rai-attachments"
key={"field-attachments"}
attachments={[
{
Expand All @@ -42,7 +43,6 @@ export const medSpaRaiFields: ReactElement[] = [
required: false,
},
]}
faqLink={""}
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const bWaiverRaiFields: ReactElement[] = [
</ActionFormDescription>,
<PackageSection key={"content-packagedetails"} />,
<AttachmentsSection
faqAttLink="/faq/waiverb-rai-attachments"
key={"field-attachments"}
attachments={[
{
Expand All @@ -35,7 +36,6 @@ export const bWaiverRaiFields: ReactElement[] = [
},
{ required: false, name: "other" },
]}
faqLink={""}
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const defaultTempExtFields: ReactElement[] = [
<TEPackageSection key={"content-packagedetails"} />,
<AttachmentsSection
key={"field-attachments"}
faqAttLink="/faq/temporary-extensions-b-attachments"
attachments={[
{
name: "waiverExtensionRequest",
Expand All @@ -88,7 +89,6 @@ export const defaultTempExtFields: ReactElement[] = [
required: false,
},
]}
faqLink={""}
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const TemporaryExtension = () => {
<form onSubmit={handleSubmit}>
<TEPackageSection key={"content-packagedetails"} />
<AttachmentsSection
faqAttLink={"/faq/temporary-extensions-b-attachments"}
key={"field-attachments"}
attachments={[
{
Expand All @@ -108,7 +109,6 @@ export const TemporaryExtension = () => {
required: false,
},
]}
faqLink={""}
/>
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const defaultWithdrawPackageFields: ReactElement[] = [
</ActionFormDescription>,
<PackageSection key={"content-packagedetails"} />,
<AttachmentsSection
faqAttLink="/faq"
key={"field-attachments"}
instructions={
"Upload your supporting documentation for withdrawal or explain your need for withdrawal in the Additional Information section."
Expand All @@ -52,7 +53,6 @@ export const defaultWithdrawPackageFields: ReactElement[] = [
required: false,
},
]}
faqLink={""}
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const chipWithdrawPackageFields: ReactElement[] = [
</ActionFormDescription>,
<PackageSection key={"content-packagedetails"} />,
<AttachmentsSection
faqAttLink="/faq"
key={"field-attachments"}
instructions={
"Official withdrawal letters are required and must be on state letterhead signed by the State Medicaid Director or CHIP Director."
Expand All @@ -34,7 +35,6 @@ export const chipWithdrawPackageFields: ReactElement[] = [
required: true,
},
]}
faqLink={""}
/>,
<AdditionalInfoSection
key={"field-addlinfo"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export const defaultWithdrawRaiFields: ReactElement[] = [
</ActionFormDescription>,
<PackageSection key={"content-packagedetails"} />,
<AttachmentsSection
faqAttLink="/faq"
key={"field-attachments"}
attachments={[
{
name: "supportingDocumentation",
required: false,
},
]}
faqLink={""}
/>,
<AdditionalInfoSection
required
Expand Down
5 changes: 2 additions & 3 deletions src/services/ui/src/features/package/hooks.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useGetItem } from "@/api";
import { removeUnderscoresAndCapitalize } from "@/utils";
import { useEffect, useLayoutEffect, useState } from "react";
import { useLayoutEffect, useState } from "react";

export type DetailsSidebarLink = {
id: string;
Expand All @@ -16,10 +16,9 @@ export const useDetailsSidebarLinks = (

useLayoutEffect(() => {
const ids = [
"package_details",
"package_detailss",
"package_activity",
"administrative_package_changess",
"appendix_k",
];

// Check if dataId is not undefined before proceeding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const PackageDetails: FC<{
const { data } = usePackageDetailsCache();
// const title = props.title || `${data.authority} Package Details`;
return (
<DetailsSection id="package_details" title={props.title}>
<DetailsSection id="package_detailss" title={props.title}>
<div className="flex-col gap-4 max-w-2xl">
<DetailItemsGrid displayItems={recordDetails(data)} />
<DetailItemsGrid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { PropsWithChildren, ReactElement } from "react";
import { useLocation } from "react-router-dom";
import { useLocation, Link } from "react-router-dom";
import {
Button,
Link,
SimplePageContainer,
BreadCrumbs,
FAQ_TAB,
Expand Down Expand Up @@ -34,9 +33,10 @@ const FAQHelperText = () => (
<i>
For additional information on where to submit, refer to the{" "}
<Link
className="text-sky-700 hover:text-sky-800 underline"
to="/faq/crosswalk-system"
target={FAQ_TAB}
path={"/faq/system" as Route}
rel="noopener noreferrer"
className="text-blue-700 hover:underline flex items-center"
>
Crosswalk from Paper-based State Plan to MACPro and MMDL
</Link>{" "}
Expand Down
3 changes: 1 addition & 2 deletions src/services/ui/src/features/submission/app-k/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ export const AppKSubmissionForm = () => {
/>
</C.SectionCard>
<C.SectionCard title="Attachments">
<C.AttachmentsSizeTypesDesc faqLink="/faq/#chip-spa-attachments" />

<C.AttachmentsSizeTypesDesc faqAttLink="/faq/appk-attachments" />
<I.FormField
control={form.control}
name={"attachments.appk"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const ChipSpaFormPage = () => {
/>
</SectionCard>
<SectionCard title="Attachments">
<Content.AttachmentsSizeTypesDesc faqLink="/faq/chip-spa-attachments" />
<Content.AttachmentsSizeTypesDesc faqAttLink="/faq/chip-spa-attachments" />
{attachmentList.map(({ name, label, required }) => (
<Inputs.FormField
key={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const MedicaidSpaFormPage = () => {
</SectionCard>
<SectionCard title="Attachments">
<Content.AttachmentsSizeTypesDesc
faqLink="/faq/medicaid-spa-attachments"
faqAttLink="/faq/medicaid-spa-attachments"
includeCMS179
/>
{attachmentList.map(({ name, label, required }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const Capitated1915BWaiverAmendmentPage = () => {
/>
</SectionCard>
<SectionCard title="Attachments">
<Content.AttachmentsSizeTypesDesc faqLink="/faq/medicaid-spa-attachments" />
<Content.AttachmentsSizeTypesDesc faqAttLink="/faq/waiverb-attachments" />
{attachmentList.map(({ name, label, required }) => (
<Inputs.FormField
key={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const Capitated1915BWaiverInitialPage = () => {
/>
</SectionCard>
<SectionCard title="Attachments">
<Content.AttachmentsSizeTypesDesc faqLink="/faq/medicaid-spa-attachments" />
<Content.AttachmentsSizeTypesDesc faqAttLink="/faq/waiverb-attachments" />
{attachmentList.map(({ name, label, required }) => (
<Inputs.FormField
key={name}
Expand Down
Loading

0 comments on commit f112cfe

Please sign in to comment.