mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
train
This commit is contained in:
@@ -153,7 +153,9 @@ const RuleEngineResourcePage = () => {
|
||||
config?.formFields.some((f) => f.name === "rateId"),
|
||||
);
|
||||
const usesWagonTypeField = Boolean(
|
||||
config?.formFields.some((f) => f.name === "wagonTypeId"),
|
||||
config?.formFields.some(
|
||||
(f) => f.name === "wagonTypeId" || f.name === "wagonTypeIds",
|
||||
),
|
||||
);
|
||||
|
||||
const { data: cargoParentOptions, isLoading: cargoParentOptionsLoading } =
|
||||
@@ -206,6 +208,13 @@ const RuleEngineResourcePage = () => {
|
||||
options: wagonTypeOptions ?? [],
|
||||
};
|
||||
}
|
||||
if (field.name === "wagonTypeIds") {
|
||||
return {
|
||||
...field,
|
||||
type: "multiselect" as const,
|
||||
options: wagonTypeOptions ?? [],
|
||||
};
|
||||
}
|
||||
return field;
|
||||
});
|
||||
}, [config, cargoParentOptions, cargoLeafOptions, containerTypeOptions, liveRateOptions, wagonTypeOptions]);
|
||||
|
||||
Reference in New Issue
Block a user