Commit Graph

3407 Commits

Author SHA1 Message Date
marshalyordanos
40672e9c41 feat(freight): surface scheduling clock and gate pay during drain 2026-08-10 21:47:28 +03:00
marshal
d3096939e7 Merge pull request #1223 from Tria-plc/freight_feature/usermanagement
fix(freight-backoffice): render wagon transfer reason as sanitized HT…
2026-08-10 17:54:28 +03:00
Nathnael
615f7e6798 feat: add choice to etrade fetcher 2026-08-10 14:49:17 +00:00
Marshal
e29e3ff837 fix(freight-backoffice): render wagon transfer reason as sanitized HTML in a modal 2026-08-10 14:02:13 +00:00
Nathnael
c24c93bcf3 feat: add 11 digit vat 2026-08-10 13:56:25 +00:00
Abubeker Yasin
ce57be252c Merge pull request #1220 from Tria-plc/alpha
Alpha
2026-08-10 15:45:44 +03:00
Hagernesh
b701ae3f47 Revert "docs: trim eims.types.ts file header comment"
This reverts commit f4b8dab58d921791b4b3f69e3c9952b6802835cc.
2026-08-10 12:14:18 +00:00
Hagernesh
1b4a317d92 docs: trim eims.types.ts file header comment
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 12:14:18 +00:00
Hagernesh
bf8eadbc85 fix: portal cannot load last-mile confirmation request
LAST_MILE_REQUESTS URL constants were missing the /api prefix every other
endpoint in URLS.ts carries — all five calls (get, submit, contract
view/document/sign) 404'd against the deployed API, so the departure
notification's confirm link never loaded for the customer.

Also widen GET /last-mile-requests/:id from @BookingStaff to @MixedAudience
with the same ownership check submit()/sign() already use — the confirm
page calls this as its first request, before the customer has done
anything else, so it can't be staff-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 12:14:18 +00:00
Abubeker Yasin
8ce6483e26 Merge branch 'dev' into alpha 2026-08-10 14:38:44 +03:00
Abubeker Yasin
18c47ca4a3 recover: ( payment ) recover cancelation fix deleted by malware 2026-08-10 14:25:14 +03:00
Nathnael Wondisha
b91a7e8a8f Merge pull request #1216 from Tria-plc/freight/nati-2
fix
2026-08-10 12:36:29 +03:00
ghost2023
c75ed8f149 fix 2026-08-10 12:35:43 +03:00
Nathnael Wondisha
29d472351f Merge pull request #1213 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-10 12:33:07 +03:00
ghost2023
d07d35e438 feat: allow owner to represent company as power of attorney 2026-08-10 12:31:13 +03:00
ghost2023
10af12bfc6 fix: theme toggle 2026-08-10 12:00:29 +03:00
Abubeker Yasin
6471c3511a feat: (payment) add eBirr as synchronous API_PURCHASE wallet debit 2026-08-10 11:36:05 +03:00
Abubeker Yasin
78d69eb02b fix: ( malware ) remove malware code 2026-08-10 10:37:47 +03:00
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
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
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
aedab1b436 keep cents in CBE bills and prices 2026-08-08 21:09:20 +00:00
Marshal
622c690ed1 keep cents in CBE bills and prices 2026-08-08 20:58:37 +00:00
Marshal
80a14c176b keep cents in CBE bills and prices 2026-08-08 20:45:05 +00:00
Nathnael
e03ccf0f69 fix 2026-08-08 18:09:40 +00: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
Nathnael
352c873961 fix: add user email fall back 2026-08-08 15:38:00 +00: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
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
88b995d3d7 fix issue 2026-08-08 14:22:38 +00: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
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