How to use the ember-flexberry-data.Query.Condition function in ember-flexberry-data

To help you get started, we’ve selected a few ember-flexberry-data 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-list-form.js View on Github external
objectListViewLimitPredicate() {
    // Demo data  TODO: Demo mode.
    let demoStage = 'FB6972D1-F04A-4617-B454-D2D0DB4CEC05';
    let stagePk = this.get('currentProjectContext').getCurrentStage();
    let simplePredicates = Ember.A();
    if (stagePk.toLocaleLowerCase()  === demoStage.toLocaleLowerCase()) {
      simplePredicates.pushObject(new Query.SimplePredicate('startClass.id', Query.FilterOperator.Eq, '5b6bd5cd-66f2-4c38-85d1-9b0633df17b9'));
      simplePredicates.pushObject(new Query.SimplePredicate('startClass.id', Query.FilterOperator.Eq, '83daf0b0-a6df-4298-8980-1325b5c4ad09'));
      simplePredicates.pushObject(new Query.SimplePredicate('startClass.id', Query.FilterOperator.Eq, 'a58fcb63-69dd-4003-a7d1-17795568b3ce'));
      simplePredicates.pushObject(new Query.SimplePredicate('startClass.id', Query.FilterOperator.Eq, '91b136b8-ba32-43e7-aaf7-ac01c809d67c'));
      simplePredicates.pushObject(new Query.SimplePredicate('startClass.id', Query.FilterOperator.Eq, '1594c7c7-ea8f-46ea-a137-277258548945'));
      return new Query.ComplexPredicate(Query.Condition.Or, ...simplePredicates);
    }

    return;
  },
});