feat(yards): let staff mark a yard as a load/unload facility

Which yards can handle cargo is data, not a constant — the set grows. The Yards
config screen now carries the flag, so adding a facility is a toggle rather than
a code change. Config-driven, so this is a column plus a form field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-07-17 10:32:39 +00:00
parent a73faecbe3
commit c3ba9999c5

View File

@@ -477,6 +477,12 @@ export const RULE_ENGINE_RESOURCES: RuleEngineResourceConfig[] = [
codeColumn("code"),
{ id: "label", header: "Label", accessorKey: "label" },
{ id: "country", header: "Country", accessorKey: "country" },
{
id: "hasFacility",
header: "Facility",
accessorKey: "hasFacility",
format: "boolean",
},
{ id: "displayOrder", header: "Order", accessorKey: "displayOrder", format: "number" },
activeColumn,
],
@@ -489,6 +495,13 @@ export const RULE_ENGINE_RESOURCES: RuleEngineResourceConfig[] = [
required: true,
options: YARD_COUNTRIES,
},
{
name: "hasFacility",
label: "Has load/unload facility",
type: "boolean",
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: "isActive", label: "Active", type: "boolean" },
],
},