datacite/bracco

View on GitHub
app/routes/providers/show/organizations/new.js

Summary

Maintainability
A
0 mins
Test Coverage
import { hash } from 'rsvp';
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

export default Route.extend({
  can: service(),
  store: service(),

  model() {
    let provider = this.modelFor('providers/show');
    let organization = this.store.createRecord('provider', {
      consortium: provider,
      memberType: 'consortium_organization',
      billingInformation: {},
      votingContact: null,
      serviceContact: null,
      secondaryServiceContact: null,
      technicalContact: null,
      secondaryTechnicalContact: null,
      billingContact: null,
      secondaryBillingContact: null,
      isActive: true
      //doiEstimate: 0
    });

    return hash({
      provider,
      organization
    });
  }
});