Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
25c0774
fix bad naming conventions in breathecode service
gustavomm19 Apr 10, 2025
e2248a9
move cohort service on breathecode to admissions
gustavomm19 Apr 11, 2025
4d0b12c
move signup logic to useSignup hook
gustavomm19 Apr 14, 2025
f70aef7
Merge branch 'development' of https://github.com/gustavomm19/app into…
gustavomm19 Apr 14, 2025
26601e5
remove utils from common folder
gustavomm19 Apr 14, 2025
e15b78c
refactor subscriptions logic
gustavomm19 Apr 15, 2025
a0364ae
separate redirection feature from managePlanOffer function
gustavomm19 Apr 15, 2025
b1470d8
fix conflict
gustavomm19 Apr 15, 2025
06f7b9a
remove unused plan offers logic from the subscriptions fetch
gustavomm19 Apr 16, 2025
2242394
remove subscriptions handler file
gustavomm19 Apr 16, 2025
4d68649
create cohorts utils
gustavomm19 Apr 16, 2025
15cf7f6
Merge branch 'development' of https://github.com/gustavomm19/app into…
gustavomm19 Apr 17, 2025
5802b60
remove console.log
gustavomm19 Apr 21, 2025
feed5c3
fix layout on cohort dashboard
gustavomm19 Apr 21, 2025
295924a
add bolean areSubscriptionsFetched
gustavomm19 Apr 21, 2025
8ae7d1a
remove handlers folder
gustavomm19 Apr 22, 2025
dcd3737
small fix
gustavomm19 Apr 22, 2025
2066528
fix naming convention
gustavomm19 Apr 22, 2025
51f17bb
fix deploy error
gustavomm19 Apr 22, 2025
240e58a
refactoring checkout view
gustavomm19 Apr 24, 2025
13010c6
fix steps enumeration in checkout
gustavomm19 Apr 24, 2025
26ddf59
fixing error messages
gustavomm19 Apr 24, 2025
f3f6849
fix conflict
gustavomm19 Apr 24, 2025
ddc99a3
removed redundant token url management logic on checkout
gustavomm19 Apr 24, 2025
8257151
add first cursor rules
gustavomm19 Apr 28, 2025
48d6d3b
small fixes
gustavomm19 Apr 28, 2025
f2e1e65
remove unnused choose cohort code on checkout
gustavomm19 Apr 29, 2025
ba37c1e
remove redundant token handling
gustavomm19 Apr 29, 2025
65d5a67
componetize payment-methods
gustavomm19 Apr 29, 2025
bf16e16
remove unused code in the Summary component
gustavomm19 Apr 29, 2025
6915ceb
remove unsued
gustavomm19 Apr 29, 2025
9149483
remove unnecesary cohortPlans attribute
gustavomm19 May 2, 2025
4461742
fix conflicts
gustavomm19 May 2, 2025
14bd4ae
fixes
gustavomm19 May 2, 2025
48fd407
small changes
gustavomm19 May 2, 2025
cef28ac
small fixes on payment summary
gustavomm19 May 5, 2025
d8ca765
remove duplicated code from the checkout process
gustavomm19 May 6, 2025
4fb344f
small fixes
gustavomm19 May 6, 2025
5f2b913
small fixes
gustavomm19 May 7, 2025
f25b546
fix conflict
gustavomm19 May 12, 2025
1d71aaa
delete unused component
gustavomm19 May 12, 2025
fd6998b
fix import error
gustavomm19 May 12, 2025
4f31a60
create rigobot service
gustavomm19 May 12, 2025
7ccd4bc
fixes on breathecode service auth
gustavomm19 May 12, 2025
0e1cb46
fix cursor rules
gustavomm19 May 12, 2025
248b355
fix
gustavomm19 May 12, 2025
5df12ee
display error message on payments
gustavomm19 May 12, 2025
ec560fa
Merge branch 'development' of https://github.com/gustavomm19/app into…
gustavomm19 May 15, 2025
3836bee
reuse subscriptions logic in the cohort dashboard
gustavomm19 May 16, 2025
a877d73
remove unused and unfinished ConnectionContext
gustavomm19 May 16, 2025
19d2bfc
Add more cursor rules and remove unused hooks
gustavomm19 May 16, 2025
8266073
remove unused reducers from redux
gustavomm19 May 16, 2025
9960e1a
remove legacy cypress yml job
gustavomm19 May 16, 2025
f7b1f52
remove old cypress commands
gustavomm19 May 16, 2025
0c855f1
refactor consumables page
gustavomm19 May 16, 2025
46a2bba
optimize get plan calls in checkout process
gustavomm19 May 19, 2025
2508ac7
separate checkout logic to its own hook
gustavomm19 May 27, 2025
1bffecd
fix conflicts
gustavomm19 May 27, 2025
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
9 changes: 9 additions & 0 deletions .cursor/rules/auth.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
description:
globs:
alwaysApply: true
---
The authentication of the user is managed through the [AuthContext.jsx](mdc:src/context/AuthContext.jsx). This context provides the basic functions to login, logout and validate the current session.


To get information regarding the authentication and the user we use the [useAuth.js](mdc:src/hooks/useAuth.js) hook, which consumes from the AuthContext.
21 changes: 21 additions & 0 deletions .cursor/rules/components.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description:
globs:
alwaysApply: true
---
##Components
All of our components are in the folder @/src/components. The files and folders names must be created using PascalCase.

###Icons
We have an Icon component inside the components folder. The Icon has a set of icons inside that folder, which are svg components that can be customized with props (width, height, style, color, etc.).

###UI Library
Our UI library is Chakra UI. Whe should always use Chakra to build our pages and our components.
There are some chakra components that are customized with our own styling, so we should use those instead of the ones from chakra:
- src/components/Text
- src/components/Heading

###Styling
We have all of our colors defined on the theme.js file inside the styles folder. We must always use the color variables declared in that file.

We also have the useStyle hook which has color modes declared with our defined colors. The object hexColor can be used with the icons, since the icons dont support the color variables natively through strings.
11 changes: 11 additions & 0 deletions .cursor/rules/good-practices.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description:
globs:
alwaysApply: true
---
##Promises
When using promises we wont use the chaining event syntax, we will use async/await and try/catch to avoid the callback hell.

##Linting

We are using ESLint to improve the higene of our code. Make sure to follow its recommendations and fix linting errors if they arise.
6 changes: 6 additions & 0 deletions .cursor/rules/lib.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description:
globs:
alwaysApply: true
---
In the lib folder we are storing functions that reuse calls to the API and dont involve hooks.
10 changes: 10 additions & 0 deletions .cursor/rules/services.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description:
globs:
alwaysApply: true
---
##Breathecode
The service breathecode is the api from where we will consume most of our data. Every time we want to communicate with breathecode, it must be done using the service declared in the [breathecode.js](mdc:src/services/breathecode.js) file in the services folder. Internally, the breathecode service is separated by modules, which corresponds to the modules of the api.

##Rigobot
Rigobot is another api from where we will consume some data ocasionally. This service is also structured by modules inside the file [rigobot.js](mdc:src/services/rigobot.js).
6 changes: 6 additions & 0 deletions .cursor/rules/subscriptions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description:
globs:
alwaysApply: true
---
The subscriptions of the user are managed through the hook [useSubscriptions.js](mdc:src/hooks/useSubscriptions.js) and they are loaded after the user is authenticated.
6 changes: 6 additions & 0 deletions .cursor/rules/utils.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description:
globs:
alwaysApply: true
---
In the utils folder we will only store pure functions that are reused in may sections of the project
31 changes: 0 additions & 31 deletions .github/workflows/cypress.yml

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
7 changes: 0 additions & 7 deletions cypress.json

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"storybook": "bun make:iconDict && bun generate-namespaces && storybook dev -p 6006",
"build-storybook": "bun make:iconDict && bun generate-namespaces && storybook build",
"make:iconDict": "bun ./scripts/make.iconDict.js",
"cy:open": "cypress open",
"cy:run": "cypress run",
"test": "bun ./src/__tests__/publicSyllabus.js",
"lint:files": "eslint src/**/*.{js,jsx}",
"lint:fix": "eslint src/**/*.{js,jsx} --fix",
Expand Down
1 change: 0 additions & 1 deletion public/locales/en/alert-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"error-mentorship-service": "There was an error loading the mentorship services",
"error-finding-mentors": "Something went wrong while looking for mentors for this service",
"no-link-exist": "There is no link for this event yet",
"no-course-configuration": "The course configuration you are trying to buy does not exist.",
"no-plan-configuration": "The plan configuration you are trying to get does not exist",
"error-getting-offer": "Sorry, we couldn't get the plan offer.",
"error-getting-plan": "Sorry, we couldn't get the plan.",
Expand Down
37 changes: 0 additions & 37 deletions public/locales/en/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@
"many-payments-left": "Payment: {{qty}} payments left",
"no-payment-left": "Payment: No payments left",
"renewal-date": "Renewal date: {{date}}",
"yearly-savings": "You are saving {{months}} months",
"charged": "Charged",
"yearly-savings-singular": "You are saving {{months}} month",
"payment_unit": {
"month": "Monthly",
"year": "Yearly",
"anual": "Anual"
},
"payment_unit_short": {
"month": "mo",
"year": "yr",
"anual": "yr"
},
"renewal-date-unknown": "Renewal date: Unknown",
"payment-trial": "Payment: Trial",
"payment-free": "Payment: Free",
Expand All @@ -133,30 +120,6 @@
"contact-support": "Chat with support",
"manage-subscription": "Manage subscription",
"duration-cancelled": "Duration: Cancelled",
"upgrade-modal": {
"choose_your_plan": "Choose your plan",
"choose_how_much": "Choose how much",
"not_ready_to_commit": "Not ready to commit?",
"no_card_needed": "No card needed. Full access to all features for",
"duration_days": "{{duration}} days",
"duration_month": "{{duration}} month",
"connector_duration_trial": "trial",
"subscription": "Subscription",
"one_payment": "One payment",
"free-course": "Free course",
"finance": "Financed",
"buy_mentorships": "You have consumed all the available mentorships, buy more menthorships",
"free_trial": "Free trial",
"upgrade_free_trial": "Upgrade free trial",
"price_remaining_to_pay": "${{price}} remaining to pay",
"monthly_payment": "Monthly payment",
"yearly_payment": "Yearly payment",
"many_months_payment": "{{qty}} months payment",
"many_months_description": "You will pay ${{monthly_price}} for {{many_months}} months and get full access to all features for the duration of the course.",
"full_access": "Full access to all features for the duration of the course.",
"free_trial_description": "Upgrade your plan to access this and many other benefits.",
"upgrade_access": "Upgrade your membership to access all the benefits of the 4Geeks community"
},
"cancel-modal": {
"title": "Cancel subscription",
"description": "Are you sure you want to cancel your subscription to {{cohort}}",
Expand Down
13 changes: 13 additions & 0 deletions public/locales/en/signup.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@
"discount": "{{discount}} OFF",
"try-again": "Try again",
"coupon-error": "This coupon is not valid or it has expired",
"learn-at-your-pace": "Learn at your pace",
"yearly-savings": "Save {{months}} months",
"yearly-savings-singular": "Save {{months}} month",
"payment_unit": {
"month": "Monthly",
"year": "Yearly",
"anual": "Anual"
},
"payment_unit_short": {
"month": "mo",
"year": "yr",
"anual": "yr"
},
"join-cohort": {
"cta": {
"lesson": "Join cohort to get access to this lesson",
Expand Down
1 change: 0 additions & 1 deletion public/locales/es/alert-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"error-mentorship-service": "Hubo un error al cargar los servicios de tutoría.",
"error-finding-mentors": "Algo salió mal al buscar mentores para este servicio",
"no-link-exist": "Aun no existe un enlace para este evento",
"no-course-configuration": "La configuración del curso que intenta comprar no existe.",
"no-plan-configuration": "La configuración del plan que intenta obtener no existe.",
"error-getting-offer": "Lo sentimos, no hemos podido obtener la oferta del plan.",
"error-getting-plan": "Lo sentimos, no hemos podido obtener el plan.",
Expand Down
37 changes: 0 additions & 37 deletions public/locales/es/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@
"many-payments-left": "Pago: {{qty}} pagos restantes",
"no-payment-left": "Pago: Sin pagos restantes",
"renewal-date": "Fecha de renovación: {{date}}",
"yearly-savings": "Estás ahorrándote {{months}} meses",
"charged": "Cobrado",
"yearly-savings-singular": "Estás ahorrándote {{months}} mes",
"payment_unit": {
"month": "Mensual",
"year": "Anual",
"anual": "Anual"
},
"payment_unit_short": {
"month": "mes",
"year": "año",
"anual": "año"
},
"renewal-date-unknown": "Fecha de renovación: Desconocida",
"payment-trial": "Pago: Prueba",
"payment-free": "Pago: Libre",
Expand All @@ -133,30 +120,6 @@
"manage-subscription": "Administrar suscripción",
"contact-support": "Chatea con soporte",
"duration-cancelled": "Duración: Cancelada",
"upgrade-modal": {
"choose_your_plan": "Elige tu plan",
"choose_how_much": "Elige cuanto",
"not_ready_to_commit": "¿No estás listo para comprometerte?",
"no_card_needed": "No se requiere tarjeta. Acceso completo a todas las funciones por",
"duration_days": "{{duration}} dias",
"duration_month": "{{duration}} mes",
"connector_duration_trial": "gratis",
"subscription": "Suscripción",
"one_payment": "Pago único",
"free-course": "Curso gratuito",
"finance": "Financiado",
"buy_mentorships": "Ha consumido todas las mentorías disponibles, compre más mentorías",
"free_trial": "Prueba gratuita",
"upgrade_free_trial": "Actualizar prueba gratuita",
"price_remaining_to_pay": "${{price}} restantes para pagar",
"monthly_payment": "Pago mensual",
"yearly_payment": "Pago anual",
"many_months_payment": "{{qty}} pagos mensuales",
"many_months_description": "Pagaras ${{monthly_price}} durante {{many_months}} meses y obtendras Acceso completo a todas las funciones durante la duración del curso.",
"full_access": "Acceso completo a todas las funciones durante la duración del curso.",
"free_trial_description": "Mejora tu plan para acceder a este y muchos otros beneficios.",
"upgrade_access": "Actualice su membresía para acceder a todos los beneficios de la comunidad 4Geeks"
},
"cancel-modal": {
"title": "Cancelar suscripción",
"description": "¿Estás seguro de que desea cancelar su suscripción a {{cohort}}?",
Expand Down
13 changes: 13 additions & 0 deletions public/locales/es/signup.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@
"discount": "{{discount}} DE DESCUENTO",
"try-again": "Intenta de nuevo",
"coupon-error": "Este cupón no es válido o está expirado",
"learn-at-your-pace": "Aprende a tu propio ritmo",
"yearly-savings": "Ahorra {{months}} meses",
"yearly-savings-singular": "Ahorra {{months}} mes",
"payment_unit": {
"month": "Mensual",
"year": "Anual",
"anual": "Anual"
},
"payment_unit_short": {
"month": "mes",
"year": "año",
"anual": "año"
},
"join-cohort": {
"cta": {
"lesson": "Únete a la cohorte para poder acceder a esta lección",
Expand Down
23 changes: 0 additions & 23 deletions src/__tests__/counter.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/AcordionList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function AcordionList({
}

AcordionList.propTypes = {
defaultIndex: PropTypes.arrayOf(PropTypes.number),
defaultIndex: PropTypes.number,
allowMultiple: PropTypes.bool,
list: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.any])),
color: PropTypes.string,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Assets/FixedBottomCta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ StickyBottomCta.propTypes = {
couponApplied: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.any])),
onClick: PropTypes.func.isRequired,
isCtaVisible: PropTypes.bool.isRequired,
financingAvailable: PropTypes.string,
financingAvailable: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
isAuthenticated: PropTypes.bool,
isFetching: PropTypes.bool,
paymentOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.any])),
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssignmentButton/ProjectSubmitButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function ProjectSubmitButton({
Array.from(fileProps).forEach(({ file }) => {
formdata.append('file', file);
});
const resp = await bc.todo({ academy: cohortSession?.academy.id }).uploadFile(currentTask.id, formdata);
const resp = await bc.assignments({ academy: cohortSession?.academy.id }).uploadFile(currentTask.id, formdata);

if (resp?.status < 400) {
const respData = resp.data[0];
Expand Down
6 changes: 3 additions & 3 deletions src/components/AssignmentButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ function AssignmentButton({

const fetchAsset = async () => {
try {
const assetResp = await bc.lesson().getAsset(currentTask.associated_slug);
const assetResp = await bc.registry().getAsset(currentTask.associated_slug);
if (assetResp?.status >= 400) {
throw new Error('Error fetching asset');
}
let assetData = assetResp.data;
if (assetData?.translations?.[lang]) {
const localeResp = await bc.lesson().getAsset(assetResp.data.translations[lang]);
const localeResp = await bc.registry().getAsset(assetResp.data.translations[lang]);
assetData = localeResp.data;
}
setCurrentAsset(assetData);
Expand Down Expand Up @@ -83,7 +83,7 @@ function AssignmentButton({
assetData = await fetchAsset();
}
if (typeof assetData?.delivery_formats === 'string' && !assetData?.delivery_formats.includes('url')) {
const fileResp = await bc.todo().getFile({ id: currentTask.id });
const fileResp = await bc.assignments().getFile({ id: currentTask.id });
const respData = fileResp.data;
setFileData(respData);
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Assignments/FinalProjects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ function FinalProjects({ finalProjects, loadStatus, updpateProject }) {
const getAllStudents = async () => {
try {
if (finalProjects.length > 0) {
const resp = await bc.cohort().getStudents2(cohortSlug);
const resp = await bc.admissions().getAllCohortUsers(cohortSlug);

if (resp.status === 200) {
const { data } = resp;
const members = finalProjects.flatMap((project) => project.members);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Assignments/Projects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Icon from '../Icon';
import Text from '../Text';
import TaskLabel from '../taskLabel';
import { isGithubUrl } from '../../utils/regex';
import ButtonHandler from './index';
import ReviewButton from './index';
import useAssignments from '../../store/actions/assignmentsAction';
import SubmissionReviewButton from './SubmissionReviewButton';
import LoaderScreen from '../LoaderScreen';
Expand Down Expand Up @@ -102,7 +102,7 @@ const ProjectsRows = forwardRef(({
/>

<Box width="auto" minWidth="160px" textAlign="end">
<ButtonHandler
<ReviewButton
currentTask={task}
contextState={contextState}
updpateAssignment={updpateAssignment}
Expand Down
Loading