From cdfc4312984d120e41f95b047e7a144b8f77e2c5 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 24 Apr 2024 16:29:02 +0300 Subject: [PATCH] fix: Resolve not being able to edit payment or donation data (#1771) --- src/components/admin/donations/grid/RenderEditPersonCell.tsx | 3 ++- src/gql/donations.d.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/admin/donations/grid/RenderEditPersonCell.tsx b/src/components/admin/donations/grid/RenderEditPersonCell.tsx index bed0413d9..726fce5f2 100644 --- a/src/components/admin/donations/grid/RenderEditPersonCell.tsx +++ b/src/components/admin/donations/grid/RenderEditPersonCell.tsx @@ -44,7 +44,7 @@ export default function RenderEditPersonCell({ const [person, setPerson] = React.useState({ ...initialPerson, } as PersonResponse) - const mutationFn = useEditDonation(params.row.id) + const mutationFn = useEditDonation(params.row.paymentId) const mutation = useMutation< AxiosResponse, @@ -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') diff --git a/src/gql/donations.d.ts b/src/gql/donations.d.ts index 5a22ad562..4bf58e80e 100644 --- a/src/gql/donations.d.ts +++ b/src/gql/donations.d.ts @@ -100,6 +100,7 @@ export type DonationInput = { export type UserDonationInput = DonationInput & { targetPersonId?: UUID billingEmail?: string + donationId?: string } export type DonationBankInput = {