Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/TransactionLog.vue
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | export default { | ||||
list.append($('<li>').text(this.description(elem))) | list.append($('<li>').text(this.description(elem))) | ||||
}) | }) | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
this.$root.removeLoader(cell) | this.$root.removeLoader(cell) | ||||
}) | }) | ||||
}, | }, | ||||
amount(transaction) { | amount(transaction) { | ||||
return this.$root.price(transaction.amount) | return this.$root.price(transaction.amount, transaction.currency) | ||||
}, | }, | ||||
className(transaction) { | className(transaction) { | ||||
return transaction.amount < 0 ? 'text-danger' : 'text-success'; | return transaction.amount < 0 ? 'text-danger' : 'text-success'; | ||||
}, | }, | ||||
description(transaction) { | description(transaction) { | ||||
let desc = transaction.description | let desc = transaction.description | ||||
if (/^(billed|created|deleted)$/.test(transaction.type)) { | if (/^(billed|created|deleted)$/.test(transaction.type)) { | ||||
desc += ' (' + this.$root.price(transaction.amount) + ')' | desc += ' (' + this.$root.price(transaction.amount) + ')' | ||||
} | } | ||||
return desc | return desc | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |