diff --git a/app/components/add-reimbursement/component.js b/app/components/add-reimbursement/component.js index 79805cf..d151ba7 100644 --- a/app/components/add-reimbursement/component.js +++ b/app/components/add-reimbursement/component.js @@ -1,8 +1,31 @@ - import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { alias } from '@ember/object/computed'; import { inject as service } from '@ember/service'; +import { action } from '@ember/object'; +import { A } from '@ember/array'; export default class AddReimbursementComponent extends Component { @service kredits; + @tracked recipientId = null; + @tracked title = ""; + @tracked total = "0"; + @tracked expenses = A([]);; + + get typeofTotal() { + return typeof this.total; + } + + @alias('kredits.contributorsSorted') contributors; + + @action + submit(e) { + e.preventDefault(); + console.log('submit', e); + // TODO + // amount = parseFloat(this.total) + // token = "WBTC" (or token address) + // title = "Expenses covered by contributor.name" + } } diff --git a/app/components/add-reimbursement/template.hbs b/app/components/add-reimbursement/template.hbs index e69de29..0c64b88 100644 --- a/app/components/add-reimbursement/template.hbs +++ b/app/components/add-reimbursement/template.hbs @@ -0,0 +1,71 @@ +
+ Total: {{this.total}}
+ Total type: {{this.typeofTotal}}
+