ekms 7.11.0 → 7.11.1-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ const edible = require('./edible')
4
4
  const events = require('./events')
5
5
  const sizeable = require('./sizeable')
6
6
  const countable = require('./countable')
7
- const { isMany } = require('./helpers')
7
+ const { isMany, getCount } = require('./helpers')
8
8
  ensureTestFile(module, 'fastfood', 'test')
9
9
  ensureTestFile(module, 'fastfood', 'instance')
10
10
 
@@ -275,6 +275,7 @@ const template = {
275
275
  { context: [['meal', 0], ['list', 0], ['meal', 0], ['comboMeal', 0]], ordered: true, choose: [0,1,2] },
276
276
  // { context: [['crispy_chicken_club', 0], ['chicken_club', 0], ['chicken_sandwich', 0]], choose: [0] },
277
277
  { context: [['breakfast_baconator', 0], ['breakfast_meal', 0]], choose: [0] },
278
+ { context: [['list', 0], ['articlePOS',0], ['smoothie_ingredient', 0], ['smoothie', 0]], ordered: true, choose: [1,2] },
278
279
  ]
279
280
  },
280
281
  "junior modifies crispy chicken club",
@@ -357,7 +358,12 @@ const template = {
357
358
  const needsDrink = askAbout(args)
358
359
  const { api, context } = args
359
360
  if (isMany(context)) {
361
+ let count = getCount(context) || Number.MAX_SAFE_INTEGER
360
362
  for (let item of needsDrink) {
363
+ if (count < 1) {
364
+ break
365
+ }
366
+ count -= 1
361
367
  api.addDrink(item.item_id, { id: context.value })
362
368
  }
363
369
  } else {
@@ -368,6 +374,16 @@ const template = {
368
374
  },
369
375
  ])
370
376
  },
377
+ {
378
+ priorities: [
379
+ { context: [['combo', 0], ['number',1], ['list', 0], ['combo', 0]], ordered: true, choose: [0,1] },
380
+ { context: [['list', 0], ['combo',0], ['number',1]], ordered: true, choose: [1,2] },
381
+ { context: [['list', 0], ['combo',0], ['list',1]], ordered: true, choose: [1,2] },
382
+ { context: [['mango', 0], ['passion',0], ['list', 0]], ordered: true, choose: [0,1] },
383
+ { context: [['number', 1], ['mango_passion',1], ['list', 0]], ordered: true, choose: [0,1] },
384
+ { context: [['mango', 0], ['mango_passion',0], ['passion',0], ['list', 0]], ordered: true, choose: [0,1,2] },
385
+ ],
386
+ },
371
387
  ],
372
388
  }
373
389
 
@@ -742,7 +758,7 @@ knowledgeModule( {
742
758
  checks: {
743
759
  objects: [
744
760
  'show',
745
- { property: 'items', filter: ['combo', 'item_id', 'id', 'modifications', 'needsDrink'] },
761
+ { property: 'items', filter: ['combo', 'pieces', 'size', 'item_id', 'id', 'modifications', 'needsDrink'] },
746
762
  'changes',
747
763
  'response',
748
764
  { property: 'notAvailable', filter: [ 'marker', 'value', 'text' ] },