Commit Graph

106 Commits

Author SHA1 Message Date
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
natib21
312014b678 fix first/last mile 2026-07-16 07:13:24 +00:00
Hagernesh
7e934b3433 feat(warehouse,last-mile): truck load size rule, dedup last-mile, driver-required + arrival prefill
Truck loading:
- loadTruck enforces max 2 containers / one 40ft (two 20ft) and auto-marks an
  assigned truck arrived on load; container-items payload + modal expose
  container size with a client-side selection cap.
- Show "#x containers pending assignment" in the portal truck card and the
  backoffice container modal.

Last-mile:
- create() is idempotent — return the existing record for a booking instead of
  inserting a duplicate delivery row (fixed the same booking showing twice in
  Assign-Mile).
- setVehicles/update reject a truck with no assigned driver; the Assign toast
  now surfaces the reason.
- New GET /last-mile/booking/:id/arrival-trucks returns assigned EDR trucks with
  driver details; ReleaseOrderModal fetches and auto-fills them so an assigned
  EDR truck no longer reads as "not assigned yet".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 14:16:45 +00:00
Hagernesh
4e8d35a7fb Warehouse zone occupancy heatmap
Visualize live per-zone occupancy on the warehouse detail page.
2026-07-13 12:09:43 +00:00
Hagernesh
80904eeeb2 Handover SIGN notification, resending until signed no exit before sign 2026-07-08 09:33:19 +00:00
Hagernesh
25c9bdeecd Export Load on train 2026-07-07 10:21:17 +00:00
Hagernesh
48b36a2621 Merge remote-tracking branch 'origin/dev' into Truckdetantion 2026-07-07 08:49:20 +00:00
Hagernesh
392038852e Truck detention on lastmile 2026-07-07 08:45:51 +00:00
natib21
42710261e2 fix 2026-07-06 13:49:30 +00:00
natib21
0288c2b1c2 fix 2026-07-04 03:02:17 +00:00
natib21
8b20924ba8 fix 2026-07-04 02:45:10 +00:00
natib21
2e31fd12e1 fix 2026-07-04 02:26:19 +00:00
natib21
cac6e4eaa1 fix 2026-07-04 02:07:31 +00:00
natib21
00d4b729a2 fix 2026-07-04 01:59:16 +00:00
natib21
bd88424167 fix 2026-07-04 01:47:28 +00:00
natib21
58c49d34b2 fix 2026-07-04 01:31:08 +00:00
natib21
d285d688b9 fix 2026-07-04 01:13:47 +00:00
natib21
414ed92590 fix 2026-07-04 00:58:14 +00:00
natib21
1d8f095831 fix 2026-07-03 22:43:45 +00:00
natib21
cad4b84b8c mile 2026-07-03 21:57:53 +00:00
natib21
9422e5588e mile 2026-07-03 21:45:54 +00:00
natib21
6bf8da2934 mile 2026-07-03 21:21:42 +00:00
natib21
7155ec7e01 mile 2026-07-03 20:59:21 +00:00
natib21
90ab1bd042 mile 2026-07-03 20:51:32 +00:00
natib21
4ddf03e357 mile 2026-07-03 20:43:26 +00:00
natib21
05f7fc254e mile 2026-07-03 20:25:53 +00:00
natib21
16bd7fabcc mile 2026-07-03 20:21:16 +00:00
natib21
5d1a2aa319 mile 2026-07-03 20:11:30 +00:00
natib21
77dc14f6a5 mile 2026-07-03 20:00:41 +00:00
natib21
8d17d9111e mile 2026-07-03 19:44:27 +00:00
natib21
a1dfb439ff mile 2026-07-03 19:17:45 +00:00
natib21
aaaa38f234 fix 2026-07-03 17:04:41 +00:00
natib21
284c85e0e7 fix 2026-07-03 16:58:42 +00:00
natib21
ac55a867c0 fix 2026-07-03 16:56:23 +00:00
natib21
f0035a3695 fix 2026-07-03 16:52:31 +00:00
natib21
b7f6c3150e fix 2026-07-03 16:46:31 +00:00
natib21
482c569216 fix 2026-07-03 16:43:58 +00:00
natib21
53229f3da9 fix 2026-07-03 16:42:38 +00:00
natib21
aeb06e8a55 fix 2026-07-03 16:39:41 +00:00
natib21
e02cb52e19 fix 2026-07-03 16:34:06 +00:00
natib21
8661586301 fix 2026-07-03 16:21:07 +00:00
yaschalew
2b7e67b227 fix 2026-07-02 17:56:17 +03:00
natib21
eb5d8a7411 fix 2026-07-02 14:42:04 +00:00
natib21
e5fed081fc fix 2026-07-02 14:27:09 +00:00
natib21
c2c29f0735 fix 2026-07-02 14:14:13 +00:00
natib21
34b87bbcee fix 2026-07-02 14:06:45 +00:00
natib21
d8f1ed8899 fix issue 2026-07-02 13:44:19 +00:00
hagiye
5af45c2643 Customer Truck Assignment and Portal Delivary Approval 2026-07-02 15:54:16 +03:00
natib21
e59a8f9802 fix delete api 2026-07-02 10:54:43 +00:00
natib21
f4f98575f1 fix error 2026-07-02 10:48:31 +00:00