Create exchange rate service , use CORS proxy for requests
This commit is contained in:
@@ -10,6 +10,7 @@ import isValidAmount from 'kredits-web/utils/is-valid-amount';
|
||||
|
||||
export default class AddReimbursementComponent extends Component {
|
||||
@service kredits;
|
||||
@service exchangeRates;
|
||||
|
||||
@alias('kredits.contributorsSorted') contributors;
|
||||
|
||||
@@ -19,6 +20,11 @@ export default class AddReimbursementComponent extends Component {
|
||||
@tracked expenses = A([]);
|
||||
@tracked expenseFormVisible = true;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.exchangeRates.fetchRates();
|
||||
}
|
||||
|
||||
get isValidTotal () {
|
||||
return isValidAmount(this.total);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<p>
|
||||
{{this.exchangeRates.btceur}}, {{this.exchangeRates.btcusd}}
|
||||
</p>
|
||||
<form onsubmit={{action "submit"}} novalidate>
|
||||
<label>
|
||||
<p class="label">Contributor:</p>
|
||||
|
||||
Reference in New Issue
Block a user