Commit Graph

3561 Commits

Author SHA1 Message Date
Hagernesh Tadesse
60743ca872 Merge pull request #883 from Tria-plc/testfixes
fix padding on portal
2026-07-21 17:02:45 +03:00
Hagernesh
89d82f45c6 fix padding on portal 2026-07-21 14:01:10 +00:00
Stephanos A.
33966e9b16 Merge pull request #881 from Tria-plc/alpha
Passengers and seats report updates
2026-07-21 16:39:39 +03:00
Stephanos A
8b713d56eb Passengers and seats report updates 2026-07-21 16:38:02 +03:00
Nathnael Wondisha
04363ba947 Merge pull request #880 from Tria-plc/freight/feat/cypress
Freight/feat/cypress
2026-07-21 16:18:41 +03:00
mulish77
c8a8153fae Merge pull request #877 from Tria-plc/alpha
Alpha
2026-07-21 16:16:47 +03:00
Nathnael
eb36aab05f chore: enhance the tests 2026-07-21 13:10:44 +00:00
Hagernesh Tadesse
01cec961ed Merge pull request #878 from Tria-plc/testfixes
Mile records are created with advanced_payment
2026-07-21 16:00:08 +03: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
Stephanos A
3c46f9b3ec Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-07-21 15:50:35 +03:00
Stephanos A
281969c94b Seat discrepancy segment-awareness updates 2026-07-21 15:50:25 +03:00
Nathnael
20a6ef7906 chore: more tests 2026-07-21 12:49:36 +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 Tadesse
92f157f0b4 Merge pull request #875 from Tria-plc/testfixes
per-truck EDR handover signing with auto-delivery on completion
2026-07-21 15:02:02 +03: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
ed503f1e6b feat(portal): show warehouse location for arrived cargo
Display cargo warehouse location (warehouse, yard, zone, arrival time) on
the portal booking detail page once the cargo has been received and
assigned to a warehouse location.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-21 11:55:18 +00:00
robiman
f9607a58c3 Merge pull request #874 from Tria-plc/alpha
Fix ticket generation
2026-07-21 14:53:44 +03:00
Roba Boru
34563e078e Fix ticket generation 2026-07-21 14:52:17 +03:00
Roba Boru
3af0e70db5 Merge branch 'main' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-21 14:18:47 +03:00
Stephanos A.
9d78610a91 Merge pull request #873 from Tria-plc/alpha
Passengers list report updates
2026-07-21 14:09:11 +03:00
Stephanos A
79629d1819 Passengers list report updates 2026-07-21 14:06:46 +03:00
Hagernesh Tadesse
55d266941e Merge pull request #872 from Tria-plc/testfixes
Warehouse Cards count fix
2026-07-21 14:05:53 +03: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
Nathnael
b8b8c4adf7 feat(e2e): add freight e2e docker-compose stack with isolated services 2026-07-21 11:00:02 +00:00
marshal
2349f62247 Merge pull request #871 from Tria-plc/freight_feature/usermanagement
Implement intercity document handling and rejection notes for contracts
2026-07-21 13:40:09 +03:00
Marshal
9ca4075c1e Implement intercity document handling and rejection notes for contracts 2026-07-21 10:39:21 +00:00
marshal
5e4be7e299 Merge pull request #870 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-21 13:26:16 +03:00
Marshal
6f8456631c Implement intercity document handling and rejection notes for contracts 2026-07-21 10:20:36 +00:00
Marshal
ceb32e0a80 Implement intercity document handling and rejection notes for contracts 2026-07-21 10:15:18 +00:00
Hagernesh Tadesse
d1c5888153 Merge pull request #868 from Tria-plc/testfixes
Fleet management cards
2026-07-21 12:27:03 +03:00
Hagernesh
92a0cc197b feat(fleet): make the dashboard stat cards link to their detail
The four headline cards — total vehicles, drivers, fuel spend, maintenance —
were static numbers with no way through to the list behind them. Each now takes
an optional href and, when set, wraps in a link to its detail page (vehicles,
drivers, fuel purchases, maintenance). A card without an href stays exactly as
before. The Card is wrapped rather than turned into a link so Mantine's Card
typing stays clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 09:22:47 +00:00
Hagernesh
64a4bcbd5c feat(warehouse): make the ops KPI cards link to their detail
The dashboard counters were static — "Trucks on-site" showed a number with no
way to open the list behind it, same for the others. KpiStrip now takes an
optional href per item: a cell with one becomes a link (pointer, hover tint,
aria-label) and a cell without one stays exactly as before, so every existing
strip is unaffected.

The warehouse ops strip wires each card to its detail: trucks on-site to the
Trucks on Site page, received-today and pending-inspection to the inventory
board filtered to RECEIVED, items-aging to the inventory board.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 09:22:46 +00:00
Abubeker Yasin
f39aad1d7f fix: ( bookings ) make BookingSeat.scheduleId optional to fix P2032 on booking read 2026-07-21 11:57:03 +03:00
Marshal
603537a20b add yard distances management to rule engine
- Introduced new yard distances resource with CRUD operations.
- Created migration for yard distances table with necessary constraints.
- Implemented service and repository for yard distances handling.
- Added controller for API endpoints to manage yard distances.
- Updated rule engine configuration to include yard distances.
- Enhanced rule engine resource page to support yard distance selection.
- Updated contracts and train builder pages to handle new yard distance logic.
- Added error handling utility for better error message extraction.
2026-07-21 08:50:50 +00:00
Hagernesh Tadesse
627b7b86f2 Merge pull request #867 from Tria-plc/testfixes
Onsite truck
Fixed
The page now lists every truck assigned to a booking that hasn't departed, both haulage paths, tagged:

On site — arrived, not departed (green)
Inbound — assigned, not yet arrived (grey)
2026-07-21 11:50:15 +03:00
Hagernesh Tadesse
828a52312e Merge pull request #866 from Tria-plc/dev
Trucks onsite
2026-07-21 11:45:47 +03:00
Sennay
803f721746 Merge pull request #865 from Tria-plc/fix/add-source-maps
Fix/add source maps
2026-07-21 11:32:50 +03:00
SennayT
4914288c03 Enable source maps in Node command for better stack trace debugging 2026-07-21 08:30:52 +00:00
Hagernesh
2397c6bca4 fix(warehouse): show assigned trucks on the Trucks on Site page, not only arrived ones
The page filtered on arrived_at IS NOT NULL, so a truck appeared only once the
warehouse receive flow stamped its arrival. Assigned trucks that had not yet
reached the yard were invisible, which left the page empty whenever nothing had
been received — every assigned truck was missing.

It now lists every truck assigned to a booking that has not departed, from both
haulage paths, tagged INBOUND (assigned, not yet arrived) or ON_SITE (arrived).
A scope toggle filters between them, dwell time shows only once a truck has
actually arrived, and the KPI count on the dashboard stays strict (arrived only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 08:24:39 +00:00
Hagernesh Tadesse
1075ab4269 Merge pull request #864 from Tria-plc/testfixes
feat(export): gate receive on payment and loading on received + GRN
2026-07-21 11:08:27 +03:00
Hagernesh
1fe8c2fd8e feat(export): gate receive on payment and loading on received + GRN
Three export rules that the flow left open.

An unpaid export booking could be received at the warehouse. Receiving is
what starts storage and mints a GRN, so it must not happen against cargo the
customer has not settled. receive() now rejects an unpaid EXPORT booking.
Import is untouched — it arrives OFF a train and its receive is the unload,
so gating that on payment would strand cargo already at the yard.

An allocated export booking could be marked loaded onto its train without
ever reaching the warehouse. An allocation is a plan; the GRN is the proof
the goods are in hand. Two loading paths skipped that check — the per-yard
loadBooking and the workspace confirmScheduleLoading — and both now require
every export booking to be received with a GRN first, however it arrived
(first-mile or the customer's own truck) and whatever it is allocated to.
The rule lives in one shared guard (assertExportReceivedWithGrn) so the two
paths cannot drift.

Export self-haul without a first-mile leg already worked and is unchanged:
assertSelfHaulPaid allows a customer truck when there is no EDR mile leg and
the booking is paid, and addTruck applies the same one-40ft-or-two-20ft rule
to containers and the tonnage drawdown to bulk, exactly as import does.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 08:01:32 +00:00
Nathnael Wondisha
f8dd7d8431 Merge pull request #863 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-21 10:44:18 +03:00
Nathnael
af171974f8 Merge branch 'dev' into freight/feat/fixes-v1 2026-07-21 07:36:09 +00:00
Nathnael
fd5aedcec7 feat(companies): per-document change requests and resubmission review queue
Two review-workflow gaps for freight customer onboarding:

Request for change per document. Backoffice can now flag a single uploaded
document (company document, profile licence, or POA delegation letter) with a
note the customer sees, instead of rejecting the whole role over it. Adds
review_status/review_note/reviewed_by/reviewed_at to freight.files (migration
AddFileReviewStatus, partial index for the gate), a POST
documents/:fileId/request-change endpoint, the backoffice action + modal, and a
portal banner/badge so the customer knows what to re-upload. Re-uploading clears
the flag. Approving a role is blocked while any of its documents has an open
correction; the gate check and the status write share a pessimistic write lock
on the company row (as does the change-request write) so a correction can never
slip in between the check and the profile going Active.

Resubmission is visible to reviewers. When a customer resubmits a rejected role
or amends a change request, backoffice staff are notified (allBackoffice inbox
item, deep-linked to the customer) and the resubmission surfaces in a new
"Pending changes" list view + KPI, since such companies are status = active and
never matched the pending-approval filter.
2026-07-21 07:34:40 +00:00
Nathnael
1cfc0f0fa8 fix(onboarding): stop duplicate company-document upload on finalize
The documents step of CompanyProfileForm uploads company documents via
onUploadDocuments() and then triggers submit synchronously in the same
nextStep() call. The setDocumentFiles({}) that clears the staged files has
not re-rendered by the time finishMutation's closure runs, so reading
documentFiles there re-sent the exact same files and created a duplicate
row per document.

Drop the company-document upload from finishMutation — the documents step
already persisted them. Licenses stay, since they have no auto-upload path.
2026-07-21 07:34:20 +00:00
Hagernesh Tadesse
2a35ee97fa Merge pull request #862 from Tria-plc/testfixes
auto generate grn on import arrival unloading
2026-07-21 10:31:08 +03:00