Skip to content

Commit

Permalink
[FEATURE][86dqm7ndu] Add experience with cannabis (#40)
Browse files Browse the repository at this point in the history
* feature: add experience with cannabis and pass it to profiling form

* feat: add dist files

* feat: fix styles in staging and production environment
  • Loading branch information
cgarcia-lightit committed Nov 30, 2023
1 parent 24be9f8 commit 003212b
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 138 deletions.
120 changes: 0 additions & 120 deletions apps/eo_web/dist/assets/main-03507f56.js

This file was deleted.

120 changes: 120 additions & 0 deletions apps/eo_web/dist/assets/main-062732ec.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion apps/eo_web/dist/assets/main-20667dcd.css

This file was deleted.

1 change: 1 addition & 0 deletions apps/eo_web/dist/assets/main-73a76634.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/eo_web/dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"src": "../../packages/ui/src/assets/avatar.svg"
},
"src/main.css": {
"file": "assets/main-20667dcd.css",
"file": "assets/main-73a76634.css",
"src": "src/main.css"
},
"src/main.tsx": {
"assets": [
"assets/UploadFile-694e44b5.svg"
],
"css": [
"assets/main-20667dcd.css"
"assets/main-73a76634.css"
],
"file": "assets/main-03507f56.js",
"file": "assets/main-062732ec.js",
"isEntry": true,
"src": "src/main.tsx"
}
Expand Down
11 changes: 11 additions & 0 deletions apps/eo_web/src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.grid {
grid-column-gap: 0;
grid-template-rows: auto !important;
grid-template-columns: .5fr 1fr;
padding: 0;
}

.p {
line-height: normal;
}

@font-face {
font-family: "New Hero";
src: url("/fonts/NewHero-Light.woff2") format("opentype");
Expand Down
11 changes: 7 additions & 4 deletions apps/eo_web/src/screens/AccountCreation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const AccountCreation = () => {
setIntroQuestionSubmissionId,
channel,
setState,
setExperience,
} = useProfilingStore((state) => state);
// const navigate = useNavigate();
const { eligibleEmail } = useApi();
Expand Down Expand Up @@ -108,6 +109,8 @@ export const AccountCreation = () => {
useMount(() => {
const submissionId = useParams.get("submission_id");
const state = useParams.get("state");
const experience = useParams.get("experience") ?? "";

if (!submissionId) {
toast.error(
<p>
Expand All @@ -118,6 +121,7 @@ export const AccountCreation = () => {
} else {
setState(state);
setIntroQuestionSubmissionId(submissionId);
setExperience(experience);
}
});

Expand All @@ -133,7 +137,6 @@ export const AccountCreation = () => {
>
Create an Account
</Typography>

<div className="grid grid-cols-2 gap-0 md:gap-4">
<Input
id={"firstName"}
Expand Down Expand Up @@ -220,7 +223,7 @@ export const AccountCreation = () => {
variant="small"
font="regular"
className={tw(
"font-nunito text-[11px] font-light ",
"font-nunito text-[11px] font-light !leading-4",
errors.agreeTermsAndConditions?.message &&
"text-red-500",
)}
Expand All @@ -229,7 +232,7 @@ export const AccountCreation = () => {
<a
href="https://www.eo.care/web/terms-of-use"
target="_blank"
className="underline"
className="!font-nunito !text-[11px] !font-light !leading-4 underline"
rel="noreferrer"
>
Terms of Service
Expand All @@ -238,7 +241,7 @@ export const AccountCreation = () => {
<a
href="https://www.eo.care/web/privacy-policy"
target="_blank"
className="underline"
className="!font-nunito !text-[11px] !font-light !leading-4 underline"
rel="noreferrer"
>
Privacy Policy{" "}
Expand Down
6 changes: 3 additions & 3 deletions apps/eo_web/src/screens/Cancer/Profiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import { useProfilingStore } from "~/stores/useProfilingStore";


export const Profiling = () => {
const { type, symptoms, state, usePayment, origin } = useProfilingStore(
(state) => state,
);
const { type, symptoms, state, usePayment, origin, experience } =
useProfilingStore((state) => state);

const searchParam = new URLSearchParams({
states: state ?? "",
symptoms: symptoms.join(","),
payment: usePayment ? "yes" : "no",
origin,
experience,
});

const navigate = useNavigate();
Expand Down
6 changes: 3 additions & 3 deletions apps/eo_web/src/screens/Senior/Profiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { useProfilingStore } from "~/stores/useProfilingStore";


export const Profiling = () => {
const { type, symptoms, state, usePayment, origin } = useProfilingStore(
(state) => state,
);
const { type, symptoms, state, usePayment, origin, experience } =
useProfilingStore((state) => state);
const searchParam = new URLSearchParams({
states: state ?? "",
symptoms: symptoms.join(","),
payment: usePayment ? "yes" : "no",
origin,
experience,
});
const navigate = useNavigate();

Expand Down
2 changes: 1 addition & 1 deletion apps/eo_web/src/screens/UserRolSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const UserRolSelector = () => {
const redirectForm = (type: Type) => {
const channel = searchParams.get("channel") as Channel;
const symptoms = searchParams.get("symptoms") ?? "";
const origin = searchParams.get("origin") ?? "http://localhost:5173";
const origin = searchParams.get("origin") ?? "localhost:5173";

setOrigin(origin);
setSymptoms(symptoms.split(","));
Expand Down
6 changes: 6 additions & 0 deletions apps/eo_web/src/stores/useProfilingStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface ProfilingStore {
introQuestionSubmissionId?: string | null;
usePayment: boolean;
origin: string;
experience: string;
account: Account;
setAccountData: (account: Account) => void;
setChannel: (channel: Channel) => void;
Expand All @@ -37,6 +38,7 @@ export interface ProfilingStore {
setUsePayment: (usePayment: boolean) => void;
resetProfilingStore: () => void;
setOrigin: (origin: string) => void;
setExperience: (experience: string) => void;
}

const defaultState = {
Expand All @@ -46,6 +48,7 @@ const defaultState = {
symptoms: [],
state: null,
origin: "",
experience: "",
account: {
email: "",
password: "",
Expand Down Expand Up @@ -88,6 +91,9 @@ export const useProfilingStore = create<ProfilingStore>()(
setOrigin: (origin: string) => {
set({ origin });
},
setExperience: (experience: string) => {
set({ experience });
},
...defaultState,
}),
{
Expand Down
14 changes: 11 additions & 3 deletions packages/ui/src/form/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Input = forwardRef(
const [showPassword, setShowPassword] = useState(false);

return (
<div style={style} className={tw("relative ", containerClassName)}>
<div style={style} className={tw("relative", containerClassName)}>
{!!label && <Label htmlFor={id} className="" label={label} />}
<div
className={tw(
Expand All @@ -58,7 +58,12 @@ export const Input = forwardRef(
)}
>
{(!!left || type === "password") && (
<div className="pointer-events-none absolute pl-3">
<div
className="pointer-events-none pl-3"
style={{
position: "absolute",
}}
>
<IconWrapper size="sm">
{left || (
<icons.LockIcon
Expand Down Expand Up @@ -97,10 +102,13 @@ export const Input = forwardRef(
<IconWrapper
size="sm"
className={tw(
"absolute right-0 flex flex-row items-center justify-center",
"right-0 flex flex-row items-center justify-center",
`w-[${rightWidth}px]`,
preventEventsRightIcon ? "pointer-events-none" : "",
)}
style={{
position: "absolute",
}}
>
{right ||
(showPassword ? (
Expand Down

0 comments on commit 003212b

Please sign in to comment.