diff --git a/webclient/src/AdminTransactions.js b/webclient/src/AdminTransactions.js index 7001a98..df8f528 100644 --- a/webclient/src/AdminTransactions.js +++ b/webclient/src/AdminTransactions.js @@ -43,16 +43,23 @@ export function AdminReportedTransactions(props) { }; let transactionsCache = false; +let excludePayPalCache = false; export function AdminHistoricalTransactions(props) { const { token, user } = props; const [input, setInput] = useState({ month: moment() }); const [transactions, setTransactions] = useState(transactionsCache); + const [excludePayPal, setExcludePayPal] = useState(excludePayPalCache); const [loading, setLoading] = useState(false); const [error, setError] = useState(false); const handleDatetime = (v) => setInput({ ...input, month: v }); + const handleExcludePayPal = (e, v) => { + setExcludePayPal(v.checked); + excludePayPalCache = v.checked; + }; + const handleSubmit = (e) => { if (loading) return; setLoading(true); @@ -97,7 +104,14 @@ export function AdminHistoricalTransactions(props) { {!!transactions.length && {moment(transactions[0].date, 'YYYY-MM-DD').format('MMMM YYYY')} Transactions } - + + + + !excludePayPal || x.account_type !== 'PayPal')} /> : Error loading transactions.
Error loading transactions.