mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 05:18:11 +00:00
fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Freight } from "@edr/types";
|
||||
import type { ColumnFormat, FormFieldDef } from "@/pages/ruleEngine/config/resources";
|
||||
import { EXPORT_TRAIN_OPTIONS, importRunFor } from "@/constants/trainRuns";
|
||||
import { IMPORT_TRAIN_OPTIONS, exportRunFor } from "@/constants/trainRuns";
|
||||
import { vehiclesConfig, VEHICLE_TYPE_OPTIONS, FUEL_TYPE_OPTIONS, VEHICLE_STATUS_OPTIONS } from "./vehicles";
|
||||
import { driversConfig, DRIVER_STATUS_OPTIONS } from "./drivers";
|
||||
|
||||
@@ -299,25 +299,25 @@ export const FLEET_RESOURCES: FleetResourceConfig[] = [
|
||||
],
|
||||
formFields: [
|
||||
// Run numbers are optional — a wagon sits in the fleet unassigned to any
|
||||
// run until an operator picks an export run. The import run is fixed by
|
||||
// run until an operator picks an import run. The export run is fixed by
|
||||
// that choice, so it is derived rather than typed.
|
||||
{
|
||||
name: "exportTrainNumber",
|
||||
label: "Export train number",
|
||||
type: "select",
|
||||
type: "text",
|
||||
description: "Odd — Ethiopia → Djibouti runs",
|
||||
placeholder: "e.g. 8001",
|
||||
options: EXPORT_TRAIN_OPTIONS,
|
||||
derivedValue: (values) => exportRunFor(values.importTrainNumber),
|
||||
// Follows the import run to NULL when that is cleared.
|
||||
clearable: true,
|
||||
},
|
||||
{
|
||||
name: "importTrainNumber",
|
||||
label: "Import train number",
|
||||
type: "text",
|
||||
type: "select",
|
||||
description: "Even — Djibouti → Ethiopia runs",
|
||||
placeholder: "e.g. 8002",
|
||||
derivedValue: (values) => importRunFor(values.exportTrainNumber),
|
||||
// Follows the export run to NULL when that is cleared.
|
||||
options: IMPORT_TRAIN_OPTIONS,
|
||||
clearable: true,
|
||||
},
|
||||
{ name: "wagonNumber", label: "Wagon number", type: "text", required: true },
|
||||
|
||||
Reference in New Issue
Block a user