diff --git a/apps/eo_web/src/components/FAQs.tsx b/apps/eo_web/src/components/FAQs.tsx index 159f1502..3584b3a5 100644 --- a/apps/eo_web/src/components/FAQs.tsx +++ b/apps/eo_web/src/components/FAQs.tsx @@ -21,6 +21,12 @@ const flowsWithCOrgFaqs: FlowType[] = [ Flows.unite_for_her, Flows.mass_retirees, Flows.stupid_cancer, + + // The flows related to resources_center_1/2 + Flows.cancer_buddy, + Flows.friend_family, + Flows.northwell_systems, + Flows.realm_of_caring, ]; const flowsWithInovaFaqs: FlowType[] = [Flows.inova, Flows.uva]; diff --git a/apps/eo_web/src/layouts/Footer.tsx b/apps/eo_web/src/layouts/Footer.tsx index 1e08f11d..dbab2cb4 100644 --- a/apps/eo_web/src/layouts/Footer.tsx +++ b/apps/eo_web/src/layouts/Footer.tsx @@ -1,11 +1,10 @@ import React from "react"; import { tw } from "@eo/shared"; -import { Typography, icons } from "@eo/ui"; +import { icons, Typography } from "@eo/ui"; import { Flows, type FlowType } from "~/stores/useProfilingStore"; - interface FooterProps { flow: FlowType; } @@ -134,6 +133,12 @@ const stupid_cancer = [ }, ...basicData, ]; + +const cancer_buddy = resource_center_1; +const realm_of_caring = resource_center_1; +const friend_family = resource_center_1; +const northwell_systems = resource_center_1; + const allData = { c_org, cancer_pilot, @@ -149,6 +154,10 @@ const allData = { unite_for_her, mass_retirees, stupid_cancer, + cancer_buddy, + realm_of_caring, + friend_family, + northwell_systems, }; export function Footer({ flow }: FooterProps) { diff --git a/apps/eo_web/src/screens/AccountCreation.tsx b/apps/eo_web/src/screens/AccountCreation.tsx index 85edb70b..580f4327 100644 --- a/apps/eo_web/src/screens/AccountCreation.tsx +++ b/apps/eo_web/src/screens/AccountCreation.tsx @@ -20,7 +20,7 @@ import { type FlowType, } from "~/stores/useProfilingStore"; -export const ReferralOptions = { +export const ReferralOptions: Record = { "Twist Out Cancer": Flows.twist_out_cancer, "Unite for Her": Flows.unite_for_her, "Imerman Angels": Flows.imerman, @@ -28,21 +28,25 @@ export const ReferralOptions = { "Cancer Support Community": Flows.cancer_support_community, "UVA Health": Flows.uva, "Inova Schar Cancer Institute": Flows.inova, + "Mass Retirees": Flows.mass_retirees, + "Northwell Systems": Flows.northwell_systems, + "Friend / Family": Flows.friend_family, + "Cancer Buddy": Flows.cancer_buddy, + "Realm of Caring": Flows.realm_of_caring, } as const; export type ReferralOptionsType = keyof typeof ReferralOptions; const getFlowFromReferral = (value: string) => { - const keys = Object.keys(ReferralOptions) as ReferralOptionsType[] - const key = keys.find(key => key === value) - return key ? ReferralOptions[key] : undefined -} + const keys: ReferralOptionsType[] = Object.keys(ReferralOptions); + const key = keys.find((key) => key === value); + return key ? ReferralOptions[key] : undefined; +}; const getReferredBy = (searchParams: URLSearchParams) => { - const encodedReferredBy = searchParams.get("referred_by") ?? undefined - return encodedReferredBy ? decodeURIComponent(encodedReferredBy) : undefined -} - + const encodedReferredBy = searchParams.get("referred_by") ?? undefined; + return encodedReferredBy ? decodeURIComponent(encodedReferredBy) : undefined; +}; export const signUpSchema = z.object({ // Profiling @@ -104,8 +108,8 @@ export const AccountCreation = () => { setReferredBy, } = useProfilingStore((state) => state); - const referredBy = getReferredBy(useParams) - const referredFlow = referredBy ? getFlowFromReferral(referredBy) : undefined + const referredBy = getReferredBy(useParams); + const referredFlow = referredBy ? getFlowFromReferral(referredBy) : undefined; const [validatingForm, setValidatingForm] = useState(false); const { mutate: createPreProfile } = usePreProfile().preProfileMutation; @@ -188,6 +192,14 @@ export const AccountCreation = () => { return "13"; case Flows.c_org: return "14"; + case Flows.cancer_buddy: + return "15"; + case Flows.realm_of_caring: + return "16"; + case Flows.friend_family: + return "17"; + case Flows.northwell_systems: + return "18"; } }; @@ -294,7 +306,7 @@ export const AccountCreation = () => { className={tw( "font-nunito text-[11px] font-light ", errors.agreeReceiveNotifications?.message && - "text-red-500", + "text-red-500", )} > I agree to receive emails and text messages related to my @@ -316,7 +328,7 @@ export const AccountCreation = () => { className={tw( "font-nunito text-[11px] font-light !leading-4", errors.agreeTermsAndConditions?.message && - "text-red-500", + "text-red-500", )} > I have read and agree to the{" "} diff --git a/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx b/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx index 41550014..b3f5326f 100644 --- a/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx +++ b/apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx @@ -7,7 +7,7 @@ import { HowEOWorks } from "~/components/HowEOWorks"; import { LayoutDefault } from "~/layouts"; import { Footer } from "~/layouts/Footer"; import { FooterFull } from "~/layouts/FooterFull"; -import { type Channel, Flows, type FlowType } from "~/stores/useProfilingStore"; +import { Flows, type Channel, type FlowType } from "~/stores/useProfilingStore"; import { useSurveyStore } from "~/stores/useSurveyStore"; const flowsWithSmallFooter: FlowType[] = [ @@ -20,6 +20,12 @@ const flowsWithSmallFooter: FlowType[] = [ Flows.employer_center, Flows.inova, Flows.uva, + + // The flows related to resources_center_1/2 + Flows.cancer_buddy, + Flows.friend_family, + Flows.northwell_systems, + Flows.realm_of_caring, ]; export const CancerSurveyThankYou = () => { diff --git a/apps/eo_web/src/screens/ProfilingThankYou.tsx b/apps/eo_web/src/screens/ProfilingThankYou.tsx index 08b5b2a3..823403f6 100644 --- a/apps/eo_web/src/screens/ProfilingThankYou.tsx +++ b/apps/eo_web/src/screens/ProfilingThankYou.tsx @@ -30,6 +30,12 @@ const flowsWithSmallFooter: FlowType[] = [ Flows.uva, Flows.imerman, Flows.unite_for_her, + + // The flows related to resources_center_1/2 + Flows.cancer_buddy, + Flows.friend_family, + Flows.northwell_systems, + Flows.realm_of_caring, ]; export const ProfilingThankYou = () => { diff --git a/apps/eo_web/src/stores/useProfilingStore.ts b/apps/eo_web/src/stores/useProfilingStore.ts index f64e38c5..f4605d80 100644 --- a/apps/eo_web/src/stores/useProfilingStore.ts +++ b/apps/eo_web/src/stores/useProfilingStore.ts @@ -34,6 +34,12 @@ export const Flows = { unite_for_her: "unite_for_her", mass_retirees: "mass_retirees", stupid_cancer: "stupid_cancer", + // these are not real flows, because these came from resource_center_1 or resource_center_2 + // but we save these values in the same place that flows + cancer_buddy: "cancer_buddy", + realm_of_caring: "realm_of_caring", + friend_family: "friend_family", + northwell_systems: "northwell_systems", } as const; export type FlowType = keyof typeof Flows;