Commit Graph

924 Commits

Author SHA1 Message Date
Hagernesh
73f36fe46e Export interchange document — a generation error after Djibouti unloading failed the whole request and left the document missing until a manual rerun. Generation is now best-effort (unload never fails on paperwork) and reruns backfill the document. 2026-07-23 11:31:44 +00:00
marshal
4df17f36ce Merge pull request #935 from Tria-plc/freight_feature/usermanagement
changes
2026-07-23 14:07:03 +03:00
Marshal
13609f8d59 changes 2026-07-23 11:06:10 +00:00
Hagernesh
f2f6ac616f KM-Based Maintenance Scheduling 2026-07-23 07:53:11 +00:00
Hagernesh
4abcc909af feat(warehouses): persist saved signature image on handover sign
Store the signer's saved-signature URL on booking_handovers (new
signature_image_url column) when a handover is signed — per-truck or
booking-level — so signed handover documents can render the actual
signature, matching the contract-signing flow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 07:53:11 +00:00
Hagernesh
fa59ccfc95 feat: implement KM-based maintenance scheduling
Add maintenance intervals configuration to track maintenance by kilometers
driven. When a maintenance is marked COMPLETED, automatically calculate and
schedule the next maintenance based on interval + current odometer reading.

Features:
- MaintenanceInterval entity: stores KM/day intervals per vehicle & type
- scheduleNextMaintenance(): creates next SCHEDULED item after completion
- nextDueKm field: tracks when next maintenance is due (in kilometers)
- getDueBoard() queries already support KM-based tracking

Maintenance now "marches forward" based on distance driven, not just dates.
Each vehicle type can have different intervals (e.g., oil every 10k km, tires 50k km).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-23 07:53:11 +00:00
marshal
f5f41e0a5a Merge pull request #926 from Tria-plc/freight_feature/usermanagement
implement freight permissions for trains, wagons, and routes
2026-07-23 08:57:59 +03:00
Marshal
129a4d1d0a implement freight permissions for trains, wagons, and routes 2026-07-23 05:57:14 +00:00
marshal
edfd0a859d Merge pull request #925 from Tria-plc/freight_feature/usermanagement
add e2e test
2026-07-23 08:27:29 +03:00
Marshal
2481f43f1f add e2e test 2026-07-22 23:44:32 +00:00
marshal
091dd0bfa3 Merge pull request #923 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-23 00:02:55 +03:00
Marshal
5709801590 enhance shipment form and booking process 2026-07-22 17:25:01 +00:00
Hagernesh
15540f78e2 fix(portal): Table has no size prop in BulkTruckUploadModal 2026-07-22 14:11:58 +00:00
Hagernesh
ec066f3d29 Fix:
Added assertCapacity() checks before saving (matches single receive)
Added applyCapacityDelta() after save to increment counters
Now validates warehouse → yard → zone capacity hierarchy
Single receive already had both checks; bulk receive was gap.
2026-07-22 13:18:36 +00:00
marshal
a3037749b4 Merge pull request #912 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-22 15:35:11 +03:00
Marshal
ef840241c0 permision 2026-07-22 12:34:08 +00:00
Marshal
5640c43eb1 permision 2026-07-22 12:33:57 +00:00
marshal
d1c67e4acd Merge pull request #911 from Tria-plc/freight_feature/usermanagement
changes
2026-07-22 15:21:25 +03:00
Marshal
410bfa5b2b changes 2026-07-22 12:19:51 +00:00
Hagernesh
8dc4dd585e feat(procurement): validate acquisition lease fields and enforce bulk-receive capacity
Reject lease start/end and monthly payment on PURCHASE acquisitions (create and
update, validated against the resulting record). Add asset_acquisitions.item_name
column + migration. Enforce warehouse/yard/zone capacity on bulk receive and apply
capacity-counter deltas on save. Adds acquisition-guard spec.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 12:15:47 +00:00
Hagernesh
59f06a9bd1 feat(warehouses): enforce yard/zone capacity limits; broaden dispatcher perms
Yard create/update now rejects capacities that overflow the parent warehouse,
and zone create/update rejects capacities that overflow the parent yard, via
BadRequestException. Dispatcher permission preset expanded to full CRUD on
warehouse and fleet management; allocation and fee rules remain view-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 12:15:47 +00:00
Hagernesh Tadesse
11437cfd35 Merge pull request #905 from Tria-plc/testfixes
Fixes
Download Excel template with instructions
Parse uploaded file, preview trucks
Validate container assignments (1x40ft OR 2x20ft per truck)
Commit bulk upload in one call
2026-07-22 13:54:59 +03:00
Nathnael Wondisha
0fb8eba4df Merge pull request #899 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-22 11:02:11 +03:00
Hagernesh
7763d67ea8 feat: bulk upload for customer truck assignments
Add Excel template-based bulk upload for customer truck assignments
(self-haul + EDR). Supports up to 2x20ft or 1x40ft containers per truck.

API: POST /bookings/:id/customer-trucks/bulk accepts array of trucks.
Portal: DownloadTemplate → ParseExcel → PreviewUpload → Commit flow.
Validates truck load rules per booking container configuration.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-22 08:01:16 +00:00
Hagernesh
5395d4f346 Customer Name + Customer ID columns removed from the Export Marshalling Document 2026-07-22 08:01:15 +00:00
Nathnael
905bf75bce fix: test 2026-07-22 07:47:25 +00:00
Nathnael
1be6744f09 fix: test 2026-07-22 07:34:41 +00:00
Hagernesh
19906b273e fix(operations): prefill booking context on single assign; enforce per-truck container loads
- single-row Assign vehicle uses the full single-record flow (details + containers)
- release() rejects exit containers not assigned to the departing truck
- weighing modal offers only the selected truck's assigned containers
2026-07-22 07:24:14 +00:00
Nathnael
179d6eea9e Merge branch 'dev' into freight/feat/fixes-v1 2026-07-22 07:20:08 +00:00
Nathnael
a5ab6fe5c1 chore: filter out safari phone as foreign 2026-07-22 07:18:07 +00:00
Hagernesh
fd3212f326 fix(warehouses): exit-paper truck weight from summed container VGM
Per-truck weight now sums the departing truck's container vgm_tons
(recorded net for bulk); weighed gross only as fallback.
2026-07-22 07:05:26 +00:00
Nathnael
82cb5508cc chore: rm the active company profile 2026-07-22 06:43:05 +00:00
marshal
31343282b3 Merge pull request #893 from Tria-plc/freight_feature/usermanagement
feat(freight-me): add position type lookup and enrich user profile wi…
2026-07-22 03:08:56 +03:00
Marshal
2524109f00 feat(freight-me): add position type lookup and enrich user profile with position type 2026-07-22 00:06:38 +00:00
marshal
03dfc2df09 Merge pull request #892 from Tria-plc/freight_feature/usermanagement
refactor(train-scheduling): rename and restructure container movement…
2026-07-22 02:49:59 +03:00
Marshal
ed3c8307bb refactor(train-scheduling): rename and restructure container movement logic 2026-07-21 23:49:10 +00:00
marshal
d683f6da9c Merge pull request #891 from Tria-plc/freight_feature/usermanagement
feat(user-management): implement staff reference permissions for vari…
2026-07-22 02:29:55 +03:00
Marshal
d25612c2f0 feat(user-management): implement staff reference permissions for various controllers and update sidebar permissions 2026-07-21 23:25:43 +00:00
marshal
8927f38bfe Merge pull request #890 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-22 02:17:00 +03:00
Marshal
835c9e111c feat(train-scheduling): implement container movement between wagons
- Added functionality to move containers between wagons in the train scheduling system.
- Introduced  API endpoint and service method to handle container movement.
- Updated  component to support drag-and-drop for rearranging containers.
- Enhanced  to allow moving containers to other wagons via a context menu.
- Implemented UI feedback for container movement actions, including loading states and success/error notifications.
- Updated relevant types and constants to accommodate new container movement logic.
- Added tests for the rule engine to ensure proper handling of hazardous bookings.
2026-07-21 23:02:06 +00:00
Hagernesh
b54cb2483e Card called GET /warehouse-inventory (staff perm) → 403 swallowed as
empty state. New customer-safe bookings/:id/location endpoint returns
location fields only; card now uses it.
2026-07-21 14:15:56 +00:00
Hagernesh
89d82f45c6 fix padding on portal 2026-07-21 14:01:10 +00:00
Hagernesh
61e59036cd Browser testing for modern teams
Create tests, debug failures, and improve quality faster than ever. Get AI-powered guidance at every stage of testing, with full code ownership, on a platform that connects your team.
2026-07-21 12:57:37 +00:00
Hagernesh
9da48bd61a fix 2026-07-21 12:57:37 +00:00
marshal
ca8a7602ef Merge pull request #876 from Tria-plc/freight_feature/usermanagement
changes
2026-07-21 15:15:19 +03:00
Marshal
07c390a3b2 changes 2026-07-21 12:14:47 +00:00
Hagernesh
7566c57ed9 feat(warehouses): per-truck EDR handover signing with auto-delivery on completion
EDR truck gate-out now generates a per-truck handover (new
edr_assignment_id link) and notifies the customer to sign from the
portal. New sign endpoint delivers the signed truck's containers; last
signature auto-delivers remaining inventory, frees trucks and completes
the booking via import.handover.completed. Adds gate-in truck-arrival
notification and per-truck handover PDFs.
2026-07-21 11:55:18 +00:00
Hagernesh
86569f7490 Customer portal card displays warehouse location data (warehouse/yard/zone + arrival time) once cargo arrives at warehouse. Shows loading state during fetch, placeholder text if not yet received. Type-check passes. 2026-07-21 11:55:18 +00:00
Hagernesh
1fae0752a0 Ticket: Warehouse dashboard Needs Attention cards — fix trucks-on-site aging counters (EDR trucks, UNLOADED status) and make each card open the exact list behind its count via new inventory drill-down filters. 2026-07-21 11:03:40 +00:00
Hagernesh
b616f520ae feat(fleet): validate vehicle plate numbers against a letters-and-digits format
Plate, power-plate and trailer accepted any free text — a vehicle could be
saved with a plate of "assadasd". They must be letters, a hyphen, then digits,
like ET-9875 or AA-8642.

The server now enforces it on CreateVehicleDto (and UpdateVehicleDto via
PartialType): each plate is trimmed and upper-cased, then matched against
^[A-Z]{2,3}-\d{2,6}$, so "et-9875" is accepted and stored as ET-9875 while an
empty optional trailer/power plate still passes.

The fleet form gains the same check inline: FleetFormFieldDef takes an optional
pattern, the dialog tests it on submit against the upper-cased value, and the
vehicle config points plate and trailer at a regex that mirrors the server's.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 11:03:40 +00:00