Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring donation #708

Merged
merged 65 commits into from
Apr 27, 2022
Merged

Recurring donation #708

merged 65 commits into from
Apr 27, 2022

Conversation

Marina-yoya
Copy link
Contributor

@Marina-yoya Marina-yoya commented Apr 14, 2022

All Recurring Donations
image

Create form
image

Details
image

Comment on lines +68 to +81
if (id) {
id = String(id)
const { data }: UseQueryResult<RecurringDonationResponse> = useRecurringDonation(id)

initialValues = {
status: data?.status,
personId: data?.personId,
extSubscriptionId: data?.extSubscriptionId,
extCustomerId: data?.extCustomerId,
amount: data?.amount,
currency: data?.currency,
sourceVault: data?.sourceVault,
}
}
Copy link
Member

@kachar kachar Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values should be pass from the page

The idea is:

  1. In page file load the initial record fetched by ID
  2. Load the form with the initial records predefined coming down as prop
  3. Work on the data

At the moment CreatePage and EditPage look the same, but they should not.

See as example

https://github.com/podkrepi-bg/frontend/blob/621cb6bb8d1ab4f658effb08ee9e300b8dfc35e8/src/components/campaigns/grid/EditPage.tsx

@dimitur2204
Copy link
Contributor

What about having the fields for the ids be a <Select /> like that.

recurring-donation-select-concept

In my opinion the current one with text fields is very user unfriendly.
However the requests to get all the users and vaults would be expensive !!!

@kachar
Copy link
Member

kachar commented Apr 21, 2022

@dimitur2204 I do agree that we need a better approach for selecting a person.

Let's use the current <PersonSelect /> for this task and fork the topic in another issue so we can do it properly on all locations at once.

It can be done within the PersonSelect component without involving the recurring donations context. It can be realized as a Button that opens a Modal for finding the person you need by typing their name, etc

Copy link
Member

@kachar kachar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Marina-yoya and @dimitur2204 for bringing this functionality to life

@kachar kachar merged commit 2f2df0b into master Apr 27, 2022
@kachar kachar deleted the recurring-donation branch April 27, 2022 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Using selects for fields on recurring donation form Implementing Recurring Donation entity.
4 participants