Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE][86dqm7ndu] Add experience with cannabis #40

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-d8248ea6.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-32c26137.css",
"src": "src/main.css"
},
"src/main.tsx": {
"assets": [
"assets/UploadFile-694e44b5.svg"
],
"css": [
"assets/main-20667dcd.css"
"assets/main-32c26137.css"
],
"file": "assets/main-03507f56.js",
"file": "assets/main-d8248ea6.js",
"isEntry": true,
"src": "src/main.tsx"
}
Expand Down
29 changes: 24 additions & 5 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 @@ -134,7 +138,12 @@ 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 md:gap-4"
style={{
padding: "0 !important",
}}
>
<Input
id={"firstName"}
type="text"
Expand All @@ -154,7 +163,12 @@ 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 md:gap-4"
style={{
padding: "0 !important",
}}
>
<Input
id={"email"}
placeholder="Email*"
Expand All @@ -176,7 +190,12 @@ 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 md:gap-4"
style={{
padding: "0 !important",
}}
>
<Input
id={"phoneNumber"}
placeholder="Phone number*"
Expand Down Expand Up @@ -229,7 +248,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 underline"
rel="noreferrer"
>
Terms of Service
Expand All @@ -238,7 +257,7 @@ export const AccountCreation = () => {
<a
href="https://www.eo.care/web/privacy-policy"
target="_blank"
className="underline"
className="!font-nunito !text-[11px] !font-light 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