How to use the ember-flexberry/routes/edit-form-new.extend function in ember-flexberry

To help you get started, we’ve selected a few ember-flexberry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Flexberry / ember-flexberry-designer / addon / routes / fd-association-edit-form / new.js View on Github external
import { A } from '@ember/array';
import { inject as service } from '@ember/service';
import { isBlank } from '@ember/utils';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';

export default EditFormNewRoute.extend({
  modelProjection: 'EditFormView',
  modelName: 'fd-dev-association',
  templateName: 'fd-association-edit-form',

  /**
   Service that get current project contexts.

   @property currentProjectContext
   @type {Class}
   @default service()
   */
  currentProjectContext: service('fd-current-project-context'),

  /**
    A hook you can use to setup the controller for the current route.
    [More info](http://emberjs.com/api/classes/Ember.Route.html#method_setupController).
github Flexberry / ember-flexberry-designer / addon / routes / fd-class-edit-form / new.js View on Github external
import { inject as service } from '@ember/service';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';

export default EditFormNewRoute.extend({
  modelProjection: 'FdEditClassForm',
  modelName: 'fd-dev-class',
  templateName: 'fd-class-edit-form',

  /**
    Link to {{#crossLink "FdCurrentProjectContextService"}}FdCurrentProjectContextService{{/crossLink}}.

    @property currentContext
    @type FdCurrentProjectContextService
  */
  currentContext: service('fd-current-project-context'),

  /**
    A hook you can use to setup the controller for the current route.
    [More info](http://emberjs.com/api/classes/Ember.Route.html#method_setupController).
github Flexberry / ember-flexberry-designer / addon / routes / fd-aggregation-edit-form / new.js View on Github external
import { inject as service } from '@ember/service';
import { A } from '@ember/array';
import { isBlank } from '@ember/utils';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';

export default EditFormNewRoute.extend({
  modelProjection: 'Edit',
  modelName: 'fd-dev-aggregation',
  templateName: 'fd-aggregation-edit-form',

  /**
   Service that get current project contexts.

   @property currentProjectContext
   @type {Class}
   @default service()
   */
  currentProjectContext: service('fd-current-project-context'),

  /**
    A hook you can use to setup the controller for the current route.
    [More info](http://emberjs.com/api/classes/Ember.Route.html#method_setupController).
github Flexberry / ember-flexberry-designer / addon / routes / fd-typedef-edit-form / new.js View on Github external
import { inject as service } from '@ember/service';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';

export default EditFormNewRoute.extend({
  modelProjection: 'TypeDefinitionE',
  modelName: 'fd-dev-type-definition',
  templateName: 'fd-typedef-edit-form',

  /**
    Link to {{#crossLink "FdCurrentProjectContextService"}}FdCurrentProjectContextService{{/crossLink}}.

    @property currentContext
    @type FdCurrentProjectContextService
  */
  currentContext: service('fd-current-project-context'),

  /**
    A hook you can use to setup the controller for the current route.
    [More info](http://emberjs.com/api/classes/Ember.Route.html#method_setupController).
github Flexberry / ember-flexberry-designer / addon / routes / fd-inheritance-edit-form / new.js View on Github external
import { inject as service } from '@ember/service';
import { A } from '@ember/array';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';

export default EditFormNewRoute.extend({
  modelProjection: 'EditFormView',
  modelName: 'fd-dev-inheritance',
  templateName: 'fd-inheritance-edit-form',

  /**
   Service that get current project contexts.

   @property currentProjectContext
   @type {Class}
   @default service()
   */
  currentProjectContext: service('fd-current-project-context'),

  /**
    A hook you can use to setup the controller for the current route.
    [More info](http://emberjs.com/api/classes/Ember.Route.html#method_setupController).
github Flexberry / ember-flexberry-designer / addon / routes / fd-stage-edit-form / new.js View on Github external
import { inject as service } from '@ember/service';
import { Promise } from 'rsvp';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';
import Builder from 'ember-flexberry-data/query/builder';
import FilterOperator from 'ember-flexberry-data/query/filter-operator';

export default EditFormNewRoute.extend({
  modelProjection: 'EditFormView',
  modelName: 'fd-dev-stage',
  templateName: 'fd-stage-edit-form',
  /**
    Link to {{#crossLink "FdCurrentProjectContextService"}}FdCurrentProjectContextService{{/crossLink}}.

    @property currentContext
    @type FdCurrentProjectContextService
  */
  currentContext: service('fd-current-project-context'),

  afterModel: function (model) {
    let _this = this;
    return new Promise((resolve, reject) => {
      let modelName = 'fd-configuration';
      let configurationId = this.get('currentContext').getCurrentConfiguration();
github Flexberry / ember-flexberry-designer / addon / routes / fd-configuration-edit-form / new.js View on Github external
import { Promise } from 'rsvp';
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';
import Builder from 'ember-flexberry-data/query/builder';

export default EditFormNewRoute.extend({
  modelProjection: 'EditFormView',
  modelName: 'fd-configuration',
  templateName: 'fd-configuration-edit-form',
  afterModel: function (model) {
    let _this = this;
    return new Promise((resolve, reject) => {
      let modelName = 'fd-project';
      let builder = new Builder(_this.store, modelName)
        .select('id,name')
        .top(1);

      _this.store.query(modelName, builder.build()).then((projects)=> {
        model.set('project', projects.toArray()[0]);
        resolve();
      }).catch(error => { reject(error); });
    });