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 28, 2023
1 parent 24be9f8 commit 247d7c4
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 141 deletions.
120 changes: 0 additions & 120 deletions apps/eo_web/dist/assets/main-03507f56.js

This file was deleted.

Large diffs are not rendered by default.

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

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-9d561a39.css",
"src": "src/main.css"
},
"src/main.tsx": {
"assets": [
"assets/UploadFile-694e44b5.svg"
],
"css": [
"assets/main-20667dcd.css"
"assets/main-9d561a39.css"
],
"file": "assets/main-03507f56.js",
"file": "assets/main-b612f1fd.js",
"isEntry": true,
"src": "src/main.tsx"
}
Expand Down
17 changes: 10 additions & 7 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,8 +137,7 @@ export const AccountCreation = () => {
>
Create an Account
</Typography>

<div className="grid grid-cols-2 gap-0 md:gap-4">
<div className="grid grid-cols-2 gap-0 !p-0 md:gap-4">
<Input
id={"firstName"}
type="text"
Expand All @@ -154,7 +157,7 @@ export const AccountCreation = () => {
placeholder="Last Name*"
/>
</div>
<div className="grid grid-cols-2 gap-0 md:gap-4">
<div className="grid grid-cols-2 gap-0 !p-0 md:gap-4">
<Input
id={"email"}
placeholder="Email*"
Expand All @@ -176,7 +179,7 @@ export const AccountCreation = () => {
error={errors.password?.message}
/>
</div>
<div className="grid grid-cols-2 gap-0 md:gap-4">
<div className="grid grid-cols-2 gap-0 !p-0 md:gap-4">
<Input
id={"phoneNumber"}
placeholder="Phone number*"
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 247d7c4

Please sign in to comment.