Commit Graph

213 Commits

Author SHA1 Message Date
Hagernesh
a8bc5b19de feat(warehouse): fetch all PAID bookings in one call, classified IMPORT/EXPORT by route
- eligibleBookings(direction?) now returns all import+export bookings when direction omitted
  (DOMESTIC excluded); per-direction filter preserved for backward compatibility
- GET /warehouse-inventory/eligible-bookings (no query) returns the combined set
- Frontend: single shared useEligibleBookings() query; both Receive tabs filter client-side
  by route-derived direction, so only one HTTP request fires

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 20:15:26 +00:00
Hagernesh
0ab508e377 feat(warehouse): Batch 6 — Export Loaded queue + Dispatch Queue with bulk dispatch
- GET /warehouse-inventory/loaded-export: EXPORT+LOADED items (route-derived direction)
- POST /warehouse-inventory/bulk-dispatch-export: reuses existing dispatch() transition
  (LOADED → DISPATCHED, capacity freed, movement/activity logged); skips non-LOADED/non-EXPORT
- Extracted shared exportInventoryByStatus() helper (readyToLoadExport now delegates to it)
- Frontend LoadedExportTab serves both Loaded (read-only) and Dispatch Queue (dispatchable)
  sub-tabs with Dispatch / Dispatch Selected / Dispatch All + per-row Dispatch
- Replaces "Loaded" and "Dispatch Queue — coming in the next batch" placeholders
- Train/schedule flow (DISPATCHED → IN_TRANSIT) unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 20:04:18 +00:00
Hagernesh
43ba3c790b feat(warehouse): Batch 5 seed — 3 EXPORT READY_FOR_LOADING+PASSED inventory items
Creates SEED-B5-EXP-001/002/003 bookings (ADDIS_ABABA→DJIBOUTI, PAID, BULK)
with warehouse inventory at READY_FOR_LOADING + inspectionStatus PASSED so the
Ready To Load tab has visible rows. Idempotent on guard reference check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 19:45:07 +00:00
Hagernesh
806fc4a8ca feat(warehouse): Batch 5 — Export Ready To Load queue + Auto Load Ready Items
- GET /warehouse-inventory/ready-to-load-export: EXPORT+PASSED+READY_FOR_LOADING items
  with booking details (customer, container, cargo type, route, inspection status)
- Direction filtering via deriveTradeDirection (route-based, not stored field)
- Frontend ReadyToLoadTab: full table (checkbox, booking ref/id, customer, container,
  cargo type, weight, route, inspection status, current status) with selection
- Auto Load Ready Items button reuses existing POST /load-passed-export endpoint
- Replaces "Ready To Load — coming in the next batch" placeholder in Export sub-tabs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 18:03:11 +00:00
Hagernesh
50c6381341 feat(warehouse): Batch 3+4 — export receive-selected label + bulk-mark-inspected workflow
- BulkReceiveModal: Receive Selected shows "received at facility" for EXPORT
- Export inspection: POST /warehouse-inventory/bulk-mark-inspected reuses WarehouseInspectionService.create
- EXPORT items advance to READY_FOR_LOADING after inspection PASSED
- InventoryWorkbench: selection state + "Mark Selected as Inspected" bulk button
- WarehouseInventoryTable: optional Checkbox column for bulk selection
- Route-based direction in eligibleBookings, bulkReceive, getBookingDirection
- New BulkInspectDto; service + controller wired

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:52:01 +00:00
Hagernesh
b7a831b063 feat(warehouse): route-based receive direction + Export Receive Queue (Batch 2)
- Direction derived from route via existing deriveTradeDirection (eligible-bookings,
  bulk receive guard, getBookingDirection) instead of stored trade_direction
- Export tab sub-tabs (Receive Queue + Ready-to-Load/Loaded/Dispatch placeholders)
- Receive Queue: full column set + per-row Receive; eligible-bookings adds customerId
- create/update warehouse: map DB errors to 400; dashboard: distinct per-status colors

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 10:26:50 +00:00
Hagernesh
0005b2edb3 feat(warehouse): Receive Import/Export tabs with bulk receive + load-passed-export
- Backend: GET eligible-bookings?direction, POST receive-bulk, POST load-passed-export
  (reuse autoUnload/autoLoad patterns; no train-schedule/wagon logic changed)
- Frontend: ReceiveInventoryModal split into Import/Export tabs with eligible PAID
  bookings table, select-all/bulk receive, and Load Passed Export Items button
- Single-booking receive and all existing inventory row actions preserved

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 08:29:59 +00:00
Hagernesh
d7352ba4e8 fix(warehouse): import TableColumn in allocation/fee migration
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 12:25:18 +00:00
Hagernesh
e40318c847 Dashboard enhancement 2026-06-19 11:29:05 +00:00
Hagernesh
f32d3d76e3 fix(warehouse): resolve migration timestamp collisions for Batch 5/6
- Rename 1790000000000/1 (collided with CreateWarehouseModule / WarehouseBatch2)
  to 1791000000000/1 so they sort after the existing warehouse migrations
- Make Batch 5 migration idempotent (createTable ifNotExists + ADD COLUMN IF NOT EXISTS)
  so it is safe whether or not it already ran

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:29:05 +00:00
natib21
398bc9330e fix migration 2026-06-18 09:11:10 +00:00
Hagernesh
be12a9d496 fee invoice frontend 2026-06-18 00:12:59 +00:00
Hagernesh
3860d17304 demurrage invoices 2026-06-18 00:05:50 +00:00
Hagernesh
33b74a5da9 demurrage invoices 2026-06-18 00:04:07 +00:00
Hagernesh
01aec12ee9 feat(warehouse): Batch 5 — config-driven allocation + storage/demurrage fee rules
- Allocation rules engine: cargo/container/trade criteria -> deterministic yard/warehouse/zone by code; wired into auto-unload (fallback to default)
- Storage/demurrage fee rules: configurable freeDays + ratePerDay; most-specific match; fee preview per inventory item
- Inventory demurrage timestamps: inspectionStartedAt, inspectionCompletedAt, readyForPickupAt, releaseDate, gateClearedAt
- Migration 1790000000000 (allocation_rules + fee_rules tables + inventory date columns)
- Frontend: Allocation & Fees config page, automatic Fee Preview modal, plumbing/hooks
- No invoice/payment (Batch 6)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 23:53:04 +00:00
Hagernesh
270e39edd6 fix: post-merge cleanup after freight/develop merge
- Remove orphaned container publish route (service method dropped on develop)
- turbo.json concurrency as string "12" (parse + 11 persistent-task limit)
- database.config: synchronize false (migrations only; fixes weight_limit_rules boot crash)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 23:04:48 +00:00
Hagernesh
8db8bb1808 automation of loading and unloading 2026-06-17 22:33:51 +00:00
Hagernesh
89d651693b automation of loading and unloading 2026-06-17 22:33:06 +00:00
Hagernesh
5b8cb16c1a automation 2026-06-17 22:00:53 +00:00
Hagernesh
1db1467ea1 automated loading and unloading 2026-06-17 21:45:22 +00:00
Hagernesh
f528b75737 Warehouse 2026-06-17 12:44:57 +00:00
marshal
2be9b948ba Switch payment API URL from localhost to production domain in payment client service 2026-06-17 09:31:18 +03:00
Marshal
2de3f78fb0 Add payments management features including summary and listing, and integrate with the dashboard 2026-06-17 04:35:43 +00:00
Marshal
648f4f2ee4 Add fleet management and admin permissions, and update controllers to enforce new permissions 2026-06-17 01:56:56 +00:00
Marshal
c76f8648a9 Updated signature handling, added booking detail components, introduced a signature management page, updated routing, enabled document downloads, and simplified the profile page. 2026-06-17 01:02:09 +00:00
Marshal
853c2b2765 Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 22:50:01 +00:00
Stephanos A.
7a00955588 Revert "fix: add lockfile corruption handling to CI/CD and Dockerfiles" 2026-06-16 21:58:26 +03:00
Eyob T.
eb7db6db21 Merge pull request #187 from Tria-plc/alpha
fix: add lockfile corruption handling to CI/CD and Dockerfiles
2026-06-16 21:48:40 +03:00
Stephanos A
560aff222b fix: add lockfile corruption handling to CI/CD and Dockerfiles 2026-06-16 21:40:01 +03:00
natib21
018ae5e059 fix prod issue 2026-06-16 16:39:29 +00:00
Marshal
e8c6a2bbd2 Merge branch 'freight_feature/priority' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 15:28:38 +00:00
Marshal
052829c7e6 Add freight demo data seeder and permissions management
- Introduced `DemoFreightDataSeeder` to seed demo freight data including wagons, approval rules, and staff users.
- Added `seed:freight-demo` script to `package.json` for easy execution.
- Updated permissions for operations officer and added permission checks in various components.
- Enhanced sidebar and booking actions to respect user permissions.
2026-06-16 15:28:10 +00:00
marshal
369f2892fb Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 18:13:25 +03:00
marshal
82954b1ec1 Merge pull request #182 from Tria-plc/freight_feature/priority
Freight feature/priority
2026-06-16 17:31:28 +03:00
marshal
ea9b9c7346 Merge branch 'freight_feature/priority' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 17:20:31 +03:00
Marshal
2d0f5ce6ee changes 2026-06-16 14:17:40 +00:00
yaschalew10
fef2239d39 Merge pull request #181 from Tria-plc/freight_feature/priority
Freight feature/priority
2026-06-16 17:02:49 +03:00
marshal
2592e604fb changes 2026-06-16 16:57:15 +03:00
Marshal
524d3b6418 add reusable per-user contract signatures with profile prefill and approval 2026-06-16 13:34:04 +00:00
Nathnael Wondisha
8777c5e26f Merge pull request #176 from Tria-plc/freight_feature/priority
Freight feature/priority
2026-06-16 16:19:55 +03:00
Nathnael Wondisha
ab3583d9ee Merge pull request #178 from Tria-plc/freight/fix/fixes
Freight/fix/fixes
2026-06-16 16:19:14 +03:00
Nathnael
9afa23cc47 feat: add dashboard summary endpoint and related DTOs for company KPIs 2026-06-16 13:11:56 +00:00
Marshal
64fad99bdc Merge branch 'freight_feature/priority' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 12:21:16 +00:00
Marshal
52a9462228 add booking endpoint for featch payable bookings 2026-06-16 12:20:49 +00:00
marshal
811225c05d Merge branch 'freight/develop' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-16 13:50:54 +03:00
marshal
23272f972a Merge pull request #171 from Tria-plc/freight_feature/priority
Freight feature/priority
2026-06-16 13:34:18 +03:00
ghost2023
b6ece994fc Merge branch 'freight/feat/booking-schedule' into freight/develop 2026-06-16 12:39:56 +03:00
Hagernesh
d5a536956f Loading queque changes 2026-06-16 09:25:47 +00:00
marshal
00d1263f6d fix seed issue 2026-06-16 12:15:48 +03:00
Hagernesh
314e9b79cc Faciklity add 2026-06-16 09:06:11 +00:00