MAINT: Structural cleanup (#41)
This commit is contained in:
parent
f41f4caccd
commit
695eb65806
15 changed files with 12 additions and 13 deletions
14
app/components/collection/create-container.js
Normal file
14
app/components/collection/create-container.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import Ember from 'ember';
|
||||
import Changeset from 'ember-changeset';
|
||||
import lookupValidator from 'ember-changeset-validations';
|
||||
|
||||
const { Component } = Ember;
|
||||
|
||||
export default Component.extend({
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
const model = this.get('model');
|
||||
const validations = this.get('validations');
|
||||
this.set('changeset', new Changeset(model, lookupValidator(validations), validations));
|
||||
},
|
||||
});
|
18
app/components/collection/detail-container.js
Normal file
18
app/components/collection/detail-container.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const { Component } = Ember;
|
||||
|
||||
export default Component.extend({
|
||||
// ARGS
|
||||
model: null,
|
||||
|
||||
columns: [
|
||||
{ label: 'Project', valuePath: 'project.name', },
|
||||
{ label: 'Study Location', valuePath: 'studyLocation.code', },
|
||||
{ label: 'Method', valuePath: 'collectionMethod.code', },
|
||||
{ label: 'Type', valuePath: 'collectionType.name', },
|
||||
{ label: '# of Traps', valuePath: 'numberOfTraps', },
|
||||
{ label: 'Start', valuePath: 'startDateTime', },
|
||||
{ label: 'End', valuePath: 'endDateTime', },
|
||||
],
|
||||
});
|
18
app/components/collection/list-container.js
Normal file
18
app/components/collection/list-container.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const { Component } = Ember;
|
||||
|
||||
export default Component.extend({
|
||||
// ARGS
|
||||
model: null,
|
||||
|
||||
columns: [
|
||||
{ label: 'Project', valuePath: 'project.name', },
|
||||
{ label: 'Study Location', valuePath: 'studyLocation.code', },
|
||||
{ label: 'Method', valuePath: 'collectionMethod.code', },
|
||||
{ label: 'Type', valuePath: 'collectionType.name', },
|
||||
{ label: '# of Traps', valuePath: 'numberOfTraps', },
|
||||
{ label: 'Start', valuePath: 'startDateTime', },
|
||||
{ label: 'End', valuePath: 'endDateTime', },
|
||||
],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue