Added the ability to switch the statuses of kitchen order dishes
Starting from V7, it will be possible to switch the statuses of kitchen order dishes. This will allow for the implementation of an interactive kitchen display (KDS), or alternative control of the standard kitchen display, or to automatically switch the statuses of dishes according to some external algorithm.
The units of preparation in the kitchen are dishes (IKitchenOrderCookingItem) and modifiers that are prepared separately from their dishes (IKitchenOrderModifierItem, IsSeparate).
You can set a new status for them using the method ChangeKitchenOrderItemsProcessingStatus. For example, you can mark a dish as prepared like this:
PluginContext.Operations.ChangeKitchenOrderItemsProcessingStatus(
kitchenOrder, // kitchen order for which we want to specify a new status for dishes or modifiers
new[] { cookingItem }, // list of dishes for which we want to specify a new status
Array.Empty<IKitchenOrderModifierItem>(), // list of modifiers for which we want to specify a new status
KitchenOrderItemProcessingStatus.Processed); // new status
Modifiers that are prepared together with the dish do not have their own status, they cannot be managed directly, and they should not be passed to the ChangeKitchenOrderItemsProcessingStatus method; their status will change along with the status of the dish.