show summary on tx history

This commit is contained in:
Sebastian 2022-09-01 09:20:59 -03:00
parent 5e7812d63e
commit 91d5d55edc
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
2 changed files with 16 additions and 6 deletions

View File

@ -119,7 +119,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
id={tx.transactionId} id={tx.transactionId}
amount={tx.amountEffective} amount={tx.amountEffective}
debitCreditIndicator={"credit"} debitCreditIndicator={"credit"}
title={"Invoice credit"} title={tx.info.summary || "Invoice"}
timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
iconPath={"I"} iconPath={"I"}
pending={tx.pending} pending={tx.pending}
@ -131,7 +131,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
id={tx.transactionId} id={tx.transactionId}
amount={tx.amountEffective} amount={tx.amountEffective}
debitCreditIndicator={"debit"} debitCreditIndicator={"debit"}
title={"Invoice debit"} title={tx.info.summary || "Invoice"}
timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
iconPath={"I"} iconPath={"I"}
pending={tx.pending} pending={tx.pending}
@ -143,7 +143,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
id={tx.transactionId} id={tx.transactionId}
amount={tx.amountEffective} amount={tx.amountEffective}
debitCreditIndicator={"credit"} debitCreditIndicator={"credit"}
title={"Transfer credit"} title={tx.info.summary || "Transfer"}
timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
iconPath={"T"} iconPath={"T"}
pending={tx.pending} pending={tx.pending}
@ -155,7 +155,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
id={tx.transactionId} id={tx.transactionId}
amount={tx.amountEffective} amount={tx.amountEffective}
debitCreditIndicator={"debit"} debitCreditIndicator={"debit"}
title={"Transfer debit"} title={tx.info.summary || "Transfer"}
timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
iconPath={"T"} iconPath={"T"}
pending={tx.pending} pending={tx.pending}

View File

@ -125,7 +125,9 @@ const exampleData = {
push_credit: { push_credit: {
...commonTransaction(), ...commonTransaction(),
type: TransactionType.PeerPushCredit, type: TransactionType.PeerPushCredit,
info: {
summary: "take this cash",
},
exchangeBaseUrl: "https://exchange.taler.net", exchangeBaseUrl: "https://exchange.taler.net",
} as TransactionPeerPushCredit, } as TransactionPeerPushCredit,
push_debit: { push_debit: {
@ -133,6 +135,9 @@ const exampleData = {
type: TransactionType.PeerPushDebit, type: TransactionType.PeerPushDebit,
talerUri: talerUri:
"taler://pay-push/exchange.taler.ar/HS585JK0QCXHJ8Z8QWZA3EBAY5WY7XNC1RR2MHJXSH2Z4WP0YPJ0", "taler://pay-push/exchange.taler.ar/HS585JK0QCXHJ8Z8QWZA3EBAY5WY7XNC1RR2MHJXSH2Z4WP0YPJ0",
info: {
summary: "take this cash",
},
exchangeBaseUrl: "https://exchange.taler.net", exchangeBaseUrl: "https://exchange.taler.net",
} as TransactionPeerPushDebit, } as TransactionPeerPushDebit,
pull_credit: { pull_credit: {
@ -140,12 +145,17 @@ const exampleData = {
type: TransactionType.PeerPullCredit, type: TransactionType.PeerPullCredit,
talerUri: talerUri:
"taler://pay-push/exchange.taler.ar/HS585JK0QCXHJ8Z8QWZA3EBAY5WY7XNC1RR2MHJXSH2Z4WP0YPJ0", "taler://pay-push/exchange.taler.ar/HS585JK0QCXHJ8Z8QWZA3EBAY5WY7XNC1RR2MHJXSH2Z4WP0YPJ0",
info: {
summary: "pay me",
},
exchangeBaseUrl: "https://exchange.taler.net", exchangeBaseUrl: "https://exchange.taler.net",
} as TransactionPeerPullCredit, } as TransactionPeerPullCredit,
pull_debit: { pull_debit: {
...commonTransaction(), ...commonTransaction(),
type: TransactionType.PeerPullDebit, type: TransactionType.PeerPullDebit,
info: {
summary: "pay me",
},
exchangeBaseUrl: "https://exchange.taler.net", exchangeBaseUrl: "https://exchange.taler.net",
} as TransactionPeerPullDebit, } as TransactionPeerPullDebit,
}; };