forked from podkrepi-bg/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1/2] Affiliate program Integration v1 (podkrepi-bg#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 <[email protected]> * eslint: Resolve errors
- Loading branch information
1 parent
6ee38ae
commit e4b8d31
Showing
52 changed files
with
1,678 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.