Skip to content
Snippets Groups Projects
Commit 6d02b116 authored by meskio's avatar meskio :tent:
Browse files

Add color to the transaction list depending if is ingres or egress

parent b663177c
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,17 @@ const columns = [
{dataField: 'total', text: 'Cantidad', formatter: cell => printMoney(cell)+""},
]
function rowStyle(row) {
if (["purchase"].includes(row.type)) {
return {
backgroundColor: "#fcbabf"
};
}
return {
backgroundColor: "#c4fcba"
};
}
function TransactionList() {
const [transactions, setTransactions] = useState([]);
const [clickID, setClicID] = useState(null);
......@@ -36,6 +47,7 @@ function TransactionList() {
rowEvents={{
onClick: (_, row) => setClicID(row.ID)
}}
rowStyle={rowStyle}
classes="stripped"
bordered={ false }
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment