DockBoard
Runs the docks of a warehouse.
kor/ui/DockBoardSource
When to use
- Use it on a yard or warehouse screen.
Examples
Assign a truck
<k:DockBoard docks="{path: '/docks', templateShareable: false}" queue="{path: '/queue', templateShareable: false}" assign=".onAssign">
<k:docks><k:Dock key="{key}" name="{name}" plate="{plate}" text="{text}" state="{state}" progress="{progress}"/></k:docks>
<k:queue><k:DockTruck key="{plate}" plate="{plate}" text="{text}" time="{time}"/></k:queue>
</k:DockBoard>
sap.ui.define(["sap/ui/core/mvc/Controller"], (Controller) => Controller.extend("sample.Yard", {
onAssign(event) {
const model = this.getView().getModel(), data = model.getData();
const { truck, dock } = event.getParameters();
const found = data.queue.find((item) => item.plate === truck);
Object.assign(data.docks.find((item) => item.key === dock), { plate: truck, text: found.text, state: "loading" });
data.queue = data.queue.filter((item) => item !== found);
model.refresh(true);
}
}));
API
Properties
| Name | Type | Default | Description |
|---|
title | string | | Title |
selectedTruck | string | | Selected truck in the queue |
Aggregations
| Name | Type | Description |
|---|
docks | Dock[] | Docks |
queue | DockTruck[] | Waiting trucks |
Events
| Name | Type | Description |
|---|
dockPress | key: string | A dock was pressed |
assign | truck: string
dock: string | A truck was assigned to a dock. The application updates the data |
Dock
A dock.
Properties
| Name | Type | Default | Description |
|---|
key | string | | Key |
name | string | | Dock name |
plate | string | | License plate of the docked truck. Empty means free |
text | string | | Carrier or description |
state | string | | loading, unloading, waiting, problem or closed |
statusText | string | | Status text |
progress | float | 0 | Percentage loaded or unloaded |
DockTruck
A truck waiting for a dock.
Properties
| Name | Type | Default | Description |
|---|
key | string | | Key |
plate | string | | License plate |
text | string | | Carrier or description |
time | string | | Waiting time or appointment |
Related
LoadPlanSchedule