diff --git a/new-lamassu-admin/src/components/fake-table/Table.js b/new-lamassu-admin/src/components/fake-table/Table.js index 35154582..b43d5bee 100644 --- a/new-lamassu-admin/src/components/fake-table/Table.js +++ b/new-lamassu-admin/src/components/fake-table/Table.js @@ -79,6 +79,7 @@ const Tr = ({ onClick, error, errorMessage, + shouldShowError, children, className, size, @@ -99,7 +100,9 @@ const Tr = ({
{children}
- {error &&
{errorMessage}
} + {error && shouldShowError && ( +
{errorMessage}
+ )}
diff --git a/new-lamassu-admin/src/components/tables/DataTable.js b/new-lamassu-admin/src/components/tables/DataTable.js index bc5e609e..ec68f3e1 100644 --- a/new-lamassu-admin/src/components/tables/DataTable.js +++ b/new-lamassu-admin/src/components/tables/DataTable.js @@ -28,6 +28,7 @@ const useStyles = makeStyles(styles) const Row = ({ id, + index, elements, data, width, @@ -48,9 +49,11 @@ const Row = ({ [classes.row]: true, [classes.expanded]: expanded } + return (
-
+
+ error={data.error || data.hasError} + shouldShowError={false} + errorMessage={data.errorMessage || data.hasError}> {elements.map(({ view = it => it?.toString(), ...props }, idx) => ( {view(data)} @@ -142,6 +146,7 @@ const DataTable = ({ width={width} size={rowSize} id={data[index].id ? data[index].id : index} + index={index} expWidth={expWidth} elements={elements} data={data[index]} diff --git a/new-lamassu-admin/src/pages/Transactions/Transactions.js b/new-lamassu-admin/src/pages/Transactions/Transactions.js index 1ea2b927..016c8b37 100644 --- a/new-lamassu-admin/src/pages/Transactions/Transactions.js +++ b/new-lamassu-admin/src/pages/Transactions/Transactions.js @@ -15,6 +15,8 @@ import DataTable from 'src/components/tables/DataTable' import { ReactComponent as TxInIcon } from 'src/styling/icons/direction/cash-in.svg' import { ReactComponent as TxOutIcon } from 'src/styling/icons/direction/cash-out.svg' import { ReactComponent as CustomerLinkIcon } from 'src/styling/icons/month arrows/right.svg' +import { ReactComponent as CustomerLinkWhiteIcon } from 'src/styling/icons/month arrows/right_white.svg' +import { errorColor } from 'src/styling/variables' import { formatDate } from 'src/utils/timezones' import DetailsRow from './DetailsCard' @@ -124,13 +126,13 @@ const Transactions = () => { const history = useHistory() const [filters, setFilters] = useState([]) - const { data: filtersResponse, loading: loadingFilters } = useQuery( + const { data: filtersResponse, loading: filtersLoading } = useQuery( GET_TRANSACTION_FILTERS ) const [variables, setVariables] = useState({ limit: NUM_LOG_RESULTS }) const { data: txData, - loading: loadingTransactions, + loading: transactionsLoading, refetch, startPolling, stopPolling @@ -185,7 +187,11 @@ const Transactions = () => {
{getCustomerDisplayName(it)}
{!it.isAnonymous && (
redirect(it.customerId)}> - + {it.hasError ? ( + + ) : ( + + )}
)}
@@ -294,6 +300,14 @@ const Transactions = () => { const filterOptions = R.path(['transactionFilters'])(filtersResponse) + const loading = transactionsLoading || filtersLoading || configLoading + + const errorLabel = ( + + + + ) + return ( <>
@@ -301,7 +315,7 @@ const Transactions = () => { Transactions
{ Cash-out
+
+ {errorLabel} + Transaction error +
{filters.length > 0 && ( @@ -342,7 +360,7 @@ const Transactions = () => { /> )} div': { + marginLeft: 24 + }, '& > div:first-child': { - marginRight: 24 + marginLeft: 0 }, '& span': { extend: label1, diff --git a/new-lamassu-admin/src/styling/icons/month arrows/right_white.svg b/new-lamassu-admin/src/styling/icons/month arrows/right_white.svg new file mode 100644 index 00000000..9d8cae10 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/month arrows/right_white.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file