Characteristics details
This commit is contained in:
parent
ceccf6e536
commit
fb296340c3
9 changed files with 48 additions and 53 deletions
|
@ -0,0 +1,16 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
measurementsTable: function() {
|
||||
let measurements = this.get('model.measurements');
|
||||
let table = [];
|
||||
measurements.forEach((measurement) => {
|
||||
let row = {};
|
||||
row['measurement'] = measurement;
|
||||
row['strain'] = this.store.peekRecord('strain', measurement.get('strain.id'));
|
||||
table.push(row);
|
||||
});
|
||||
return table;
|
||||
}.property(),
|
||||
|
||||
});
|
|
@ -0,0 +1,26 @@
|
|||
<table class="flakes-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Strain</th>
|
||||
<th>Value</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each measurementsTable as |row|}}
|
||||
<tr>
|
||||
<td>
|
||||
{{#link-to 'protected.strains.show' row.strain.id}}
|
||||
{{{row.strain.strainNameMU}}}
|
||||
{{/link-to}}
|
||||
</td>
|
||||
<td>
|
||||
{{row.measurement.value}}
|
||||
</td>
|
||||
<td>
|
||||
{{row.measurement.notes}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
Reference in a new issue