Skip to content

Commit

Permalink
Improve transactions view
Browse files Browse the repository at this point in the history
Remove output of objects without specific properties
`{{transaction.receivedProduct}}` and `{{transaction.newOwner}}`, which
showed up in output as `<(unknown):ember107>`.
  • Loading branch information
peternowee committed Aug 3, 2023
1 parent 702f004 commit 0183114
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions app/templates/transactions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
<ul>
<li>Datetime: {{transaction.datetime}}</li>
<li>New owner:<br />
{{transaction.newOwner}}<br />
{{transaction.newOwner.id}}<br />
{{transaction.newOwner.name}}
</li>
{{transaction.newOwner.name}} <small>{{transaction.newOwner.id}}</small>
</li>
<li>Received product:<br />
{{transaction.receivedProduct}}<br />
{{transaction.receivedProduct.id}}<br />
{{transaction.receivedProduct.serialNumber}}<br />
{{transaction.receivedProduct.name}}
Serial number: {{transaction.receivedProduct.serialNumber}}<br />
Product name: {{transaction.receivedProduct.name}}<br />
ID: <small>{{transaction.receivedProduct.id}}</small>
</li>
</ul>
<button type="button" {{on "click" (fn this.removeTransaction transaction)}}>Remove</button>
Expand Down

0 comments on commit 0183114

Please sign in to comment.