expose per-side facility flags

This commit is contained in:
Marshal
2026-08-03 08:20:18 +00:00
parent f4fd469643
commit dfd27efb6b
7 changed files with 225 additions and 25 deletions

View File

@@ -691,6 +691,30 @@ export const RULE_ENGINE_RESOURCES: RuleEngineResourceConfig[] = [
accessorKey: "hasFacility",
format: "boolean",
},
{
id: "hasContainerFacilityOrigin",
header: "Container origin",
accessorKey: "hasContainerFacilityOrigin",
format: "boolean",
},
{
id: "hasContainerFacilityDestination",
header: "Container dest.",
accessorKey: "hasContainerFacilityDestination",
format: "boolean",
},
{
id: "hasBulkFacilityOrigin",
header: "Bulk origin",
accessorKey: "hasBulkFacilityOrigin",
format: "boolean",
},
{
id: "hasBulkFacilityDestination",
header: "Bulk dest.",
accessorKey: "hasBulkFacilityDestination",
format: "boolean",
},
{ id: "displayOrder", header: "Order", accessorKey: "displayOrder", format: "number" },
activeColumn,
],
@@ -710,6 +734,34 @@ export const RULE_ENGINE_RESOURCES: RuleEngineResourceConfig[] = [
description:
"This yard can load and unload cargo. Intercity bookings can only be loaded at their origin and unloaded at their destination when it is a facility.",
},
{
name: "hasContainerFacilityOrigin",
label: "Container facility — origin",
type: "boolean",
description: "Can load containers onto a train. Offered as a contract origin for container freight.",
showIf: (values) => Boolean(values.hasFacility),
},
{
name: "hasContainerFacilityDestination",
label: "Container facility — destination",
type: "boolean",
description: "Can receive containers off a train. Offered as a contract destination for container freight.",
showIf: (values) => Boolean(values.hasFacility),
},
{
name: "hasBulkFacilityOrigin",
label: "Bulk facility — origin",
type: "boolean",
description: "Can load bulk cargo onto a train. Offered as a contract origin for bulk freight.",
showIf: (values) => Boolean(values.hasFacility),
},
{
name: "hasBulkFacilityDestination",
label: "Bulk facility — destination",
type: "boolean",
description: "Can receive bulk cargo off a train. Offered as a contract destination for bulk freight.",
showIf: (values) => Boolean(values.hasFacility),
},
{ name: "isActive", label: "Active", type: "boolean" },
],
},