mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 04:50:54 +00:00
changes
This commit is contained in:
@@ -254,6 +254,14 @@ const RuleEngineFormDialog = ({
|
||||
next.cargoTypeId = "";
|
||||
next.rateUnit = "";
|
||||
}
|
||||
// Full customs and Ethiopian-only customs are alternatives on a service
|
||||
// type — switching one on drops the other so the API never sees both.
|
||||
if (name === "includesCustoms" && value === true) {
|
||||
next.includesEthiopianCustomsOnly = false;
|
||||
}
|
||||
if (name === "includesEthiopianCustomsOnly" && value === true) {
|
||||
next.includesCustoms = false;
|
||||
}
|
||||
// Turning the shipping-line toggle on or off swaps the entire form, so
|
||||
// nothing answered under the other shape may survive into the payload.
|
||||
if (name === "isShippingLineRate") {
|
||||
@@ -388,7 +396,11 @@ const RuleEngineFormDialog = ({
|
||||
// A toggle that re-targets what an existing record means (e.g. who
|
||||
// a rate is priced for) is create-only — flipping it on a saved row
|
||||
// would silently change every booking that prices off it.
|
||||
disabled={field.disabled || (field.disabledOnEdit && !!initialRecord)}
|
||||
disabled={
|
||||
field.disabled ||
|
||||
(field.disabledOnEdit && !!initialRecord) ||
|
||||
field.disabledIf?.(values) === true
|
||||
}
|
||||
size="md"
|
||||
color="edr-green"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user