diff --git a/changelog/add-7591-missing-columns-export-csv b/changelog/add-7591-missing-columns-export-csv new file mode 100644 index 00000000000..668644d2cfc --- /dev/null +++ b/changelog/add-7591-missing-columns-export-csv @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Introduce Customer currency, Deposit currency, Amount in Customer Currency and Deposit ID columns to the Transaction list UI and CSV export diff --git a/changelog/cleanup-redundant-script-enqueueing b/changelog/cleanup-redundant-script-enqueueing new file mode 100644 index 00000000000..20c952d459e --- /dev/null +++ b/changelog/cleanup-redundant-script-enqueueing @@ -0,0 +1,4 @@ +Significance: minor +Type: dev + +Cleanup enqueueing of the scripts which were removed diff --git a/client/transactions/list/index.tsx b/client/transactions/list/index.tsx index 8b66096a60c..931712821a9 100644 --- a/client/transactions/list/index.tsx +++ b/client/transactions/list/index.tsx @@ -144,8 +144,11 @@ const getColumns = ( }, { key: 'date', - label: __( 'Date / Time', 'woocommerce-payments' ), - screenReaderLabel: __( 'Date and time', 'woocommerce-payments' ), + label: __( 'Date / Time (UTC)', 'woocommerce-payments' ), + screenReaderLabel: __( + 'Date and time in UTC', + 'woocommerce-payments' + ), required: true, isLeftAligned: true, defaultOrder: 'desc', @@ -167,10 +170,41 @@ const getColumns = ( required: true, isLeftAligned: true, }, + { + key: 'customer_currency', + label: __( 'Paid Currency', 'woocommerce-payments' ), + screenReaderLabel: __( + 'Customer Currency', + 'woocommerce-payments' + ), + isSortable: true, + visible: false, + }, + { + key: 'customer_amount', + label: __( 'Amount Paid', 'woocommerce-payments' ), + screenReaderLabel: __( + 'Amount in Customer Currency', + 'woocommerce-payments' + ), + isNumeric: true, + isSortable: true, + visible: false, + }, + { + key: 'deposit_currency', + label: __( 'Deposit Currency', 'woocommerce-payments' ), + screenReaderLabel: __( 'Deposit Currency', 'woocommerce-payments' ), + isSortable: true, + visible: false, + }, { key: 'amount', label: __( 'Amount', 'woocommerce-payments' ), - screenReaderLabel: __( 'Amount', 'woocommerce-payments' ), + screenReaderLabel: __( + 'Amount in Deposit Curency', + 'woocommerce-payments' + ), isNumeric: true, isSortable: true, }, @@ -205,8 +239,8 @@ const getColumns = ( }, { key: 'source', - label: __( 'Source', 'woocommerce-payments' ), - screenReaderLabel: __( 'Source', 'woocommerce-payments' ), + label: __( 'Payment Method', 'woocommerce-payments' ), + screenReaderLabel: __( 'Payment Method', 'woocommerce-payments' ), cellClassName: 'is-center-aligned', }, { @@ -236,6 +270,14 @@ const getColumns = ( visible: false, isLeftAligned: true, }, + includeDeposit && { + key: 'deposit_id', + label: __( 'Deposit ID', 'woocommerce-payments' ), + screenReaderLabel: __( 'Deposit ID', 'woocommerce-payments' ), + cellClassName: 'deposit', + isLeftAligned: true, + visible: false, + }, includeDeposit && { key: 'deposit', label: __( 'Deposit date', 'woocommerce-payments' ), @@ -371,6 +413,17 @@ export const TransactionsList = ( ), }; }; + const formatCustomerAmount = () => { + return { + value: formatExportAmount( + txn.customer_amount, + txn.customer_currency + ), + display: clickable( + formatCurrency( txn.customer_amount, txn.customer_currency ) + ), + }; + }; const isFinancingType = -1 !== @@ -464,6 +517,15 @@ export const TransactionsList = ( value: txn.customer_country, display: clickable( txn.customer_country ), }, + customer_currency: { + value: txn.customer_currency.toUpperCase(), + display: clickable( txn.customer_currency.toUpperCase() ), + }, + customer_amount: formatCustomerAmount(), + deposit_currency: { + value: txn.currency.toUpperCase(), + display: clickable( txn.currency.toUpperCase() ), + }, amount: formatAmount(), // fees should display as negative. The format $-9.99 is determined by WC-Admin fees: formatFees(), @@ -477,6 +539,10 @@ export const TransactionsList = ( value: calculateRiskMapping( txn.risk_level ), display: clickable( riskLevel ), }, + deposit_id: { + value: txn.deposit_id, + display: txn.deposit_id, + }, deposit: { value: txn.available_on, display: deposit }, deposit_status: { value: depositStatus, diff --git a/client/transactions/list/test/__snapshots__/index.tsx.snap b/client/transactions/list/test/__snapshots__/index.tsx.snap index 35b86a155f7..c7bfca77b45 100644 --- a/client/transactions/list/test/__snapshots__/index.tsx.snap +++ b/client/transactions/list/test/__snapshots__/index.tsx.snap @@ -248,19 +248,19 @@ exports[`Transactions list renders correctly when can filter by several currenci - Date and time + Date and time in UTC - Sort by Date and time in ascending order + Sort by Date and time in UTC in ascending order