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

admin/donations: Add payment related fields to donation section #1736

Merged
Merged
Show file tree
Hide file tree
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
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
Loading