Skip to content

Constraints ​

English · Русский

Component options for @mes/aps@1.23.0. Prefix Settings names with schedule.; see how to fill in a record.

Configure secondary constraints and material movement beneath the main chart: visibility, titles, list rows, and tooltips. See row rules, vertical scale for precisionYConstraints, and layout for appSettings.UISettings.secondHeaderHeight. Secondary excess/maximum layers use lateItemColor and inactiveElementsColor; material movement does not. Only the listed constraint fields are guaranteed.

Panel visibility ​

One area beneath the main chart displays secondary constraints, otherwise material movement, otherwise application-provided content such as unscheduled operations.

showConstraints ​

Shows secondary constraints initially. Horizontal scroll/zoom controls move into that panel while it is visible.

  • Type: boolean.
  • Default: false.
  • Takes precedence over showMaterialConstraints when both are true. The application can switch panels on an existing chart.

showMaterialConstraints ​

Shows material movement initially. Boolean; default: false.

Titles and menu ​

constraintsDisplaySettings.title, materialConstraintsDisplaySettings.title ​

String titles. Defaults: Вторичные ограничения, Движение материалов.

constraintsDisplaySettings.menuShowConstraintsLabel, materialConstraintsDisplaySettings.menuShowConstraintsLabel ​

String for the row context-menu action highlighting operations that use this constraint. Default: Показать/Скрыть использующие операции.

Declared minValLabel/maxValLabel defaults Мин/Макс are unused in both sections. Configure minimum/maximum labels through their list row settings.

Constraint chart ​

appSettings.constraints.paddingTop ​

Pixel space above the secondary curve; value scaling uses row height minus this padding. Material movement instead leaves 5% of row height above/below.

  • Type: number, pixels.
  • Default: 20.
  • Padding near the row's height makes the chart unreadable. Vertical zoom changes row height.

appSettings.constraints.paddingBottom ​

Declared number with default 20, but not read during drawing; it does not change bottom padding.

Secondary rows and tooltips ​

Both sections are empty by default: the list has no text and the tooltip no rows until configured.

constraintsListInfoConfig ​

List row fields: constraintName, constraintItemID, constraintType, constraintTypeName, quantityMaxPoolValue (maximum), minQuantity (always 0), and constraintGuid.

constraintsTooltipConfig ​

Hover fields: startDate, finishDate, and quantity. Dates are date objects; without transformation, the component prints their browser representation, not ISO strings.

Material movement rows and tooltips ​

materialConstraintsListInfoConfig ​

List fields: constraintName, constraintItemID, constraintType, constraintTypeName, constraintUOM, maxQuantity, minQuantity, quantityMinPoolValue, quantityMaxPoolValue, and constraintGuid. The package calculates the event minimum/maximum as numeric quantityMinPoolValue/quantityMaxPoolValue, then also exposes them as minQuantity/maxQuantity for row text. The minimum need not be zero; these are numbers, not a nested quantityMaxPoolValue.min/max object.

materialConstraintsTooltipConfig ​

Simple fields: startDate, finishDate, and quantity. Lists supply, producers, and consumers use a group descriptor with its own fields:

json
{
  "materialConstraintsTooltipConfig": {
    "startDate": { "label": "Start", "order": 1 },
    "quantity": { "label": "Balance", "order": 2 },
    "supply": {
      "label": "Supply",
      "order": 3,
      "enabled": true,
      "fields": {
        "name": { "label": "Name" },
        "quantity": { "label": "Quantity" }
      }
    },
    "producers": {
      "label": "Production",
      "order": 4,
      "fields": {
        "orderNumber": { "label": "Order" },
        "operationName": { "label": "Operation" },
        "quantity": { "label": "Quantity" }
      }
    }
  }
}

For a balance of 15 and one Steel supply of 20, this shows Balance: 15, then Supply 1 with Name: Steel and Quantity: 20. Start shows the record date; Production appears only for a nonempty producers list.

Group rules:

  • enabled: false hides the group; omission and true are equivalent. A group does not use hidden.
  • Each list item gets a label N heading and indented rows. Inside fields, only label among these data properties applies; order, hidden, and template do not. Application code can provide a transform function.
  • Item fields are name, quantity, orderNumber, operationName, and guid. Materials populate name/quantity, operations operationName/orderNumber, and unrecognized items guid/quantity.
  • Empty lists are omitted.

Complete field-set example ​

json
{
  "constraintsListInfoConfig": {
    "constraintName": { "label": "", "order": 1 },
    "minQuantity": { "label": "Min", "order": 2 },
    "quantityMaxPoolValue": { "label": "Max", "order": 3 }
  },
  "constraintsTooltipConfig": {
    "quantity": { "label": "Used" }
  },
  "materialConstraintsListInfoConfig": {
    "constraintName": { "label": "", "order": 1 },
    "minQuantity": { "label": "Min", "order": 2 },
    "maxQuantity": { "label": "Max", "order": 3 },
    "constraintUOM": { "label": "", "order": 4 }
  },
  "materialConstraintsTooltipConfig": {
    "quantity": { "label": "Balance", "order": 2 },
    "supply": { "label": "Supply", "order": 3, "fields": { "name": { "label": "Name" }, "quantity": { "label": "Quantity" } } },
    "producers": { "label": "Production", "order": 4, "fields": { "orderNumber": { "label": "Order" }, "operationName": { "label": "Operation" }, "quantity": { "label": "Quantity" } } },
    "consumers": { "label": "Consumption", "order": 5, "fields": { "orderNumber": { "label": "Order" }, "operationName": { "label": "Operation" }, "quantity": { "label": "Quantity" } } }
  }
}

This example omits constraint start/finish dates: without a transform the component uses standard date stringification, with no JSON date-format option.