-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the user to create recurring donations per campaign (#1243)
* Recurring donations Implementation: 1. Add a checkbox for the user to choose whether it needs to be a subscrition or one time donation. 2. Add the recurring donations in the user's profile along with the option to cancel them. 3. Add the recurring donations in the admin profile. 4. Hide the anonymous donation option for subscriptions. Otherwise the user cannot cancel them. * Add some help steps for ubuntu users during the first time install. * Allow for later login. We might not be currently logged in, but if a recurring donation is selected, we will force the user to login on step 2. * Use a proper mui confirmation dialog when we want to cancel a recurring donation. * Review fixes: 1. Fix problems around editing and creating recurring donations via the admin panel. Campaign select needs to have the current campaing assigned. 2. Don't use hard-coded paths, use routes instead. 3. Fix the typescript type issues. 4. Remove leftovers of debug information. 5. Remove vaultId, as it was duplicated from sourceVault. * Fix typescript compilation errors. Remove a incorrect comma. * Fix a 'prettier' problem in the frontent. Make the code more readable. * Improve the donation playwright tests, by waiting for the clicks.
- Loading branch information
Showing
41 changed files
with
576 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,18 @@ | |
|
||
## Initial setup | ||
|
||
# for Ubuntu users: | ||
|
||
# make sure cmdtest is not installed, it has a different yarn command | ||
|
||
# for installing node.js: https://github.com/nodesource/distributions | ||
|
||
# if you have newer node version, you can use this to downgrade: | ||
|
||
# > sudo npm install -g n | ||
|
||
# > sudo n stable | ||
|
||
```shell | ||
git clone [email protected]:podkrepi-bg/frontend.git | ||
cd frontend | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ test.describe('anonymous user card donation flow', () => { | |
await page.locator('input[name="cardIncludeFees"]').check() | ||
await page.locator('button:has-text("Напред")').click() | ||
|
||
page.locator('text=Дарете анонимно').click() | ||
await page.locator('text=Дарете анонимно').click() | ||
await page.locator('button:has-text("Напред")').click() | ||
|
||
await page.fill('textarea', 'е2е_tester') | ||
|
@@ -39,7 +39,7 @@ test.describe('anonymous user card donation flow', () => { | |
await expect(page.locator('text=BGN 5.00')).toBeDefined() | ||
await page.locator('input[name="email"]').fill('[email protected]') | ||
await page.locator('input[name="cardNumber"]').fill('4242424242424242') | ||
await page.locator('input[name="cardExpiry"]').fill('0424') | ||
await page.locator('input[name="cardExpiry"]').fill('04 / 24') | ||
await page.locator('input[name="cardCvc"]').fill('123') | ||
await page.locator('input[name="billingName"]').fill('John Doe') | ||
await page.locator('select[name="billingCountry"]').selectOption('BG') | ||
|
@@ -62,7 +62,7 @@ test.describe('anonymous user card donation flow', () => { | |
await page.locator('input[name="cardIncludeFees"]').check() | ||
await page.locator('button:has-text("Напред")').click() | ||
|
||
page.locator('text=Дарете анонимно').click() | ||
await page.locator('text=Дарете анонимно').click() | ||
await page.locator('button:has-text("Напред")').click() | ||
|
||
await page.fill('textarea', 'е2е_tester') | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"form-heading": "Add", | ||
"edit-form-heading": "Edit", | ||
"recurring-donations": "All recurring donations", | ||
"recurring-donation": "Recurring donations", | ||
"extSubscriptionId": "External subscription ID", | ||
"extCustomerId": "External customer ID", | ||
"campaign": "Campaign", | ||
"currency": "Currency", | ||
"amount": "Amount", | ||
"status": "Status", | ||
"startDate": "Start date", | ||
"personId": "Person ID", | ||
"person": "Person", | ||
"vaultId": "Vault ID", | ||
"vault": "Vault", | ||
"deleteTitle": "Are you sure?", | ||
"deleteContent": "Are you sure you want to delete this recurring donation?", | ||
"actions": "Actions", | ||
"alerts": { | ||
"create": "Recurring donation created successfully", | ||
"edit": "Recurring donation edited successfully", | ||
"delete": "Recurring donation deleted successfully", | ||
"cancel": "Recurring donation cancelled successfully", | ||
"error": "Error while processing your request. Please try again later." | ||
}, | ||
"statuses": { | ||
"active": "Active", | ||
"incomplete": "Incomplete", | ||
"incompleteExpired": "Expired", | ||
"pastDue": "Past due", | ||
"canceled": "Canceled", | ||
"trailing": "Trailing", | ||
"unpaid": "Unpaid" | ||
}, | ||
"cta": { | ||
"add": "Add", | ||
"confirm": "Confirm", | ||
"cancel": "Cancel", | ||
"delete": "Delete", | ||
"edit": "Edit", | ||
"details": "Details", | ||
"submit": "Submit" | ||
} | ||
} |
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.