Commit Graph

4411 Commits

Author SHA1 Message Date
Nathnael Wondisha
b04d308413 Merge pull request #1210 from Tria-plc/freight/nati-2
fixes
2026-08-10 10:07:13 +03:00
Nathnael
84081156f6 fixes 2026-08-10 07:06:02 +00:00
Nathnael Wondisha
826a313c9d Merge pull request #1207 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-10 09:56:59 +03:00
Nathnael
124c51071b fix: log email and sms 2026-08-10 06:56:07 +00:00
Nathnael
3d53f67156 fix: gm and poa email requirement 2026-08-10 06:46:25 +00:00
marshal
270ca2a141 Merge pull request #1205 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-10 00:17:56 +03:00
Marshal
573e777e8f changes 2026-08-09 21:16:52 +00:00
Nathnael Wondisha
f5c37d3374 Merge pull request #1204 from Tria-plc/freight/nati-2
fix: rm the exception
2026-08-09 22:29:56 +03:00
Nathnael
f6dac28ac0 fix: rm the exception 2026-08-09 19:27:47 +00:00
Hagernesh Tadesse
0e676fffae Merge pull request #1203 from Tria-plc/eims-integration
fix(freight): correct direct CAS lines and sync inventory on schedule…
2026-08-09 19:09:21 +03:00
Hagernesh
cde67e4c6a fix(freight): correct direct CAS lines and sync inventory on schedule load
End-to-end testing of the direct truck-to-train flow surfaced two defects
in the carriage acceptance sheet's no-wagon fallback. Container numbers
were read from freight.containers, which only gains rows at allocation,
so a direct booking's declared containers never appeared; they are read
from booking_container_units now, seal numbers included. The weight used
bulkTotalWeightTons alone, which is null for CONTAINER and PER_TON bulk
bookings, printing 0.00 — cargoTotalWeightVgm is the real weight there
and only holds an item count for PER_ITEM break-bulk.

Separately, warehouse cargo can be loaded from the Load-to-Train queue or
from the schedule, but loading from the schedule never advanced
warehouse_inventory. The booking went IN_TRANSIT while its cargo still
read as sitting in the warehouse — the same inconsistency that produced
the spurious dispatch block. loadBooking now moves the inventory to
LOADED in the same transaction, and no-ops for direct bookings.
2026-08-09 16:05:59 +00:00
Nathnael Wondisha
02d32b0414 Merge pull request #1202 from Tria-plc/staging
Staging
2026-08-09 16:49:24 +03:00
Nathnael Wondisha
f9f88bd2b3 Merge pull request #1201 from Tria-plc/dev
y
2026-08-09 16:48:09 +03:00
Nathnael Wondisha
1797238d26 Merge pull request #1200 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-09 16:45:25 +03:00
Nathnael
a47c7f6b7a Merge branch 'dev' into freight/nati-2 2026-08-09 13:44:18 +00:00
Nathnael
f9f4b22a21 fix: video thumbnail 2026-08-09 13:42:28 +00:00
Nathnael
5e0674e2fb fix: poa email 2026-08-09 13:28:45 +00:00
Nathnael
ff9bb4954a fix: the content document 2026-08-09 13:27:05 +00:00
Nathnael
182787e143 fix: gm email 2026-08-09 07:57:45 +00:00
marshal
0d607ffeec Merge pull request #1199 from Tria-plc/dev
freight
2026-08-09 00:15:47 +03:00
marshal
92bd70d860 Merge pull request #1198 from Tria-plc/freight_feature/usermanagement
keep cents in CBE bills and prices
2026-08-09 00:14:55 +03:00
Marshal
aedab1b436 keep cents in CBE bills and prices 2026-08-08 21:09:20 +00:00
marshal
338fa78618 Merge pull request #1197 from Tria-plc/freight_feature/usermanagement
keep cents in CBE bills and prices
2026-08-08 23:59:15 +03:00
Marshal
622c690ed1 keep cents in CBE bills and prices 2026-08-08 20:58:37 +00:00
marshal
22804da1b7 Merge pull request #1196 from Tria-plc/dev
freight
2026-08-08 23:47:02 +03:00
marshal
7f9f6da405 Merge pull request #1195 from Tria-plc/freight_feature/usermanagement
keep cents in CBE bills and prices
2026-08-08 23:46:17 +03:00
Marshal
80a14c176b keep cents in CBE bills and prices 2026-08-08 20:45:05 +00:00
Nathnael Wondisha
6853562dd7 Merge pull request #1194 from Tria-plc/freight/nati-2
fix
2026-08-08 21:10:51 +03:00
Nathnael
e03ccf0f69 fix 2026-08-08 18:09:40 +00:00
marshal
a02fc66ec3 Merge pull request #1191 from Tria-plc/dev
freight
2026-08-08 21:08:01 +03:00
marshal
dd824c8196 Merge pull request #1193 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-08 21:07:35 +03:00
Marshal
aad9ebaf78 fix issue 2026-08-08 18:06:47 +00:00
Nathnael Wondisha
12eb07752e Merge pull request #1192 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-08 20:38:37 +03:00
marshal
804d5eeb69 Merge pull request #1190 from Tria-plc/dev
freight
2026-08-08 18:43:08 +03:00
Nathnael
352c873961 fix: add user email fall back 2026-08-08 15:38:00 +00:00
Hagernesh Tadesse
4fd7d288e4 Merge pull request #1189 from Tria-plc/eims-integration
feat(freight): support direct truck-to-train export handover
2026-08-08 18:22:13 +03:00
Hagernesh
337ff6cfe3 feat(freight): support direct truck-to-train export handover
Export cargo reaches a train two ways, but the platform only modelled
one. Direct truck-to-train cargo loads straight onto the wagon, never
enters a warehouse and so never has a GRN — yet assertExportReceivedWithGrn
required one before the carriage acceptance sheet could be issued or the
booking loaded from inside its schedule.

Adds export_handover_mode to freight.bookings (null = WAREHOUSE, so
existing bookings are unaffected) and teaches the shared gate to skip
DIRECT_TO_TRAIN. Both call sites are fixed by that single early return.

For direct bookings the carriage acceptance sheet builds its lines from
the booking's own containers, falling back to the declared bulk tonnage,
and is issuable as soon as the mode is chosen. Direct bookings are also
removed from the warehouse receive queue, since that cargo is never
coming to the shed.

Staff choose the mode from the booking detail page via a new endpoint
reusing bookings:operations. Switching to direct is refused once
warehouse inventory exists, so the two flows cannot cross.

Warehouse-then-train keeps every gate it had.
2026-08-08 15:16:31 +00:00
marshal
954cbec8f0 Merge pull request #1188 from Tria-plc/freight_feature/usermanagement
add usd for import
2026-08-08 18:15:23 +03:00
Marshal
fb6f8afc0c add usd for import 2026-08-08 15:14:10 +00:00
Nathnael
7a32bb95ff refactor: rm company profile 2026-08-08 15:06:46 +00:00
marshal
3122169792 Merge pull request #1187 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-08 17:23:19 +03:00
Marshal
88b995d3d7 fix issue 2026-08-08 14:22:38 +00:00
marshal
e274981c54 Merge pull request #1186 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-08 17:03:25 +03:00
Marshal
4b8119fd3c chnages 2026-08-08 14:02:58 +00:00
Marshal
1700ae0747 chnages 2026-08-08 14:00:45 +00:00
Nathnael
d337fa0d85 fix(freight:backoffice): remove coarse fleet.view/fleet.manage/admin fallbacks
Now that every fleet-resource page and settings page has its own
dedicated permission key (previous commit), the broad fallbacks are
redundant and over-grant: anyone holding only fleet:view/fleet:manage
or admin could reach every page in that whole section, not just one.

Removed fleet.view fallback from: Routes, Locomotives, Train Builder,
Wagons, Containers, Cargoes, Compliance & Alerts, Procurement, and the
Overview dashboard's Fleet KPI tab.

Removed fleet.manage fallback from: canFleetAction() (per-resource
fleet CRUD, lib/permissions.ts) and TrainBuilderDetailPage's wagon-
assignment check. Hard-delete already had no such fallback.

Removed admin fallback from: File settings, Dropdown settings,
Contract templates, Portal content, Trade access, Exchange rate.

Left untouched: Incidents (sole gate is fleet.view — no dedicated
edr_freight_app:incidents:* key exists on the backend yet, so there's
nothing to fall back FROM; removing it would make the page
super-admin-only).

Access-narrowing change: anyone currently relying on the coarse grant
without also holding the specific resource/settings key will lose
access to these pages until roles are updated to grant the specific
keys directly. Audit role assignments before this deploys.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 13:59:06 +00:00
Hagernesh Tadesse
a8591c0071 Merge pull request #1185 from Tria-plc/eims-integration
Eims integration
2026-08-08 16:48:30 +03:00
Marshal
a42d32c27c feat(billing): USD offline bank-transfer payments 2026-08-08 13:37:05 +00:00
Hagernesh
80e1648672 fix 2026-08-08 13:17:43 +00:00
Hagernesh
204bfd2421 fix: let trains dispatch with cargo still in the warehouse
The export-only assertAllocatedCargoLoaded guard threw a
BadRequestException whenever a booking on the schedule had warehouse
inventory in RECEIVED, STORED or READY_FOR_LOADING, making it
impossible to dispatch a train whose cargo had not been inspected and
loaded onto a wagon.

Leaving cargo behind is an operational decision, not an error state.
The dispatch confirm dialog already lists unassigned and unloaded
bookings and offers Dispatch anyway, so the readiness signal is
preserved — only the hard block is gone.

Wagon/locomotive conflicts and the Djibouti gatepass check still block
dispatch: those are physical and legal conflicts, not cargo readiness.
2026-08-08 13:17:43 +00:00