Merge branch 'master' into clostridium
* master: Use API sort order for species
This commit is contained in:
commit
d6d9c92ef6
3 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,7 @@ const { Component, computed: { sort } } = Ember;
|
||||||
export default Component.extend(SetupMetaData, {
|
export default Component.extend(SetupMetaData, {
|
||||||
species: null,
|
species: null,
|
||||||
|
|
||||||
sortParams: ['speciesName', 'strainCount'],
|
sortParams: ['sortOrder'],
|
||||||
sortedSpecies: sort('species', 'sortParams'),
|
sortedSpecies: sort('species', 'sortParams'),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import SetupMetaData from '../../../../mixins/setup-metadata';
|
import SetupMetaData from '../../../../mixins/setup-metadata';
|
||||||
|
|
||||||
const { Component } = Ember;
|
const { Component, computed: { sort } } = Ember;
|
||||||
|
|
||||||
export default Component.extend(SetupMetaData, {
|
export default Component.extend(SetupMetaData, {
|
||||||
// Read-only attributes
|
// Read-only attributes
|
||||||
|
@ -19,6 +19,10 @@ export default Component.extend(SetupMetaData, {
|
||||||
"save-measurement": null,
|
"save-measurement": null,
|
||||||
"delete-measurement": null,
|
"delete-measurement": null,
|
||||||
|
|
||||||
|
// CPs
|
||||||
|
sortParams: ['sortOrder'],
|
||||||
|
sortedSpeciesList: sort('speciesList', 'sortParams'),
|
||||||
|
|
||||||
// Property mapping
|
// Property mapping
|
||||||
propertiesList: ['strainName', 'typeStrain', 'species', 'isolatedFrom', 'accessionNumbers', 'genbank', 'wholeGenomeSequence', 'notes'],
|
propertiesList: ['strainName', 'typeStrain', 'species', 'isolatedFrom', 'accessionNumbers', 'genbank', 'wholeGenomeSequence', 'notes'],
|
||||||
strainName: null,
|
strainName: null,
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<label>Species</label>
|
<label>Species</label>
|
||||||
{{
|
{{
|
||||||
x-select
|
x-select
|
||||||
options=speciesList
|
options=sortedSpeciesList
|
||||||
nameAttr='speciesName'
|
nameAttr='speciesName'
|
||||||
selected=species.id
|
selected=species.id
|
||||||
update=(action "speciesDidChange")
|
update=(action "speciesDidChange")
|
||||||
|
|
Reference in a new issue