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

fix: Resolve not being able to edit payment or donation data #1771

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/admin/donations/grid/RenderEditPersonCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function RenderEditPersonCell({
const [person, setPerson] = React.useState<PersonResponse | null>({
...initialPerson,
} as PersonResponse)
const mutationFn = useEditDonation(params.row.id)
const mutationFn = useEditDonation(params.row.paymentId)

const mutation = useMutation<
AxiosResponse<DonationResponse>,
Expand All @@ -65,6 +65,7 @@ export default function RenderEditPersonCell({
const donationData: UserDonationInput = params.row
donationData.targetPersonId = person.id
donationData.billingEmail = undefined
donationData.donationId = params.row.id
mutation.mutate(donationData)
} else {
AlertStore.show(t('donations:alerts.requiredError'), 'error')
Expand Down
1 change: 1 addition & 0 deletions src/gql/donations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export type DonationInput = {
export type UserDonationInput = DonationInput & {
targetPersonId?: UUID
billingEmail?: string
donationId?: string
}

export type DonationBankInput = {
Expand Down
Loading