function printTrolleysMap()

in use-cases/order-picking/src/main/resources/META-INF/resources/app.js [390:417]


function printTrolleysMap(orderPickingSolution) {
    clearWarehouseCanvas();
    drawWarehouse();
    const mapActionsContainer = $('#mapActionsContainer');
    mapActionsContainer.children().remove();
    const trolleyCheckBoxes = [];
    let trolleyIndex = 0;
    for (const trolley of orderPickingSolution.trolleyList) {
        if (trolley.nextElement != null) {
            printTrolleyPath(trolley, trolleyIndex, orderPickingSolution.trolleyList.length, false);
            trolleyCheckBoxes.push(trolley.id);
        }
        trolleyIndex++;
    }
    for (const trolley of orderPickingSolution.trolleyList) {
        if (trolley.nextElement != null) {
            printTrolleyPath(trolley, trolleyIndex, orderPickingSolution.trolleyList.length, true);
            trolleyCheckBoxes.push(trolley.id);
        }
        trolleyIndex++;
    }
    if (trolleyCheckBoxes.length > 0) {
        const mapActionsContainer = $('#mapActionsContainer');
        mapActionsContainer.append($(`<div style="display: inline-block; padding-left: 10px;">
        <button id="unSelectButton" type="button" class="btn btn-secondary btn-sm" onclick="unCheckTrolleyCheckBoxes([${trolleyCheckBoxes}])">Uncheck all</button>
        </div>`));
    }
}