Skip to content

Commit

Permalink
admin/payments: Fix provider filter (#1739)
Browse files Browse the repository at this point in the history
* admin/payments: Fix provider filter
In mobx the field is declared paymentProvider, rather than just provider, which results in undefined value

* admin/donations:Add pre-migration GridAppbar layout
With search button being centered
  • Loading branch information
sashko9807 authored Mar 16, 2024
1 parent 9f0ec34 commit 64de9b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/admin/donations/grid/GridAppbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from 'next/router'
import { useTranslation } from 'next-i18next'
import { Box, Button, TextField, Toolbar, Tooltip } from '@mui/material'
import { Box, Button, TextField, Toolbar, Tooltip, Typography } from '@mui/material'
import { Receipt, GetApp as DownloadFileIcon } from '@mui/icons-material'

import { routes } from 'common/routes'
Expand Down Expand Up @@ -63,6 +63,9 @@ export default function GridAppbar() {
justifyContent: 'space-between',
height: '72px',
}}>
<Box sx={{ height: '64px', display: 'flex', alignItems: 'start', pt: 1 }}>
<Typography>{t('donations:all')}</Typography>
</Box>
<TextField
label="Search"
type="search"
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/donations/grid/GridFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default observer(function GridFilters() {
menuItems={donationStatusMenuItems}
/>
<Filter
value={donationStore.donationFilters.provider}
value={donationStore.donationFilters.paymentProvider}
options={paymentProviderOptions}
onChange={handleChange}
menuItems={paymentProviderMenuItems}
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/payments/grid/GridFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default observer(function GridFilters() {
menuItems={donationStatusMenuItems}
/>
<Filter
value={donationStore.donationFilters.provider}
value={donationStore.donationFilters.paymentProvider}
options={paymentProviderOptions}
onChange={handleChange}
menuItems={paymentProviderMenuItems}
Expand Down

0 comments on commit 64de9b4

Please sign in to comment.