Skip to content

Commit

Permalink
New design notifications news (#1673)
Browse files Browse the repository at this point in the history
* New design for campaign news subscription

* format change

* lint fix

* news notifications added

* buttons for notification commented

* Uncommented buttons for notifications

* lint fix

* small fixes

* [#1554] headings font size bug fixes (#1613)

* headings font size bug fixes

* removed library from package.json

* Terms and GDPR added in the registerForm (#1617)

* Terms and GDPR added in the registerForm

* Format check added

* Some error messages added in the RegisterForm

* add RalitsaIlieva as a contributor for code (#1618)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* New font Commissioner (#1620)

Co-authored-by: igoychev <igoychev@gmail.com>

* Update BG text for Reports page (#1621)

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* Update team members (#1622)

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* fix: rounds correctly Donated money value in Statistics section (#1623)

* build(deps): bump @babel/traverse from 7.22.8 to 7.23.2 (#1624)

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade of translation libraries and related (#1616)

* upgraded NextJS to fix dependabot vulnerability warnings

* fixed linter and formatting

* reverted next to 13.4.12, updated MUI and translation libraries

* upgraded playwright to latest

* fixed language change and corrected decimal separators

* forced resolution for postcss and zod to fix security recommendations

* added locale for tests to fix decimal separator mixups

* donation amount changed to integer to avoid language specific decimal separators

* upgraded node to v20

* fixing the docker build context to use the already checked out code from github checkout action

* Update mobile Guarantors slider (#1629)

* Update Guarantors slider

* Revert unnecessary changes

---------

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* Update alignment of Bank details on Donation (mobile) (#1628)

* Update bank details on donation

* Update reasoning

---------

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* build(deps): bump crypto-js from 4.1.1 to 4.2.0 (#1630)

Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](brix/crypto-js@4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade next version to 13.5.4 (#1631)

* Update next version to 13.5.4

* i18n: Fix translations not working for dynamic paths

* i18next.config: Detect user's locale from NEXT_LOCALE cookie

* added cookies consent banner (#1634)

* Update completed campaigns carousel (#1639)

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* [Stripe] Add refund functionality  (#1635)

* Add refund button

* Add refundStore

* Fix prettier problem

* Remove log

* Fix typos

* refundClickClickHandler -> refundClickHandler

* Show extPaymentId in confirmation box

* Fix button typo

* Show wishes on the top of campaign page (#1633)

* fix: shows tabs for donors and wishes

* fix: wishes tab shows messages and pagination

* fix: adds btn 'Show all' to wishes tab, align wishes array

* fix: InfoIcon align

* fix: shuffle wishes array

* fix: clear unused classes

* Add Finance report for 2022 (#1642)

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* add kzhecheva as a contributor for code (#1643)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* format change

* lint fix

* news notifications added

* buttons for notification commented

* Uncommented buttons for notifications

* Update Cookie consent popup (#1645)

* Update cookie consent popup

* removed auto accept on scroll

---------

Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>

* Add check to refund stripe donations only (#1648)

* Add if check to refund only stripe donations

* Use enum for variables

* Fix prettier

* Adds tests for Wishes and Donors sections on the top of Campaign page (#1646)

* feat: adds campaign summary section tests

* upgrade_sentry_to_7.80 (#1654)

* github actions update (#1655)

* added dependabot to update github actions

* added run-name for Release github workflow to better distinguish it in the actions list

* build(deps): bump actions/setup-node from 3 to 4 (#1656)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump actions/checkout from 3 to 4 (#1657)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump axios from 0.21.4 to 1.6.0 (#1661)

Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.21.4...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump imranismail/setup-kustomize from 1 to 2 (#1660)

Bumps [imranismail/setup-kustomize](https://github.com/imranismail/setup-kustomize) from 1 to 2.
- [Release notes](https://github.com/imranismail/setup-kustomize/releases)
- [Commits](imranismail/setup-kustomize@v1.0.0...v2)

---
updated-dependencies:
- dependency-name: imranismail/setup-kustomize
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump docker/login-action from 2 to 3 (#1659)

Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump docker/build-push-action from 3 to 5 (#1658)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v3...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* FIX: Added selfReg prop to the ServerUser obj an use it determinate if a user is form keycloak or external auth provider. (#1662)

* add PetarDimitrov91 as a contributor for code (#1663)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* add kzhecheva as a contributor for code, and test (#1664)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: igoychev <igoychev@gmail.com>

* disabled button for manual import, added guard in rerun button (#1652)

* disabled button for manual import,added guardin rerun button

* added description comments

* [1/2] Affiliate program Integration v1 (#1627)

* services/apiEndpoints: Change endpoint for registration
Endpoint for registration for individual users is now at /register/individual

* campaigns: Include guaranteed donations in reachedAmount

* donation.enums.ts: Add guaranteed DonationStatus
Match with the values on the backend

* donations: Use companyName when donation is made from corporate profile

* auth/register: Change register request to match latest changes in backend

* [SQUASH]: Donation improvements
src/one-step-donation: Allow for corporate donations
campaigns/InlineDonation: Limit the amount of donations on mobile to three
campaigns/ViewCampaignPage: Push InlineDonation from top, to prevent conflict with the navigation bar on mobile
campaigns/DonorsAndDonations: Handle different type of campaign donors

* one-time-donation/Steps.tsx Add session to donate's dependency array
Donate function needs to be redefined, with person's data in case user logs in on step two of donation flow.
Without this change any information coming from acccount/me response is considered undefined, even if user logs in during the second step, as this information was not available during the definition of donate

* one-time-donation/Steps.tsx: Add person to donation's dependency array
In some cases person remains undefined, even though user is logged in

* Allow  corporate registrations

* i18n: Add translations for new registration flow

* Fix horizontal scroll on smaller viewport width

* campaigns/DonationWishes.tsx: Show wishes from affiliate donations

* pdf/Certificate.tsx: Use companyName if donation is made by corporate profile

* pdf/Certificate: Move companyName condition out of the return statement
Looks a bit cleaner that way

* auth/profile: Changes for corporate profiles
- Person's data is now prefetched to prevent any layout shifts and errors until person's data has been loaded.
- Added new tab to summarize Affiliate's data which includes, as well as to cancel any guaranteed donations

* auth/Register: Fix signin attempt on corporate registration
-Sometimes the signin function is called before isSuccess state is switched to true. Use the response statusCode instead to check if the response is successfull
-Fixed translations on RegisterSuccess

* common/person: Allow for manual profile activation/deactivation
- Added a new column profile type, to separate individual from corporate profiles

* hooks/person: Fix cache not being invalidat on successfull active status response

* pages/admin: Add section to manage Affiliate program

* admin/affiliates: Remove unused import

* profile/AffiliateProgramTab: Fix crash when donation is undefined
In situations where affiliate record doesn't yet exist, donations is undefined, and it causes error

* hooks/affiliate: Invalidate affiliate data  when requesting to join affiliate program

This way there is no need to restart the page

* profile/affiliate: Add button to copy affiliate code
utils/useCopyToClipbaord.ts: Change hook to copy text passed to copyUrl as parameter

* AffiliateProgramTab: Summarize what is affiliate if user has not joined it
-Copybutton is now hidden if no affiliateCode is present

* CampaignDetails.tsx: Show campaign's summary data on page
Includes available amount, guaranteed amount, sent amount, and added expenses

* CampaignDetails.tsx: Remove unnnecessary Box component

* bg/auth: Change text on successfull corporate registration
Co-authored-by: Kalina Zhecheva <kzhecheva@users.noreply.github.com>

* eslint: Resolve  errors

* fix: aligns campaignType translation (#1668)

* added campaign donation chart (#1667)

* build(deps): bump sharp from 0.30.7 to 0.32.6 (#1669)

Bumps [sharp](https://github.com/lovell/sharp) from 0.30.7 to 0.32.6.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](lovell/sharp@v0.30.7...v0.32.6)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Implement fullscreen image slider when image is clicked (#1676)

Currently we don't have a gallery component, and when image is uploaded with role==gallery those images remain unusable on larger screens, due to their small size
This commit makes it so a full-screen gallery like is opened whenever an image with role==gallery is clicked.

* build(deps): bump next-auth from 4.22.1 to 4.24.5 (#1670)

Bumps [next-auth](https://github.com/nextauthjs/next-auth) from 4.22.1 to 4.24.5.
- [Release notes](https://github.com/nextauthjs/next-auth/releases)
- [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@4.22.1...next-auth@4.24.5)

---
updated-dependencies:
- dependency-name: next-auth
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove legacy hotjar implementation (#1678)

* Remove legacy hotjar implementation
Hotjar is now loaded through the GTM

* CampaignsPage.tsx: Remove Hotjar implementation

* build(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2 (#1679)

Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update active team members (#1675)

Co-authored-by: Ani Kalpachka <ani.kalpachka@merkle.com>

* one-time-donation/LoginForm.tsx: Refetch useCurrentPerson when logged in (#1677)

When user logs in trough donation step 2, person's data remains undefined due to data not being updated.
Manually refetch the data coming from useCurrentPerson() after login to refresh the user's data

* make the robots.txt file dynamic (#1680)

* Add new active members (#1681)

* lint fix

* small fixes

* uncommented code in Subscription Section

* Unused variables deleted and self-closing tags fix

* format changes

* e is returned in SubscriptionPage

* fix in expenses table and CheckboxField

* rearrange in CampaignDetails

* SubscribeModal removed from TeamSection

* format fix

* unused code deleted

* removed Grid and SectionGridWrapper in TeamsMemberSection

* format change

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Dzhani Ivanov <68897146+dzhaniivanov@users.noreply.github.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: igoychev <igoychev@gmail.com>
Co-authored-by: Ani <ani_kalpachka888@abv.bg>
Co-authored-by: ani-kalpachka <ani.kalpachka888@abv.bg>
Co-authored-by: Kalina Zhecheva <60223025+kzhecheva@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: quantum-grit <91589884+quantum-grit@users.noreply.github.com>
Co-authored-by: Aleksandar Petkov <sashko506@gmail.com>
Co-authored-by: Nikolay Nachev <44066540+Nnachevvv@users.noreply.github.com>
Co-authored-by: Petar Dimitrov <79804094+PetarDimitrov91@users.noreply.github.com>
Co-authored-by: Anton Angelov <123360440+tongo-angelov@users.noreply.github.com>
Co-authored-by: Ani Kalpachka <ani.kalpachka@merkle.com>
Co-authored-by: yyosifov <yosifov@officernd.com>
  • Loading branch information
15 people committed Jan 3, 2024
1 parent e6166b1 commit f37755e
Show file tree
Hide file tree
Showing 34 changed files with 703 additions and 199 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Watch releases of this repository to be notified about future updates:
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-76-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Please check [contributors guide](https://github.com/podkrepi-bg/frontend/blob/master/CONTRIBUTING.md) for:
Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const moduleExports = {
},
{
source: '/robots.txt',
destination: '/api/robots'
}
destination: '/api/robots',
},
]
},
async redirects() {
Expand Down
2 changes: 2 additions & 0 deletions public/locales/bg/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
},
"cta": {
"login": "Вход",
"guest": "Като гост",
"logout": "Изход",
"register": "Регистрация",
"send": "Изпрати",
"reset": "Смени"
},
"fields": {
"email": "Email",
"email-descriptive": "Въведи email адрес",
"password": "Парола",
"confirm-password": "Потвърждение на парола",
"first-name": "Име",
Expand Down
25 changes: 20 additions & 5 deletions public/locales/bg/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@
"save": "Запази",
"submit": "Изпрати",
"apply": "Кандидатствайте",
"subscribe": "Абониране за известия",
"subscribe": "Абонирай се за email известия за кампанията",
"subscribeFooter": "Абонирай се за бюлетина",
"subscribeGeneral": "Абонирайте се за email известия от Подкрепи.бг",
"subscribe-monthly-newsletter": "Месечен бюлтеин на Подкрепи.бг",
"subscribeGeneralSubtext": "Получавайте нашия месечен бюлетин, в който ще Ви информираме за най-интересните новини от Подкрепи.бг!",
"subscribe-general-monthly-newsletter": "Получавайте нашия месечен бюлетин, за да сте в час най-интересните новини от Подкрепи.бг!",
"subscribeGeneralButton": "Абонирайте се за новини",
"subscribe-general-newsletter-button": "Абонирайте се",
"support": "Дарете",
"support-cause-today": "Подкрепете кауза днес!",
"support-now": "Подкрепете сега",
Expand All @@ -95,10 +102,18 @@
"allow-donation-on-complete": "Разрешете дарения след достигане на сумата"
},
"subscribe": {
"confirm-sent": "Благодарим ви! На посочения e-mail адрес беше изпратено съобщение за потвърждение на вашето абониране.",
"confirm-subscribe": "Благодарим ви! Абонирахте се успешно.",
"subscribe-title": "Абониране за известия и новини от Podkrepi.bg",
"subscribe-campaign-title": "Абониране за известия по тази кампания"
"confirm-sent": "Моля, <strong>активирай</strong> абонамента си от email-a, който ти изпратихме на {{email}}",
"confirm-subscribe": "Записа се успешно.",
"subscribe-title": "Абониране за новините на Подкрепи.бг",
"subscribe-campaign-title": "Абониране за новините по кампанията",
"subscribe-text-nonLoggedUser": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия за тази кампания, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.",
"subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.",
"subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:",
"subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:",
"subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:",
"subscribe-button": "Запиши ме",
"profile-button": "На профилния",
"another-button": "На друг"
},
"campaign": {
"subheading": "Вашата подкрепа променя света и има значение. Всички подкрепящи чрез Подкрепи.бг са наши партньори в подпомагането на кампании за общността. Като щедър дарител Вие ставате важен партньор в подпомагането на кампания за нечие здраве или за успеха на кауза, която ви е близка до сърцето.",
Expand Down
4 changes: 4 additions & 0 deletions public/locales/bg/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"content": "Подкрепи.бг представлява общност от специалисти в областта на програмирането, правото, маркетинга, дизайна, медицината, финансите, социалното предприемачество и др. Обединени сме от целта да създадем устойчива и прозрачна платформа за дарения, която подкрепя каузи и хора в нужда, като заедно с това популяризира и връща доверието към дарителството в България.",
"meet-our-team": "Запознайте се с екипа ни"
},
"subscription-section": {
"heading": "Искаш да си в час с бъдещите ни постижения?",
"content": "Абонирай се за нашия бюлетин и ние ще те информираме за най-важното от живота на Подкрепи.бг. Всеки месец ще получваш email от нас, в който ще ти споделяме най-интересното за кампаниите, които поддържаме, както и за техните организатори и бенефициенти. Ще получаваш новините за нашите партньори, доброволци и дарители в електронната си пощенска кутия. Ако ти звучи добре, запиши се, като въведеш email адреса си тук:"
},
"support-us-section": {
"heading": "Подкрепете ни като:",
"financial-support": "- дарител",
Expand Down
6 changes: 4 additions & 2 deletions public/locales/bg/notifications.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"subscribe": {
"thank-you-msg": "Абонирането за получаване на известия e успешно! Благодарим ❤️",
"subscription-fail": "Възникна проблем при потвърджаването на абонамента за известия 🙄",
"thank-you-msg-heading": "Абонаментът ти е активен!",
"thank-you-msg-text": "Успешно активира своя абонамент. Очаквай новини от нас на {{email}}",
"subscription-fail-heading": "Възникна грешка",
"subscription-fail-text": "Не успяхме да активираме абонамента ти. Моля, опитай пак.",
"cta": "Към сайта",
"cta-retry": "Опитай пак"
},
Expand Down
1 change: 0 additions & 1 deletion public/locales/bg/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"refund": "възстановено",
"cancelled": "отменено",
"guaranteed": "гарантирано"

}
},
"certificates-history": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/bg/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"agree-terms": "Съгласявам се с Общите условия",
"agree-with": "Съгласявам се с",
"agree-with-newsletter": "Съгласявам се да получавам известия ",
"agree-with-newsletter-campaign": "Съгласявам се да получавам новини за тази кампания и известия от Подкрепи.бг *",
"informed-agree-with": "Запознат съм и се съгласявам с",
"terms-and-conditions": "общите условия",
"gdpr": "политиката за защита на личните данни",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
},
"cta": {
"login": "Login",
"guest": "As guest",
"logout": "Logout",
"register": "Register",
"send": "Send",
"reset": "Reset"
},
"fields": {
"email": "Email",
"email-descriptive": "Fill in your email",
"password": "Password",
"confirm-password": "Confirm Password",
"first-name": "First name",
Expand Down
22 changes: 22 additions & 0 deletions public/locales/en/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@
"save": "Save",
"submit": "Submit",
"apply": "Apply",
"subscribe": "Subscribe for email notifications for the campaign",
"subscribeFooter": "Subscribe for the newsletter",
"subscribeGeneral": "Subscribe for email notifications from Podkrepi.bg",
"subscribe-monthly-newsletter": "Monthly newsletter of Podkrepi.bg",
"subscribeGeneralSubtext": "Receive our monthly newsletter which will inform you about the most interesting news from Podkrepi.bg!!",
"subscribe-general-monthly-newsletter": "Receive our monthly newsletter so that you are aware of the most interesting news from Podkrepi.bg!",
"subscribeGeneralButton": "Subscribe for news",
"subscribe-general-newsletter-button": "Subscribe",
"support": "Donate",
"support-cause-today": "Support a campaign today!",
"support-now": "Support now",
Expand All @@ -93,6 +101,20 @@
"attached-files": "Attached files",
"download": "Download"
},
"subscribe": {
"confirm-sent": "Please, <bold>activate</bold> your subscription from the email that we sent to {{email}}",
"confirm-subscribe": "You subscribed successfully",
"subscribe-title": "Subscribe for news from Podkrepi.bg",
"subscribe-campaign-title": "Subscribe for news about the campaign",
"subscribe-text-nonLoggedUser": "Please, proceed as a guest and write down your email, on which you want to receive notifications for this campaign or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile",
"subscribe-text-nonLoggedUser-general": "Please, proceed as a guest and write down your email, on which you want to receive notifications from us or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile",
"subscribe-text-loggedUser": "Please, choose if you want to receive the news about the campaign on your profile email or on another one:",
"subscribe-subtitle": "I want to receive news and notifications from Podkrepi.bg on this email:",
"subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:",
"subscribe-button": "Subscribe me",
"profile-button": "On the profile one",
"another-button": "On another one"
},
"campaign": {
"subheading": "Your support for the world matters. All supporters through Podkrepi.bg are our partners in supporting the community campaign. As a generous benefactor, you become an important partner in supporting a campaign regarding someone's health or the success of a cause that is close to your heart.",
"subheading-bold": "Even the slightest help can be the engine of great change",
Expand Down
4 changes: 4 additions & 0 deletions public/locales/en/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"content": "Podkrepi.bg is a community of specialists in the field of programming, law, marketing, design, medicine, finance, social entrepreneurship and others. We are united by the goal of creating a sustainable and transparent donation platform that supports causes and people in need, while promoting and restoring trust in donations in Bulgaria.",
"meet-our-team": "Meet our team"
},
"subscription-section": {
"heading": "You want to know about our future achievements?",
"content": "Subscribe for our newsletter we will infrom you about the most important from the life of Podkrepi.bg. Every month you will receive email from us in which we will share with you the most important things about the campaigns that we have and their organizers and beneficiaries. You will receive news for our partners, volunteers and donors in your email box. If this sounds good for you, subscribe as you fill in your email here:"
},
"support-us-section": {
"heading": "Support us as:",
"financial-support": "- a benefactor",
Expand Down
16 changes: 16 additions & 0 deletions public/locales/en/notifications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"subscribe": {
"thank-you-msg-heading": "Your subscription is active!",
"thank-you-msg-text": "You successfully activated your subscription. You can wait news from us on {{email}}",
"subscription-fail-heading": "An error occurred",
"subscription-fail-text": "We couldn`t activate your subscription. Please, try again.",
"cta": "To the site",
"cta-retry": "Try again"
},
"unsubscribe": {
"thank-you-msg": "You successfully deactivated your news subscription!",
"subscription-fail": "An error occurred while deactivating your news subscription",
"cta": "To the site",
"cta-retry": "Try again"
}
}
2 changes: 2 additions & 0 deletions public/locales/en/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"agree-terms": "Agree to the Terms and Conditions",
"agree-with": "I agree to the",
"informed-agree-with": "I understand and I agree to the",
"agree-with-newsletter": "I agree to receive news",
"agree-with-newsletter-campaign": "I agree to receive news about this campaign and news by Podkrepi.bg *",
"terms-and-conditions": "Terms and Conditions",
"gdpr": "General Data Protection Regulation (GDPR)",
"legal-entity": "Legal entity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import PasswordField from 'components/common/form/PasswordField'
import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField'
import AcceptTermsField from 'components/common/form/AcceptTermsField'
import EmailField from 'components/common/form/EmailField'
import AcceptNewsLetterField from 'components/common/form/AcceptNewsletterField'
import { AcceptNewsLetterField } from 'components/common/form/AcceptNewsletterField'

import { AccountType } from 'gql/user-registration'
import { validateEIK13, validateEIK9 } from 'components/common/validations/EIKValidator'
Expand Down
2 changes: 1 addition & 1 deletion src/components/client/auth/register/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import PasswordField from 'components/common/form/PasswordField'
import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField'
import AcceptTermsField from 'components/common/form/AcceptTermsField'
import EmailField from 'components/common/form/EmailField'
import AcceptNewsLetterField from 'components/common/form/AcceptNewsletterField'
import { AcceptNewsLetterField } from 'components/common/form/AcceptNewsletterField'

import { AccountType } from 'gql/user-registration'
import { IndividualRegisterFormData } from 'gql/user-registration'
Expand Down
49 changes: 47 additions & 2 deletions src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'

import { useTranslation } from 'next-i18next'
import dynamic from 'next/dynamic'
Expand Down Expand Up @@ -26,6 +26,8 @@ import { routes } from 'common/routes'
import { useCanEditCampaign } from 'common/hooks/campaigns'
import { moneyPublic } from 'common/util/money'
import CampaignPublicExpensesChart from './CampaignPublicExpensesChart'
import EmailIcon from '@mui/icons-material/Email'
import RenderCampaignSubscribeModal from '../notifications/CampaignSubscribeModal'

const ReactQuill = dynamic(() => import('react-quill'), { ssr: false })
const CampaignNewsSection = dynamic(() => import('./CampaignNewsSection'), { ssr: false })
Expand All @@ -37,6 +39,7 @@ const classes = {
campaignTitle: `${PREFIX}-campaignTitle`,
linkButton: `${PREFIX}-linkButton`,
securityIcon: `${PREFIX}-securityIcon`,
subscribeLink: `${PREFIX}-subscribe`,
financeSummary: `${PREFIX}-financeSummary`,
}

Expand Down Expand Up @@ -93,7 +96,18 @@ const StyledGrid = styled(Grid)(({ theme }) => ({
width: theme.spacing(2.25),
height: theme.spacing(2.75),
},
[`& .${classes.subscribeLink}`]: {
fontWeight: 500,
fontSize: theme.typography.pxToRem(16.5),
textAlign: 'center',

'&:hover': {
textDecoration: 'underline',
transform: 'scale(1.01)',
cursor: 'pointer',
transition: 'all 0.3s ease',
},
},
[`& .${classes.financeSummary}`]: {
fontSize: `1.2rem`,
[theme.breakpoints.up('sm')]: {
Expand All @@ -109,6 +123,7 @@ type Props = {

export default function CampaignDetails({ campaign }: Props) {
const { t } = useTranslation()
const [subscribeIsOpen, setSubscribeOpen] = useState(false)
const sliderImages = campaignSliderUrls(campaign)
const canEditCampaign = useCanEditCampaign(campaign.slug)
const { data: expensesList } = useCampaignApprovedExpensesList(campaign.slug)
Expand All @@ -124,7 +139,22 @@ export default function CampaignDetails({ campaign }: Props) {
showExpensesLink={(expensesList && expensesList?.length > 0) || canEditCampaign}
/>
<Grid container spacing={8}>
<Grid item xs={12}>
{subscribeIsOpen && (
<RenderCampaignSubscribeModal setOpen={setSubscribeOpen} campaign={campaign} />
)}
<Grid item xs={12} display="flex" sx={{ mt: 1.5 }}>
<EmailIcon
color="primary"
fontSize="small"
sx={{ mr: 0.5 }}
onClick={() => setSubscribeOpen(true)}
cursor="pointer"
/>
<Typography onClick={() => setSubscribeOpen(true)} className={classes.subscribeLink}>
{t('campaigns:cta.subscribe')}
</Typography>
</Grid>
<Grid item xs={12} style={{ paddingTop: '20px' }}>
<ReactQuill readOnly theme="bubble" value={campaign.description} />
</Grid>
<Grid item xs={12}>
Expand Down Expand Up @@ -172,6 +202,21 @@ export default function CampaignDetails({ campaign }: Props) {
)}
</Grid>
<CampaignNewsSection campaign={campaign} canCreateArticle={canEditCampaign} />
{subscribeIsOpen && (
<RenderCampaignSubscribeModal setOpen={setSubscribeOpen} campaign={campaign} />
)}
<Grid item xs={12} display="flex" mt={2} mb={2}>
<EmailIcon
color="primary"
fontSize="small"
sx={{ mr: 0.5 }}
onClick={() => setSubscribeOpen(true)}
cursor="pointer"
/>
<Typography onClick={() => setSubscribeOpen(true)} className={classes.subscribeLink}>
{t('campaigns:cta.subscribe')}
</Typography>
</Grid>
<Grid item xs={12} id="wishes">
<DonationWishes campaignId={campaign?.id} />
</Grid>
Expand Down
Loading

0 comments on commit f37755e

Please sign in to comment.