Octanify add-reimbursement syntax
Fixes linter errors
This commit is contained in:
@@ -84,6 +84,11 @@ export default class AddReimbursementComponent extends Component {
|
|||||||
this.total = btcAmount.toFixed(8);
|
this.total = btcAmount.toFixed(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@action
|
||||||
|
updateContributor(event) {
|
||||||
|
this.contributorId = event.target.value;
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
showExpenseForm () {
|
showExpenseForm () {
|
||||||
this.expenseFormVisible = true;
|
this.expenseFormVisible = true;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<form onsubmit={{action "submit"}} novalidate>
|
<form {{on "submit" this.submit}} novalidate>
|
||||||
<label>
|
<label>
|
||||||
<p class="label">Contributor:</p>
|
<p class="label">Contributor:</p>
|
||||||
<p>
|
<p>
|
||||||
<select required onchange={{action (mut this.contributorId) value="target.value"}}>
|
<select required {{on "change" this.updateContributor}}>
|
||||||
<option value="" selected disabled hidden></option>
|
<option value="" selected disabled hidden></option>
|
||||||
{{#each this.contributors as |contributor|}}
|
{{#each this.contributors as |contributor|}}
|
||||||
<option value={{contributor.id}} selected={{eq this.contributorId contributor.id}}>{{contributor.name}}</option>
|
<option value={{contributor.id}} selected={{eq this.contributorId contributor.id}}>{{contributor.name}}</option>
|
||||||
@@ -14,30 +14,30 @@
|
|||||||
<label>
|
<label>
|
||||||
<p class="label">Total amount (WBTC):</p>
|
<p class="label">Total amount (WBTC):</p>
|
||||||
<p>
|
<p>
|
||||||
{{input type="text"
|
<Input @type="text"
|
||||||
placeholder="0.0015"
|
@placeholder="0.0015"
|
||||||
value=this.total
|
@value={{this.total}}
|
||||||
required=true
|
@required={{true}}
|
||||||
pattern="([0-9]*[.])?[0-9]+"
|
@pattern="([0-9]*[.])?[0-9]+"
|
||||||
class=this.totalInputClass}}
|
@class={{this.totalInputClass}} />
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<p class="label">EUR total</p>
|
<p class="label">EUR total</p>
|
||||||
<p>
|
<p>
|
||||||
{{input type="text"
|
<Input @type="text"
|
||||||
name="total-eur"
|
@name="total-eur"
|
||||||
value=this.totalEUR
|
@value={{this.totalEUR}}
|
||||||
disabled=true}}
|
@disabled={{true}} />
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<p class="label">USD total</p>
|
<p class="label">USD total</p>
|
||||||
<p>
|
<p>
|
||||||
{{input type="text"
|
<Input @type="text"
|
||||||
name="total-usd"
|
@name="total-usd"
|
||||||
value=this.totalUSD
|
@value={{this.totalUSD}}
|
||||||
disabled=true}}
|
@disabled={{true}} />
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -58,13 +58,15 @@
|
|||||||
{{fmt-fiat-currency expense.amount expense.currency}}
|
{{fmt-fiat-currency expense.amount expense.currency}}
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button class="danger small" onclick={{fn this.removeExpenseItem expense}}>delete</button>
|
<button {{on "click" (fn this.removeExpenseItem expense)}}
|
||||||
|
class="danger small" type="button">delete</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
<p class="actions">
|
<p class="actions">
|
||||||
<button onclick={{fn this.showExpenseForm}} class="green small">+ Add another item</button>
|
<button {{on "click" this.showExpenseForm}}
|
||||||
|
class="green small" type="button">+ Add another item</button>
|
||||||
</p>
|
</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>No line items yet.</p>
|
<p>No line items yet.</p>
|
||||||
@@ -72,11 +74,11 @@
|
|||||||
|
|
||||||
<p class="actions">
|
<p class="actions">
|
||||||
{{#if this.inProgress}}
|
{{#if this.inProgress}}
|
||||||
{{input type="submit" value="Submitting..." disabled=true
|
<Input @type="submit" @value="Submitting..." @disabled={{true}}
|
||||||
title="Submit/propose this reimbursement"}}
|
@title="Submit/propose this reimbursement" />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{input type="submit" value="Submit" disabled=this.submitButtonDisabled
|
<Input @type="submit" @value="Submit" @disabled={{this.submitButtonDisabled}}
|
||||||
title="Submit/propose this reimbursement"}}
|
@title="Submit/propose this reimbursement" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user