Skip to content

Commit

Permalink
Merge pull request #227 from Light-it-labs/develop
Browse files Browse the repository at this point in the history
[Release] v1.1.0 🚀 - 18/09/2024
  • Loading branch information
cgarcia-lightit authored Sep 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 1bbc69a + 6a79253 commit 78c0942
Showing 6 changed files with 61 additions and 16 deletions.
6 changes: 6 additions & 0 deletions apps/eo_web/src/components/FAQs.tsx
Original file line number Diff line number Diff line change
@@ -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];
13 changes: 11 additions & 2 deletions apps/eo_web/src/layouts/Footer.tsx
Original file line number Diff line number Diff line change
@@ -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) {
38 changes: 25 additions & 13 deletions apps/eo_web/src/screens/AccountCreation.tsx
Original file line number Diff line number Diff line change
@@ -20,29 +20,33 @@ import {
type FlowType,
} from "~/stores/useProfilingStore";

export const ReferralOptions = {
export const ReferralOptions: Record<string, FlowType> = {
"Twist Out Cancer": Flows.twist_out_cancer,
"Unite for Her": Flows.unite_for_her,
"Imerman Angels": Flows.imerman,
"Stupid Cancer": Flows.stupid_cancer,
"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{" "}
8 changes: 7 additions & 1 deletion apps/eo_web/src/screens/Cancer/CancerSurveyThankYou.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
6 changes: 6 additions & 0 deletions apps/eo_web/src/screens/ProfilingThankYou.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
6 changes: 6 additions & 0 deletions apps/eo_web/src/stores/useProfilingStore.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 78c0942

Please sign in to comment.