Recipes, orders and scheduled jobs

Order Queue <smart-order-queue>

OrderQueue shows what a line is making, how far along it is, and what comes next.

<smart-order-queue> · 8 properties, 0 methods, 1 events · source/modules/smart.orderqueue.js

Usage in Blazor

The Razor component is <OrderQueue> in Smart.Blazor.Industrial: every property is a parameter in PascalCase, every event an EventCallback<Event> named On<Event> whose ev["Detail"] is the typed detail class, and the methods are called on the @ref. String choices are enums. In a Blazor Web App (.NET 8 and later) the page needs an interactive render mode, for example @rendermode InteractiveServer; a statically rendered component stays empty.

@using Smart.Blazor.Industrial
@* .NET 8 and later: an interactive render mode, on the page or for the whole app *@
@rendermode InteractiveServer

<OrderQueue @ref="orderQueue" Label="Line 3 orders"
    OnOrderAction="OnOrderAction" />

@code {
    OrderQueue orderQueue;

    void OnOrderAction(Event ev)
    {
        OrderQueueOrderActionEventDetail detail = ev["Detail"];
    }
}

Properties

ParameterType, defaultDescription
Orders
orders
IEnumerable<object>Sets or retrieves the orders as [{ id, product, quantity, unit, due, recipe, status, produced, started, finished }], the shape a Scada Studio station returns from /api/orders. status is queued, running, paused, done or aborted. Assign a new array to update the component.
Label
label
stringSets or retrieves the heading of the queue. It is also the accessible name of the group.
Rate
rate
int
0
Sets or retrieves the line's rate in units an hour, for the projection. Left 0, the rate is the running order's own so far, once it has run five minutes and made something.
ShowFinished
showFinished
bool
true
Sets or retrieves whether finished and aborted orders are listed under the queue.
ReadOnly
readOnly
bool
false
Sets or retrieves whether the queue only shows the orders. Every button is removed.
Busy
busy
stringSets or retrieves the id of the order the application is acting on. Its buttons wait. The queue also sets it itself as it raises orderAction, so a double press is one action even when the application sets busy only after an await. It is released when the application sets busy, refuses (errorMessage) or hands back the order changed, or after ten seconds.
ErrorMessage
errorMessage
stringSets or retrieves the reason the station refused an action. It is shown as an alert and announced.
Error
error
stringSets the reason the station refused an action, by its earlier name: it sets errorMessage. Reading it returns the element's error-reporting method, which reads as the message where text is wanted; read errorMessage for the message.

Events

Every event is an EventCallback<Event>; Event is a dictionary and ev["Detail"] converts to the detail class named under the event.

EventDescription and detail
OnOrderAction
orderAction
OrderQueueOrderActionEventDetail
This event is triggered when the operator starts, pauses, resumes, completes or aborts an order - after the confirmation, for complete and abort. The queue is not changed: the application asks the station and hands back the orders. A double press raises one action, and the answer to Complete or Abort has to be a second decision: the second click of the double-click that asked, or a press within 300 ms of the question, is not an answer.
Id string The id of the order.
Action string start, pause, resume, complete or abort.

CSS variables

The component declares 4 CSS variables; the CSS page shows how to set them.

--smart-order-queue-fill --smart-order-queue-late --smart-order-queue-error --smart-order-queue-mono