From 32e8672be515b015f09f38ca1292057cc16a6ead Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 19 Aug 2021 16:30:47 +0200 Subject: [PATCH] tabs coming along well need to stack the cards --- ui/component/txoList/view.jsx | 93 +++++++++------- .../walletFiatPaymentHistory/view.jsx | 105 +++++++++--------- 2 files changed, 106 insertions(+), 92 deletions(-) diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index a8cc732d1..9c9ce8414 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -13,6 +13,7 @@ import classnames from 'classnames'; import HelpLink from 'component/common/help-link'; import FileExporter from 'component/common/file-exporter'; import WalletFiatPaymentHistory from 'component/walletFiatPaymentHistory'; +import WalletFiatAccountHistory from 'component/walletFiatAccountHistory'; type Props = { search: string, @@ -54,6 +55,7 @@ function TxoList(props: Props) { const subtype = urlParams.get(TXO.SUB_TYPE); const active = urlParams.get(TXO.ACTIVE) || TXO.ALL; const currency = urlParams.get('currency') || 'credits'; + const fiatType = urlParams.get('fiatType') || 'incoming'; const currentUrlParams = { page, @@ -62,6 +64,7 @@ function TxoList(props: Props) { type, subtype, currency, + fiatType, }; const hideStatus = @@ -128,7 +131,10 @@ function TxoList(props: Props) { const newUrlParams = new URLSearchParams(); const existingCurrency = newUrlParams.get('currency') || 'credits'; - console.log(existingCurrency); + + const existingFiatType = newUrlParams.get('fiatType') || 'incoming'; + + console.log(existingFiatType); console.log(newUrlParams); @@ -140,6 +146,12 @@ function TxoList(props: Props) { newUrlParams.set('currency', delta.currency); } + if (delta.fiatType) { + newUrlParams.set('fiatType', delta.fiatType); + } else { + newUrlParams.set('fiatType', existingFiatType); + } + switch (delta.dkey) { case TXO.PAGE: if (currentUrlParams.type) { @@ -363,29 +375,29 @@ function TxoList(props: Props) { :
-
- - {__('Type')} - - - } - value={type || 'all'} - onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab, currency: 'fiat' })} - > - {Object.values(TXO.DROPDOWN_TYPES).map((v) => { - const stringV = String(v); - return ( - - ); - })} - -
+ {/*
*/} + {/* */} + {/* {__('Type')}*/} + {/* */} + {/* */} + {/* }*/} + {/* value={type || 'all'}*/} + {/* onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab, currency: 'fiat' })}*/} + {/* >*/} + {/* {Object.values(TXO.DROPDOWN_TYPES).map((v) => {*/} + {/* const stringV = String(v);*/} + {/* return (*/} + {/* */} + {/* );*/} + {/* })}*/} + {/* */} + {/*
*/} {(type === TXO.SENT || type === TXO.RECEIVED) && (
- +
@@ -442,7 +454,8 @@ function TxoList(props: Props) {
{/* listing of the transactions */} - + { fiatType === 'incoming' && } + { fiatType === 'outgoing' && }
} diff --git a/ui/component/walletFiatPaymentHistory/view.jsx b/ui/component/walletFiatPaymentHistory/view.jsx index 42d0341f3..69bbc49d9 100644 --- a/ui/component/walletFiatPaymentHistory/view.jsx +++ b/ui/component/walletFiatPaymentHistory/view.jsx @@ -52,59 +52,60 @@ const WalletBalance = (props: Props) => { return ( <> - -
- - - - - - - - - - - - - {accountTransactions && - accountTransactions.map((transaction) => ( - - - - - - - +
+ +
+
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Card Last 4')}{__('Anonymous')}
{moment(transaction.created_at).format('LLL')} - - ${transaction.tipped_amount / 100}{lastFour}{transaction.private_tip ? 'Yes' : 'No'}
+ + + + + + + + - ))} - -
{__('Date')}{<>{__('Receiving Channel Name')}}{__('Tip Location')}{__('Amount (USD)')} {__('Card Last 4')}{__('Anonymous')}
- {(!accountTransactions || accountTransactions.length === 0) &&

No Transactions

} -
- - } - /> + + + {accountTransactions && + accountTransactions.map((transaction) => ( + + {moment(transaction.created_at).format('LLL')} + +