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

[Release] 10/07/2024 #198

Merged
merged 21 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dc1b750
Feature/added action to deploy webapp to s3 (#182)
lucaslightit Jun 21, 2024
1c73751
fix: Fixed staging build (#184)
lucaslightit Jun 21, 2024
665b8a0
Fix/GitHub action to deploy to s3 (#185)
lucaslightit Jun 21, 2024
2fcc3d9
[FEATURE][CU-86dtvhgdb] Add column to the incomplete profiles (#183)
cgarcia-lightit Jun 24, 2024
59b0d32
feat: implement sentry and resolve console error in the console to av…
cgarcia-lightit Jun 28, 2024
aa6bcde
fix: implement changes from code review
cgarcia-lightit Jul 2, 2024
b569613
fix: typo error
cgarcia-lightit Jul 2, 2024
df09942
feat: implement sentry and resolve console error in the console to av…
cgarcia-lightit Jul 2, 2024
e82e753
style: fix lint
cgarcia-lightit Jul 4, 2024
06064e7
feat: merge feature into develop
cgarcia-lightit Jul 4, 2024
6a9c82c
build(deps): bump pnpm/action-setup from 2 to 4 (#186)
dependabot[bot] Jul 4, 2024
d24ad69
feature: Updated pnpm version (#195)
lucaslightit Jul 4, 2024
def69fa
feature: updated pnpm version
lucaslightit Jul 4, 2024
1332109
Feature/cu 86dttgpfa/remove dist folder (#196)
sgoycoechea-lightit Jul 4, 2024
50116cc
build(deps): bump actions/cache from 3 to 4 (#187)
dependabot[bot] Jul 8, 2024
acab0f2
build(deps): bump react-toastify from 9.1.2 to 10.0.5 (#188)
dependabot[bot] Jul 8, 2024
b02503f
build(deps): bump react-hook-form from 7.43.9 to 7.52.1 (#194)
dependabot[bot] Jul 8, 2024
dd074c5
build(deps): bump clsx from 1.2.1 to 2.1.1 (#189)
dependabot[bot] Jul 8, 2024
5d38b90
build(deps-dev): bump @tailwindcss/forms from 0.5.3 to 0.5.7 (#192)
dependabot[bot] Jul 8, 2024
16ab1ca
build(deps): bump swiper from 11.0.5 to 11.1.4 (#191)
dependabot[bot] Jul 8, 2024
a98fd86
[BUGFIX][CU-86du17mby] Bug multiple surveys processed for a single re…
cgarcia-lightit Jul 9, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
uses: pnpm/action-setup@v4

- name: Setup Node 18
uses: actions/setup-node@v4
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/production_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PRODUCTION Deploy

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8.3.1
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Deploy static site to S3 bucket
run: aws s3 sync ./apps/eo_web/dist/ s3://eo-care-web-prod --delete
49 changes: 49 additions & 0 deletions .github/workflows/staging_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: STAGING Deploy

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8.3.1
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Deploy static site to S3 bucket
run: aws s3 sync ./apps/eo_web/dist/ s3://eo-care-web-dev --delete
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ node_modules
# testing
coverage

# production
# builds
dist
build
!./apps/eo_web/build/*

Expand Down
3 changes: 0 additions & 3 deletions apps/eo_web/dist/assets/UploadFile-694e44b5.svg

This file was deleted.

9 changes: 0 additions & 9 deletions apps/eo_web/dist/assets/avatar-37667ed6.svg

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Binary file not shown.
Binary file removed apps/eo_web/dist/fonts/NewHero-Bold.woff2
Binary file not shown.
Binary file removed apps/eo_web/dist/fonts/NewHero-Light.woff2
Binary file not shown.
Binary file removed apps/eo_web/dist/fonts/NewHero-Medium.woff2
Binary file not shown.
Binary file removed apps/eo_web/dist/fonts/NewHero-Regular.woff2
Binary file not shown.
Binary file removed apps/eo_web/dist/fonts/NewHero-SemiBold.woff2
Binary file not shown.
Binary file removed apps/eo_web/dist/img/BagWhite.png
Binary file not shown.
Binary file removed apps/eo_web/dist/img/Brain.png
Binary file not shown.
Binary file removed apps/eo_web/dist/img/Calendar.png
Binary file not shown.
Binary file removed apps/eo_web/dist/img/CalendarChecked.png
Binary file not shown.
Binary file removed apps/eo_web/dist/img/Feedback.png
Binary file not shown.
Binary file removed apps/eo_web/dist/img/ThumbUp.png
Binary file not shown.
25 changes: 0 additions & 25 deletions apps/eo_web/dist/manifest.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/eo_web/dist/vite.svg

This file was deleted.

5 changes: 3 additions & 2 deletions apps/eo_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@headlessui/react": "^1.7.13",
"@hookform/resolvers": "^3.6.0",
"@react-oauth/google": "^0.9.0",
"@sentry/react": "^8.13.0",
"@tanstack/react-query": "^4.29.3",
"@tanstack/react-query-devtools": "^5.45.1",
"autoprefixer": "^10.4.14",
Expand All @@ -28,8 +29,8 @@
"react-dom": "^18.2.0",
"react-multi-date-picker": "^3.3.4",
"react-router-dom": "^6.10.0",
"react-toastify": "^9.1.1",
"swiper": "^11.0.5",
"react-toastify": "^10.0.5",
"swiper": "^11.1.4",
"uuid": "^9.0.0",
"zod": "^3.21.4",
"zustand": "^4.5.2"
Expand Down
9 changes: 7 additions & 2 deletions apps/eo_web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { ToastContainer } from "react-toastify";

import { env } from "./env";

import "./configs/env";

import { Router } from "./router";
import "react-toastify/dist/ReactToastify.css";

import "react-toastify/dist/ReactToastify.css";

const queryClient = new QueryClient();
type Hosts =
Expand Down Expand Up @@ -37,6 +40,8 @@ interface EnvironmentsConfigs {
ROI_CALCULATOR_FORM: string;
WEB_APP_URL: string;
CHECKOUT_FORM_ID: string;
VITE_SENTRY_DNS_PUBLIC: string;
VITE_APP_ENV: string;
}

declare global {
Expand Down Expand Up @@ -67,7 +72,7 @@ function App() {
draggable
pauseOnHover
/>
{env.VITE_APP_ENV === "local" && (
{env.VITE_APP_ENV === "localhost" && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</QueryClientProvider>
Expand Down
8 changes: 3 additions & 5 deletions apps/eo_web/src/api/useApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ interface CreatePreProfileParams {
last_name: string;
email: string;
phone_number: string;
origin: string;
}

export const useApi = () => {
Expand Down Expand Up @@ -133,11 +134,8 @@ export const useApi = () => {
authHeader,
);

const eligibleEmail = async (email: string) =>
await apiElixir.post<LaravelSuccessBase<unknown> | LaravelErrorValidation>(
"/v2/profiles/eligible",
{ email },
);
const eligibleEmail = (email: string) =>
apiLaravel.post<void>(`/api/profiles/eligible`, { email });

const surveyStatus = async (email: string, phase: string) =>
await apiElixir.get<{ active: boolean }>(
Expand Down
24 changes: 24 additions & 0 deletions apps/eo_web/src/api/useProfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { useQuery, type UseQueryOptions } from "@tanstack/react-query";

import { useApi } from "~/api/useApi";

const useProfilesKeys = {
eligibleEmailQuery: (email: string) => ["eligibleEmail", email],
};

export const useProfile = () => {
const { eligibleEmail } = useApi();
const useEligibleEmailQuery = (
email: string,
extraConfig: Partial<UseQueryOptions>,
) =>
useQuery({
queryKey: useProfilesKeys.eligibleEmailQuery(email),
queryFn: () => eligibleEmail(email),
...extraConfig,
});

return {
useEligibleEmailQuery,
};
};
18 changes: 6 additions & 12 deletions apps/eo_web/src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ import { type Swiper as SwiperType } from "swiper";
import { A11y, Navigation, Pagination } from "swiper/modules";
import { Swiper, SwiperSlide } from "swiper/react";

import { useIsDesktop, useIsMobile } from "~/hooks/useIsMobile";
// Import Swiper styles
import { useIsDesktop, useIsMobile } from "~/hooks/useIsMobile"; // Import Swiper styles
import "swiper/css";
import "swiper/css/pagination";
import React, { Fragment, useRef } from "react";

import React, { useRef } from "react";

import { tw } from "@eo/shared";
import { icons } from "@eo/ui";





export interface EoCarouselProps {
children: React.ReactNode[];
}
Expand Down Expand Up @@ -59,11 +55,9 @@ export const EoCarousel = ({ children }: EoCarouselProps) => {
>
{children.map((item, key) => {
return (
<Fragment key={`${key}`}>
<SwiperSlide>
<div className="mb-12">{item}</div>
</SwiperSlide>
</Fragment>
<SwiperSlide key={`carrousel-item-${key}`}>
<div className="mb-12">{item}</div>
</SwiperSlide>
);
})}
</Swiper>
Expand Down
11 changes: 4 additions & 7 deletions apps/eo_web/src/components/FAQs.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from "react";
import React, { useId } from "react";

import { Typography } from "@eo/ui";

import { cOrgFaqs, inovaFaqs, paidFaqs, pilotFaqs } from "~/copy/copy";
import { Flows, type FlowType } from "~/stores/useProfilingStore";
import { Collapsible } from "./Collapsible";


interface FAQsProps {
flow?: FlowType;
}
Expand All @@ -24,10 +23,7 @@ const flowsWithCOrgFaqs: FlowType[] = [
Flows.stupid_cancer,
];

const flowsWithInovaFaqs: FlowType[] = [
Flows.inova,
Flows.uva,
];
const flowsWithInovaFaqs: FlowType[] = [Flows.inova, Flows.uva];

const getFAQCopies = (flow?: FlowType) => {
if (flow && flowsWithCOrgFaqs.includes(flow)) return cOrgFaqs;
Expand All @@ -39,6 +35,7 @@ const getFAQCopies = (flow?: FlowType) => {

export const FAQs = ({ flow }: FAQsProps) => {
const faqList = getFAQCopies(flow);
const faqId = useId();

return (
<section className="px-6 py-12 md:mx-0 md:my-[100px]">
Expand All @@ -52,7 +49,7 @@ export const FAQs = ({ flow }: FAQsProps) => {
</Typography>
<div className="flex flex-col gap-6">
{faqList.map(({ title, content }) => (
<Collapsible key={title} title={title} active={false}>
<Collapsible key={`${title}-${faqId}`} title={title} active={false}>
<Typography className="text-[18px] leading-[26px] text-gray-800">
{content}
</Typography>
Expand Down
3 changes: 1 addition & 2 deletions apps/eo_web/src/components/HowEOWorks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import { Flows, type FlowType } from "~/stores/useProfilingStore";
import { EoCarousel } from "./Carousel";


interface HowEOWorksProps {
flow?: FlowType;
}
Expand Down Expand Up @@ -39,7 +38,7 @@ export const HowEOWorks = ({ flow }: HowEOWorksProps) => {
<EoCarousel>
{carouselItems.map(({ title, content, step, icon: Icon }) => (
<article
key={step}
key={`${title}-${step}}`}
className="mx-auto my-0 flex h-auto w-auto max-w-[361px] flex-col items-center justify-center gap-2 md:flex-none md:items-start"
>
<div className="flex h-[70.13px] w-[70.13px] flex-row items-center justify-center rounded-full bg-electric-blue fill-gray-50">
Expand Down
Loading
Loading