Show amountSats as title of expense item amounts
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<span class="date">{{fmt-date-localized expense.date}}:</span>
|
||||
<span class="title">{{expense.title}}</span>
|
||||
</h4>
|
||||
<div class="amount">
|
||||
<div class="amount" title="{{fmt-amount-sats-title expense.amountSats}}">
|
||||
{{fmt-fiat-currency expense.amount expense.currency}}
|
||||
</div>
|
||||
<p class="description">
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { helper } from '@ember/component/helper';
|
||||
|
||||
export default helper(function fmtAmountSatsTitle(params) {
|
||||
const amountSats = params[0];
|
||||
|
||||
if (typeof amountSats === 'number' && amountSats > 0) {
|
||||
return `${amountSats} sats`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user