strain whole genome sequence

This commit is contained in:
Matthew Dillon 2015-06-18 12:46:08 -08:00
parent 0a73b347f9
commit 43800d6dd8
3 changed files with 34 additions and 18 deletions

View file

@ -2,22 +2,23 @@ import DS from 'ember-data';
import Ember from 'ember';
export default DS.Model.extend({
measurements : DS.hasMany('measurements', { async: true }),
species : DS.belongsTo('species', { async: true }),
strainName : DS.attr('string'),
typeStrain : DS.attr('boolean'),
accessionNumbers : DS.attr('string'),
genbank : DS.attr('string'),
isolatedFrom : DS.attr('string'),
notes : DS.attr('string'),
createdAt : DS.attr('date'),
updatedAt : DS.attr('date'),
deletedAt : DS.attr('date'),
createdBy : DS.attr('number'),
updatedBy : DS.attr('number'),
deletedBy : DS.attr('number'),
totalMeasurements: DS.attr('number'),
sortOrder : DS.attr('number'),
measurements : DS.hasMany('measurements', { async: true }),
species : DS.belongsTo('species', { async: true }),
strainName : DS.attr('string'),
typeStrain : DS.attr('boolean'),
accessionNumbers : DS.attr('string'),
genbank : DS.attr('string'),
wholeGenomeSequence: DS.attr('string'),
isolatedFrom : DS.attr('string'),
notes : DS.attr('string'),
createdAt : DS.attr('date'),
updatedAt : DS.attr('date'),
deletedAt : DS.attr('date'),
createdBy : DS.attr('number'),
updatedBy : DS.attr('number'),
deletedBy : DS.attr('number'),
totalMeasurements : DS.attr('number'),
sortOrder : DS.attr('number'),
strainNameMU: function() {
let type = this.get('typeStrain') ? '<sup>T</sup>' : '';

View file

@ -5,7 +5,7 @@
{{#if isEditing}}
{{input value=strain.strainName}}
{{else}}
<em>{{strain.strainName}}</em>
{{strain.strainNameMU}}
{{/if}}
{{display-errors a=strain.errors.strainName}}
</legend>
@ -43,7 +43,7 @@
</div>
{{! ROW 2 }}
<div class="grid-4">
<div class="grid-6">
<dl class="span-2">
<dt>Accession Numbers</dt>
<dd>
@ -66,6 +66,17 @@
{{display-errors a=strain.errors.genbank}}
</dd>
</dl>
<dl class="span-2">
<dt>Whole Genome Sequence</dt>
<dd>
{{#if isEditing}}
{{input value=strain.wholeGenomeSequence}}
{{else}}
{{strain.wholeGenomeSequence}}
{{/if}}
{{display-errors a=strain.errors.wholeGenomeSequence}}
</dd>
</dl>
</div>
{{! ROW 3 }}

View file

@ -10,6 +10,7 @@ module.exports = function(app) {
typeStrain: true,
accessionNumbers: "Test Accession",
genbank: "Test Genbank",
wholeGenomeSequence: "Seq123",
isolatedFrom: "Location 1",
measurements: [1,2,3,4,5],
createdAt: "0001-01-01T00:00:00Z",
@ -29,6 +30,7 @@ module.exports = function(app) {
typeStrain: false,
accessionNumbers: "Test Accession",
genbank: "Test Genbank",
wholeGenomeSequence: null,
isolatedFrom: "Location 2",
measurements: [6,7,8,9,10],
createdAt: "0001-01-01T00:00:00Z",
@ -48,6 +50,7 @@ module.exports = function(app) {
typeStrain: true,
accessionNumbers: "Test Accession",
genbank: "Test Genbank",
wholeGenomeSequence: "Seq123",
isolatedFrom: "Location 1",
measurements: [],
createdAt: "0001-01-01T00:00:00Z",
@ -67,6 +70,7 @@ module.exports = function(app) {
typeStrain: true,
accessionNumbers: "Test Accession",
genbank: "Test Genbank",
wholeGenomeSequence: "Seq123",
isolatedFrom: "Location 2",
measurements: [],
createdAt: "0001-01-01T00:00:00Z",