Skip to content

Commit

Permalink
admin/donations: Add payment related fields to donation section (#1736)
Browse files Browse the repository at this point in the history
* admin/donations: Add payment related to donation section
Includes payment data such as provider, billingName, billingEmail

* admin/payments: Remove duplicate filter dropdown

* admin/payments: Reorder payment fields
  • Loading branch information
sashko9807 authored Mar 14, 2024
1 parent 20bb3fc commit fa6c088
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
32 changes: 16 additions & 16 deletions src/components/admin/payments/grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,15 @@ export default observer(function Grid() {
)
},
},
{
field: 'type',
headerName: t('donations:type'),
},
{
field: 'createdAt',
headerName: t('donations:date'),
...commonProps,
width: 250,
width: 200,
renderCell: (params: GridRenderCellParams) => {
return getExactDateTime(params?.row.createdAt)
},
Expand All @@ -177,6 +181,17 @@ export default observer(function Grid() {
field: 'status',
headerName: t('donations:status'),
},
{
field: 'id',
headerName: 'ID',
width: 320,
},
{
field: 'provider',
headerName: t('donations:provider'),
...commonProps,
width: 100,
},
{
field: 'amount',
headerName: t('donations:amount'),
Expand Down Expand Up @@ -210,21 +225,6 @@ export default observer(function Grid() {
)
},
},
{
field: 'id',
headerName: 'ID',
width: 320,
},
{
field: 'type',
headerName: t('donations:type'),
},
{
field: 'provider',
headerName: t('donations:provider'),
...commonProps,
width: 200,
},
{
field: 'donations',
headerName: t('Дарения\n брой'),
Expand Down
6 changes: 0 additions & 6 deletions src/components/admin/payments/grid/GridFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ export default observer(function GridFilters() {
onChange={handleChange}
menuItems={donationStatusMenuItems}
/>
<Filter
value={donationStore.donationFilters.status}
options={donationStatusOptions}
onChange={handleChange}
menuItems={donationStatusMenuItems}
/>
<Filter
value={donationStore.donationFilters.provider}
options={paymentProviderOptions}
Expand Down
7 changes: 2 additions & 5 deletions src/gql/campaigns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CampaignState } from 'components/client/campaigns/helpers/campaign.enum
import { BeneficiaryType } from '../components/admin/beneficiary/BeneficiaryTypes'
import { VaultResponse } from './vault'
import { CampaignNewsResponse } from './campaign-news'
import { TPaymentResponse } from './donations'

export type CampaignType = {
id: UUID
Expand Down Expand Up @@ -178,12 +179,8 @@ export type CampaignUploadImage = {
export type CampaignDonation = {
id: UUID
type: string
status: string
provider: PaymentProvider
payment: TPaymentResponse
targetVaultId: UUID
extCustomerId: UUID
extPaymentIntentId: UUID
extPaymentMethodId: UUID
createdAt: string
updatedAt: string
amount: number
Expand Down

0 comments on commit fa6c088

Please sign in to comment.