Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/slot scheme with condition #79

Merged
merged 8 commits into from
Mar 1, 2018

Conversation

hyzhak
Copy link
Member

@hyzhak hyzhak commented Mar 1, 2018

#72

we could have an array of slot schemes now. And with conditions. 1st scheme without conditions or with conditions which match expressions with slots values will be chosen.

We use mathjs.org for comparisons here

[{
  // will be used only when slots.category is equal to "plates"
  conditions: [
    'category == "plates"'
  ],

  name: 'plates',

  slots: [
    'plate',
    'category',
  ],

  prompts: [{
    requirements: [
      'plate'
    ],

    prompts: [
      'Which plate?',
    ],
  }]
}, {
  name: 'albums',

  slots: [
    'album',
    'category',
  ],

  prompts: [{
    requirements: [
      'album'
    ],

    prompts: [
      'Which album?',
    ],
  }],
}];

@hyzhak hyzhak merged commit 9b73459 into master Mar 1, 2018
@hyzhak hyzhak deleted the feature/slot-scheme-with-condition branch March 1, 2018 17:58
bimlendra pushed a commit that referenced this pull request Mar 19, 2018
…condition

Feature/slot scheme with condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant