changes export flow

This commit is contained in:
Marshal
2026-07-30 11:30:34 +00:00
parent b671f07ce6
commit 2ca04b8f98
47 changed files with 1195 additions and 74 deletions

View File

@@ -163,6 +163,7 @@ const WAGON_STATUS_OPTIONS = [
{ label: "Assigned", value: Freight.WagonStatus.Assigned },
{ label: "Maintenance", value: Freight.WagonStatus.Maintenance },
{ label: "Detained", value: Freight.WagonStatus.Detained },
{ label: "Out of service", value: Freight.WagonStatus.OutOfService },
];
// Statuses staff may set BY HAND on the create/edit form. ASSIGNED is omitted

View File

@@ -66,6 +66,7 @@ export default function TrainSchedulingGlobalRulesPage() {
"windowDurationHours",
"docReviewMinutes",
"paymentWindowMinutes",
"exportPaymentWindowMinutes",
];
const payload: Partial<Record<keyof TrainSchedulingGlobalRules, number>> = {};
for (const key of fields) {
@@ -209,8 +210,8 @@ export default function TrainSchedulingGlobalRulesPage() {
disabled={loading}
/>
<DurationField
label="Payment window"
description="Time a selected customer has to pay before the slot expires"
label="Import payment window"
description="Time an import/domestic customer has to pay before the reserved slot expires"
value={form.paymentWindowMinutes ?? ""}
nativeUnit="minutes"
onChange={(value) =>
@@ -219,6 +220,17 @@ export default function TrainSchedulingGlobalRulesPage() {
min={1}
disabled={loading}
/>
<DurationField
label="Export payment window"
description="Time an export customer has to pay before the reserved wagons are released"
value={form.exportPaymentWindowMinutes ?? ""}
nativeUnit="minutes"
onChange={(value) =>
setForm((current) => ({ ...current, exportPaymentWindowMinutes: value }))
}
min={1}
disabled={loading}
/>
</Stack>
</Card>