This commit is contained in:
Marshal
2026-07-22 10:50:36 +00:00
parent b5546b9d6f
commit 44cad7a52b
5 changed files with 651 additions and 6 deletions

View File

@@ -76,6 +76,21 @@ WHERE t.code = 'TRN-E2E-1'
AND w.id = sub.id
AND NOT EXISTS (SELECT 1 FROM freight.wagons wx WHERE wx.train_id = t.id);
-- 4d. One REQUIRED intercity clearance document, so the journey exercises the
-- real customer-upload → ops-review → finalize step (the seeder leaves the
-- intercity_documents setting empty).
INSERT INTO freight.file_upload_fields
(id, setting_id, file_key, file_label, is_required, is_multiple, max_files,
allowed_extensions, max_size_mb, display_order)
SELECT gen_random_uuid(), s.id, 'cargo_manifest', 'Cargo Manifest', true, false, 1,
'{pdf,jpg,jpeg,png}'::text[], 10, 1
FROM freight.file_upload_settings s
WHERE s.code = 'intercity_documents'
AND NOT EXISTS (
SELECT 1 FROM freight.file_upload_fields f
WHERE f.setting_id = s.id AND f.file_key = 'cargo_manifest' AND f.deleted_at IS NULL
);
-- 5. LIVE intercity container rate for Mojo → Dire Dawa (booking pricing
-- hard-blocks any container line without a rate on its exact leg; rates are
-- configured in USD and converted to the booking currency).