From fa6c08849765a0f1f3a433f05e2a9b84413806d0 Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Thu, 14 Mar 2024 23:55:56 +0200 Subject: [PATCH] admin/donations: Add payment related fields to donation section (#1736) * 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 --- src/components/admin/payments/grid/Grid.tsx | 32 +++++++++---------- .../admin/payments/grid/GridFilters.tsx | 6 ---- src/gql/campaigns.ts | 7 ++-- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/components/admin/payments/grid/Grid.tsx b/src/components/admin/payments/grid/Grid.tsx index b844e2a8f..35fd0e982 100644 --- a/src/components/admin/payments/grid/Grid.tsx +++ b/src/components/admin/payments/grid/Grid.tsx @@ -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) }, @@ -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'), @@ -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 брой'), diff --git a/src/components/admin/payments/grid/GridFilters.tsx b/src/components/admin/payments/grid/GridFilters.tsx index 765bff1c1..8e6f4e64d 100644 --- a/src/components/admin/payments/grid/GridFilters.tsx +++ b/src/components/admin/payments/grid/GridFilters.tsx @@ -90,12 +90,6 @@ export default observer(function GridFilters() { onChange={handleChange} menuItems={donationStatusMenuItems} /> -