Commit Graph

3126 Commits

Author SHA1 Message Date
Roba Boru
767690236a Merge branch 'main' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-16 13:54:45 +03:00
Roba Boru
8a1c9bfeb7 Merge branch 'dev' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-16 13:54:33 +03:00
Roba Boru
9161b24f98 Merge branch 'alpha' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-16 13:54:22 +03:00
Stephanos A.
478d52a623 Merge pull request #732 from Tria-plc/alpha
totalMinor with displayTotalMinor updates
2026-07-16 13:40:51 +03:00
Roba Boru
e316e59eda Update altenative dates 2026-07-16 13:39:44 +03:00
Stephanos A
b2ab65245a totalMinor with displayTotalMinor updates 2026-07-16 13:38:34 +03:00
Hagernesh Tadesse
5cedd43436 Merge pull request #731 from Tria-plc/wh-dashboard
EDR truck last mile conatiner and bulk pick up ,

Per truck exit and handover paper
2026-07-16 12:28:08 +03:00
Hagernesh
d5182c5d85 feat(last-mile): wire multi-container assignment, bulk drawdown + EDR exit papers
Frontend for the per-truck EDR backend:

- Assign modal takes a container LOAD per truck (MultiSelect, max 2) instead of a
  single container, so a truck can carry one 40ft or two 20ft. Sends
  containerNumbers[]; the API enforces the size rule.
- requiredVehicles is now size-aware: a 40ft fills a truck (1 each), two 20ft
  share one. It previously assumed ceil(containers / 2) regardless of size, so a
  2x40ft booking under-counted the trucks needed.
- Bulk bookings show the drawdown in the assign modal — remaining vs total
  tonnage, what's been hauled, and a "fully hauled" state when it reaches 0.
- New "Truck exit papers" row action opens a per-truck list (plate, containers,
  arrival, exit, net weight) with a per-truck exit-paper download.
- last-mile findAll/findById now load each assignment's containers so the UI can
  hydrate a truck's load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 09:24:22 +00:00
Hagernesh
ff49554cc2 feat(last-mile): per-truck EDR arrival/exit, exit paper, bulk drawdown, departure notify
EDR last-mile is multi-truck but was modelled as one: setVehicles accepted any
number of trucks with no validation, arrival/delivery were stamped once per
last_mile record (N trucks shared one timestamp), EDR trucks got no exit paper,
and the per-truck EDR handover never happened because deliver() resolved the
plate via last_mile_container_allocations — a table nothing writes.

- Migration 2260000000000: per-truck arrived_at/departed_at/gross_weight_tons/
  net_weight_tons on last_mile_vehicle_assignments, plus a
  last_mile_vehicle_containers child table (a truck holds 1x40ft OR 2x20ft, so
  the single container_number scalar could not express a load). Weights are
  TONNES and named accordingly — the older gross_weight_kg lies about its unit.
- setVehicles: enforce the size rule (one 40ft, or two 20ft), container
  membership, one-container-one-truck, and never more trucks than containers.
  Bulk carries no containers and is instead gated on tonnage remaining.
- Bulk drawdown: remainingTonsForBooking = booking VGM minus the net weighed off
  every departed truck (both tonnes, no conversion), exposed as
  GET /last-mile/booking/:bookingId/remaining-tons.
- release() now stamps the EDR truck's own arrival and exit (matched by plate, so
  it works for bulk too) alongside the existing customer-truck stamp. The exit
  weighing itself is untouched.
- New GET /warehouse-inventory/edr-truck-exit-paper/:assignmentId — per-truck
  exit paper for EDR trucks. Deliberately not signature-gated: EDR handovers are
  generated at delivery, after the truck has left.
- deliver(): resolve the handover plate from the truck's own containers instead
  of the dead allocations table, so EDR handovers are genuinely per-truck.
- Notify the customer (portal inbox + SMS/email) when a truck leaves — one hook
  in release() covers both self-haul and EDR, since it is the single exit path.

Self-haul is intentionally unchanged (one booking-level handover signed once).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 09:24:22 +00:00
Stephanos A.
a85bae1002 Merge pull request #729 from Tria-plc/alpha
Alpha
2026-07-16 12:04:32 +03:00
Stephanos A
2b4eeea8d7 Excess luggage tarif management issue resolution 2026-07-16 12:01:44 +03:00
Nathnael Wondisha
68f6a393a9 Merge pull request #730 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-16 11:59:01 +03:00
Nathnael
318af79962 feat: setup posthog 2026-07-16 08:52:29 +00:00
Stephanos A
8a77f23701 Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-07-16 11:43:14 +03:00
Stephanos A
a852b4e619 Seats report, supplementary change for bookings added 2026-07-16 11:43:04 +03:00
Nathnael
6dde17fa4d fix: premature payable invoice 2026-07-16 08:38:49 +00:00
Abubeker Yasin
d34363c276 Merge pull request #728 from Tria-plc/dev
merge to main
2026-07-16 11:21:20 +03:00
Abubeker Yasin
368d01ff34 Merge pull request #727 from Tria-plc/alpha
add permissions
2026-07-16 11:20:16 +03:00
yaschalew10
1186dd91b1 Merge pull request #725 from Tria-plc/freight/feature/user_management_UI
Freight/feature/user management UI
2026-07-16 11:14:32 +03:00
natib21
af57ffdda4 Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight/feature/user_management_UI 2026-07-16 08:13:57 +00:00
natib21
4a04aa7e97 fic 2026-07-16 08:13:22 +00:00
Abubeker Yasin
edbef5ccf2 add permissions 2026-07-16 11:01:31 +03:00
Nathnael Wondisha
2db321b37a Merge pull request #724 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-16 10:59:36 +03:00
yaschalew10
b6d71ccc57 Merge pull request #723 from Tria-plc/freight/feature/user_management_UI
Freight/feature/user management UI
2026-07-16 10:50:34 +03:00
natib21
9d53552f95 Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight/feature/user_management_UI 2026-07-16 07:48:27 +00:00
natib21
a4b3309412 add seed 2026-07-16 07:43:54 +00:00
Nathnael
5f6d8f9294 fix: cache invalidation 2026-07-16 07:17:22 +00:00
natib21
312014b678 fix first/last mile 2026-07-16 07:13:24 +00:00
Nathnael
08faf56c4f fix: payment autopay on the payment init added for testing 2026-07-16 06:43:30 +00:00
Stephanos A.
bfc8477721 Merge pull request #722 from Tria-plc/alpha
Alpha
2026-07-16 08:47:56 +03:00
Stephanos A
3bc492ea83 Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-07-16 08:41:53 +03:00
Stephanos A
b2b31f30bb Generate ticket, dashboard, excess luggage rate updates 2026-07-16 08:41:35 +03:00
marshal
50d5ce5ad9 Merge pull request #721 from Tria-plc/freight_feature/usermanagement
fix issue
2026-07-16 04:06:52 +03:00
Marshal
fe29b38377 fix issue 2026-07-16 01:05:57 +00:00
marshal
ea22f38adf Merge pull request #720 from Tria-plc/freight_feature/usermanagement
fix issue
2026-07-16 03:34:14 +03:00
Marshal
41fe04652f fix issue 2026-07-16 00:33:31 +00:00
marshal
67bc835458 Merge pull request #719 from Tria-plc/freight_feature/usermanagement
implement empty-container return service: add return quantity handlin…
2026-07-16 02:06:08 +03:00
Marshal
234a74e812 implement empty-container return service: add return quantity handling, update related DTOs, services, and UI components 2026-07-15 22:48:04 +00:00
Abubeker Yasin
70724ac3df Merge pull request #718 from Tria-plc/alpha
Alpha
2026-07-15 23:26:28 +03:00
marshal
e3fccbd24d Merge pull request #717 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-15 23:18:55 +03:00
Marshal
fc44eee25e implement update train details feature: add DTO, service method, and UI modal for editing train name and run numbers 2026-07-15 20:14:39 +00:00
Abubeker Yasin
d0a3fb3ca3 Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-07-15 23:14:19 +03:00
Abubeker Yasin
7725b0d5d4 Update payments.service.ts 2026-07-15 23:14:05 +03:00
Eyob T.
f4ae970fc9 Merge pull request #716 from Tria-plc/alpha
Fix booking detail for roundtrip
2026-07-15 22:05:56 +03:00
Roba Boru
916b41d541 Merge branch 'dev' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-15 22:03:58 +03:00
Roba Boru
230fdfb852 Merge branch 'alpha' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-15 22:03:48 +03:00
Roba Boru
63accc8bd3 Fix booking detail for roundtrip 2026-07-15 22:03:29 +03:00
Abubeker Yasin
5360075a74 Merge pull request #715 from Tria-plc/alpha
Alpha
2026-07-15 21:47:32 +03:00
Abubeker Yasin
458f27c1b1 Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-07-15 21:33:17 +03:00
Eyob T.
fa40dc787b Merge pull request #714 from Tria-plc/alpha
Update seatmap for blocked seats
2026-07-15 21:32:35 +03:00