Skip to content

Commit

Permalink
fix: Resolve not being able to edit payment or donation data (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 authored Apr 24, 2024
1 parent 0359272 commit cdfc431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit cdfc431

Please sign in to comment.