From 0f89470ffbd03d0962115300088705d8ac14182f Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 4 Dec 2024 22:58:33 +0200 Subject: [PATCH 1/9] chore: Fix inline registration --- .../steps/authentication/InlineRegisterForm.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx b/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx index b0e3cdc90..61c69b851 100644 --- a/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx +++ b/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx @@ -83,7 +83,7 @@ export default function InlineRegisterForm() { try { setLoading(true) // Register in Keycloak - + console.log(values.password, values.confirmPassword) if (values.terms && values.gdpr && values.password === values.confirmPassword) { await register(values) } else if (!values.terms) { @@ -143,7 +143,7 @@ export default function InlineRegisterForm() { @@ -155,11 +155,11 @@ export default function InlineRegisterForm() { )} - + {!formik.values.registerTerms && formik.touched.registerTerms && ( {t('validation:terms-of-use')} )} - + {!formik.values.registerGdpr && formik.touched.registerGdpr && ( {t('validation:terms-of-service')} From 882ffb46801da9077cdab12a42c75aaa5dc6994b Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 4 Dec 2024 23:03:28 +0200 Subject: [PATCH 2/9] fix: Add minimum width to svgs for donation payment --- .../donation-flow/steps/payment-method/PaymentMethod.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/client/donation-flow/steps/payment-method/PaymentMethod.tsx b/src/components/client/donation-flow/steps/payment-method/PaymentMethod.tsx index 16769a641..a021bf558 100644 --- a/src/components/client/donation-flow/steps/payment-method/PaymentMethod.tsx +++ b/src/components/client/donation-flow/steps/payment-method/PaymentMethod.tsx @@ -35,13 +35,13 @@ export default function PaymentMethod({ { value: 'card', label: t('step.payment-method.field.method.card'), - icon: , + icon: , disabled: false, }, { value: 'bank', label: t('step.payment-method.field.method.bank'), - icon: , + icon: , disabled: mode.value === 'subscription', }, ] From 668c99a860eff97a1c7f611eb34ce25ae94b5925 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 4 Dec 2024 23:04:01 +0200 Subject: [PATCH 3/9] chore: Add full stop at the end of the sentence --- public/locales/bg/donation-flow.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/bg/donation-flow.json b/public/locales/bg/donation-flow.json index 8514038a1..e039106a0 100644 --- a/public/locales/bg/donation-flow.json +++ b/public/locales/bg/donation-flow.json @@ -102,7 +102,7 @@ }, "noregister": { "label": "Продължете без регистрация ", - "description": "Продължавайки без регистрация, нямате възможност да запазите дарението в историята на профила си както и да правите месечни дарения по избрана кампания" + "description": "Продължавайки без регистрация, нямате възможност да запазите дарението в историята на профила си както и да правите месечни дарения по избрана кампания." }, "field": { "password": "Парола", From 362c9721e11e17d2105b2e9606a1d6a05f77acb7 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 4 Dec 2024 23:33:10 +0200 Subject: [PATCH 4/9] fix: Social links buttons not working --- .../common/SocialShareListButton.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/common/SocialShareListButton.tsx b/src/components/common/SocialShareListButton.tsx index ffe3bc4ab..3e20a3c5d 100644 --- a/src/components/common/SocialShareListButton.tsx +++ b/src/components/common/SocialShareListButton.tsx @@ -8,7 +8,7 @@ import { PopoverProps, ButtonProps, } from '@mui/material' -import { ContentCopy, Facebook, LinkedIn, Share, Twitter } from '@mui/icons-material' +import { ContentCopy, Facebook, LinkedIn, Share, Twitter, X } from '@mui/icons-material' import { AlertStore } from 'stores/AlertStore' import theme from 'common/theme' @@ -25,11 +25,16 @@ export default function SocialShareListButton({ }) { const { t } = useTranslation('common') const [anchorEl, setAnchorEl] = React.useState(null) - const serializedUrl = new URLSearchParams(url).toString() + const handleClick = (event: React.MouseEvent) => { + console.log(event.currentTarget) setAnchorEl(event.currentTarget) } + React.useEffect(() => { + console.log(url) + }, [url]) + const handleClose = () => { setAnchorEl(null) } @@ -56,26 +61,27 @@ export default function SocialShareListButton({ { navigator.clipboard.writeText(url) + console.log(url) AlertStore.show('Campaign link copied to clipboard', 'success') setAnchorEl(null) }}> {t('components.social-share.copy')} - + {t('components.social-share.share')} Facebook {t('components.social-share.share')} LinkedIn - - {t('components.social-share.share')} Twitter - + + {t('components.social-share.share')} X + From 9a0d48bc7b2f2ab193e25e51226d8a7579d250e2 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 5 Dec 2024 00:05:46 +0200 Subject: [PATCH 5/9] chore: Make amountChosen optional for now --- src/components/client/donation-flow/steps/Amount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/client/donation-flow/steps/Amount.tsx b/src/components/client/donation-flow/steps/Amount.tsx index 303327984..986862668 100644 --- a/src/components/client/donation-flow/steps/Amount.tsx +++ b/src/components/client/donation-flow/steps/Amount.tsx @@ -27,7 +27,7 @@ export const initialAmountFormValues = { export const amountValidation = { amountChosen: yup.string().when('payment', { is: 'card', - then: yup.string().required(), + then: yup.string().optional(), }), finalAmount: yup.number().when('payment', { is: (payment: string | null) => ['card', null].includes(payment), From a0fe2873c9b506d3419ac19b707d8a23cf7caff7 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 5 Dec 2024 00:07:52 +0200 Subject: [PATCH 6/9] fix: Typo in translation key --- public/locales/en/donation-flow.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/en/donation-flow.json b/public/locales/en/donation-flow.json index 1d888caf6..2f6c0ca80 100644 --- a/public/locales/en/donation-flow.json +++ b/public/locales/en/donation-flow.json @@ -56,7 +56,7 @@ }, "card-data": { "name-label": "Cardholder name", - "error": { + "errors": { "email": "Please enter your email", "name": "Please enter your name" } From 5425fedbb66a7486e258c841a6f3ffa07479e9dd Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 5 Dec 2024 00:13:42 +0200 Subject: [PATCH 7/9] chore: Remove redundant log --- .../donation-flow/steps/authentication/InlineRegisterForm.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx b/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx index 61c69b851..3da6606db 100644 --- a/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx +++ b/src/components/client/donation-flow/steps/authentication/InlineRegisterForm.tsx @@ -83,7 +83,6 @@ export default function InlineRegisterForm() { try { setLoading(true) // Register in Keycloak - console.log(values.password, values.confirmPassword) if (values.terms && values.gdpr && values.password === values.confirmPassword) { await register(values) } else if (!values.terms) { From 23106839024d6a92c3d833b4e786101dfe4f66c1 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 5 Dec 2024 00:14:38 +0200 Subject: [PATCH 8/9] chore: Remove redundant log --- src/components/common/SocialShareListButton.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/common/SocialShareListButton.tsx b/src/components/common/SocialShareListButton.tsx index 3e20a3c5d..9e2f3c951 100644 --- a/src/components/common/SocialShareListButton.tsx +++ b/src/components/common/SocialShareListButton.tsx @@ -31,10 +31,6 @@ export default function SocialShareListButton({ setAnchorEl(event.currentTarget) } - React.useEffect(() => { - console.log(url) - }, [url]) - const handleClose = () => { setAnchorEl(null) } From e926ba15632a34f0ca437bc34b6aec883fc8bbcd Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Fri, 6 Dec 2024 19:42:22 +0200 Subject: [PATCH 9/9] chore: Remove redundant logs --- src/components/common/SocialShareListButton.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/common/SocialShareListButton.tsx b/src/components/common/SocialShareListButton.tsx index 9e2f3c951..b8fc77091 100644 --- a/src/components/common/SocialShareListButton.tsx +++ b/src/components/common/SocialShareListButton.tsx @@ -27,7 +27,6 @@ export default function SocialShareListButton({ const [anchorEl, setAnchorEl] = React.useState(null) const handleClick = (event: React.MouseEvent) => { - console.log(event.currentTarget) setAnchorEl(event.currentTarget) } @@ -57,7 +56,6 @@ export default function SocialShareListButton({ { navigator.clipboard.writeText(url) - console.log(url) AlertStore.show('Campaign link copied to clipboard', 'success') setAnchorEl(null) }}>