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

Add check to refund stripe donations only #1648

Merged
merged 3 commits into from
Nov 6, 2023
Merged
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
4 changes: 3 additions & 1 deletion src/components/admin/donations/grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { useStores } from '../../../../common/hooks/useStores'
import RenderEditBillingEmailCell from './RenderEditBillingEmailCell'
import RestoreIcon from '@mui/icons-material/Restore'
import RefundModal from '../modals/RefundModal'
import { DonationStatus, PaymentProvider } from '../../../../gql/donations.enums'

interface RenderCellProps {
params: GridRenderCellParams
Expand Down Expand Up @@ -154,7 +155,8 @@ export default observer(function Grid() {
width: 120,
resizable: false,
renderCell: (params: GridRenderCellParams) => {
return params.row?.status === 'succeeded' ? (
return params.row?.status === DonationStatus.succeeded &&
params.row?.provider === PaymentProvider.stripe ? (
<>
<Tooltip title={t('donations:refund.icon')}>
<IconButton
Expand Down
Loading