From c3ba9999c5d4944ee0e94edb66bcc2c49d16c28e Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Fri, 17 Jul 2026 10:32:39 +0000 Subject: [PATCH] feat(yards): let staff mark a yard as a load/unload facility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../src/pages/ruleEngine/config/resources.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/edr-freight-web/backoffice/src/pages/ruleEngine/config/resources.ts b/apps/edr-freight-web/backoffice/src/pages/ruleEngine/config/resources.ts index 902d23427..a39a62b66 100644 --- a/apps/edr-freight-web/backoffice/src/pages/ruleEngine/config/resources.ts +++ b/apps/edr-freight-web/backoffice/src/pages/ruleEngine/config/resources.ts @@ -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" }, ], },