Commit Graph

3538 Commits

Author SHA1 Message Date
Nathnael
ccd9afacb1 feat: setup forget password to the backoffice 2026-07-20 11:41:57 +00:00
Nathnael
149548a9b1 chore: packages 2026-07-20 11:41:57 +00:00
Nathnael
4b4a4ce788 feat: setup the attachment to the passenger clients 2026-07-20 11:41:57 +00:00
Nathnael
779af4c348 feat: setup the attachment to the passenger api 2026-07-20 11:41:57 +00:00
Nathnael
59cecd44e7 chore: chat types update 2026-07-20 11:41:57 +00:00
Nathnael
9fbe1c5236 feat: setup attachment to the freight chat 2026-07-20 11:41:57 +00:00
Nathnael
5bf82bf531 fix: notify the backoffice of new booking 2026-07-20 11:28:18 +00:00
Nathnael
6420c72e89 feat(auth): implement staff-triggered password-reset links 2026-07-20 11:20:50 +00:00
marshal
bb068d38d1 Merge pull request #834 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-20 13:52:55 +03:00
Marshal
eb532399d9 changes 2026-07-20 10:52:20 +00:00
Nathnael Wondisha
bed1208dee Merge pull request #833 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-20 11:26:30 +03:00
Nathnael
03e21d104c fix: type error in portal 2026-07-20 08:25:54 +00:00
Nathnael Wondisha
f41463748d Merge pull request #788 from Tria-plc/freight/feat/chat-app
Freight/feat/chat app added attachment
2026-07-20 11:23:16 +03:00
Nathnael
2c7a4b7112 Merge branch 'dev' into freight/feat/fixes-v1 2026-07-20 08:20:34 +00:00
Nathnael
a45e1008fa fix: normalized the region and logged the otp properly 2026-07-20 08:19:59 +00:00
Hagernesh
c1c362ab9d fix(mile): only send bookings that bought EDR haulage to the mile queues
The rule that a customer's own truck and an EDR road leg are alternatives
existed on the truck side only (CustomerTruckService.assertSelfHaulPaid).
LastMileService had no counterpart: create checked payment and nothing else,
so any paid booking could be accepted into the queue. A booking took a
customer truck at 06:42 and an EDR last-mile leg with a real EDR truck at
06:47, neither side aware of the other, on a contract that had chosen no
road legs at all.

The road legs are chosen on the contract and copied onto the booking, and
the pickup/delivery address is the only per-booking record of that choice.
service_types cannot serve: every type ships with includes_first_mile and
includes_last_mile set to true, so reading them would mean no booking could
ever self-haul. That same always-true flag had already killed the first-mile
guard, whose `address || serviceType.includesFirstMile` admitted every paid
export booking.

One shared rule now answers it for both sides, so the two halves cannot
drift apart again: last-mile create rejects a booking that chose no road
legs and one already carrying a customer truck; first-mile no longer honours
the service-type flag; the customer-truck guard reads the same helper.

Existing legs are untouched — the guards are on creation, so the one booking
already carrying both needs a human to reconcile it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 08:03:16 +00:00
Marshal
e22b336e8c Refactor clearance terminology to document approval across services and UI components 2026-07-20 07:46:38 +00:00
Nathnael
c7195f077a fix: 194 and 183 plane takss 2026-07-20 07:41:25 +00:00
Hagernesh Tadesse
d51e2e4042 Merge pull request #832 from Tria-plc/intercity-load-unload
feat(clearance): keep an audit trail of customs risk reassignments
2026-07-20 10:18:03 +03:00
Hagernesh
2906c6bb45 test(train-scheduling): cover the checkpoint backdating guard on the DTO
The IsNotBackdated validator was covered in isolation, but not on the DTO
that actually carries it. Asserts a backdated occurredAt is rejected, that
"now" passes, and that omitting the field still validates so the service can
stamp it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 07:13:52 +00:00
Hagernesh
536d6043c2 fix(clearance): allow customs risk to be corrected and keep the trail
RiskStep returned early to a badge as soon as a risk level existed, so the
control was unreachable and a mis-assigned level could never be corrected.
Both the server and the sibling AssignRiskCard treat risk as correctable
until duty is advised off it — completeWithMetadata has no already-completed
guard and overwrites metadata.riskLevel. RiskStep was stricter than either.

It now keeps the control mounted alongside the assigned badge, offers
"Reassign risk", and locks to badge-only once DUTY_TAXES_ADVISED completes.
The control also reads the persisted level (it was hardcoded to GREEN, so
unhiding it alone would have misreported the assignment), and the T1 gate is
skipped once a level exists, since risk cannot be assigned without a closed
T1 and stale T1 data must not hide the badge.

Correcting a level previously left no record of the old value, who changed
it, or when — thin ground for a customer-visible level that may be disputed.
assignRisk now appends each decision to metadata.riskHistory: the level, the
level it replaced, the timestamp, the user id, and a display name resolved
at assignment time so the trail shows a person rather than a UUID. riskLevel
still carries the current value and always equals the last entry, so
existing consumers are unchanged.

History lives on the existing metadata JSONB column, so no migration is
needed, and the logic sits in assignRisk rather than the shared
completeWithMetadata that adviseDuty and others also use. Re-picking the
level already in force is not recorded — it changed nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 07:13:52 +00:00
Hagernesh
21df861979 back date validator 2026-07-20 07:13:52 +00:00
Hagernesh
c0fdffa7ef Marshalling document empty wagon rendering 2026-07-20 07:13:52 +00:00
Hagernesh
eb998bfddd Facility 2026-07-20 07:13:51 +00:00
Hagernesh
ee6ad7da8b Auto arrival train 2026-07-20 07:13:51 +00:00
Hagernesh
a5973de6e1 feat(intercity): a facility only handles the cargo its equipment can lift
Containers need a reach stacker or gantry, so only Indode, Modjo and Dire Dawa
take them. Bulk needs far less and is handled at all five facilities. Having a
facility was previously enough to load anything, so a container booking through
Sebeta or Adama would have been accepted and then had nothing to lift it.

- yard_facilities gains handles_container / handles_bulk, both defaulting true so
  a facility handles everything unless told otherwise; the seeder states the real
  capability.
- The intercity gate now refuses cargo a facility cannot lift, saying which type,
  not just "no facility". canHandleFreight keeps that rule in the resolver so
  callers cannot get it subtly wrong.
- The intercity list resolves each end against the booking's own freight type, so
  the view flags a container booking routed through a bulk-only yard while the
  train is still coming rather than when the load is refused.

Import/export untouched — the gate is still DOMESTIC-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 07:13:51 +00:00
marshal
096e69ba43 Merge pull request #831 from Tria-plc/freight_feature/usermanagement
Add train deactivation feature and import train number management
2026-07-20 10:06:21 +03:00
Marshal
771aa2a605 Add train deactivation feature and import train number management
- Introduced DEACTIVATED status for trains, allowing staff to park trains indefinitely.
- Implemented methods to deactivate and reactivate trains in the TrainBuilderService.
- Added UI components for train deactivation and reactivation in TrainBuilderDetailPage.
- Created a dropdown setting for admin-managed import train numbers, with corresponding migrations.
- Updated yard code length to accommodate soft-delete suffix.
- Enhanced train status handling to include DEACTIVATED state.
2026-07-20 07:04:23 +00:00
Nathnael
3d4996e4df feat: setup forget password to the backoffice 2026-07-20 06:19:12 +00:00
marshal
2e52bb6fc8 Merge pull request #830 from Tria-plc/freight_feature/usermanagement
Enhance cargo description handling in contract forms
2026-07-20 09:11:45 +03:00
Marshal
ab355d0e16 Enhance cargo description handling in contract forms 2026-07-20 06:10:50 +00:00
marshal
a263cade24 Merge pull request #829 from Tria-plc/freight_feature/usermanagement
changes
2026-07-20 08:54:09 +03:00
Marshal
bac0fa7f48 changes 2026-07-20 05:51:21 +00:00
marshal
5d94e8acf2 Merge pull request #828 from Tria-plc/dev
freight deployment
2026-07-20 06:09:16 +03:00
marshal
721245cdc0 Merge pull request #827 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-07-20 06:08:31 +03:00
Marshal
8354804505 Merge branch 'main' of github.com:Tria-plc/edr-platform into freight_feature/usermanagement 2026-07-20 03:07:42 +00:00
marshal
f672d66a92 Merge pull request #826 from Tria-plc/freight_feature/usermanagement
changes
2026-07-20 06:06:06 +03:00
Marshal
4969f62896 changes 2026-07-20 03:05:28 +00:00
Stephanos A.
13e9b1622b Merge pull request #825 from Tria-plc/quick-fix-main
Reports (overall, seats report, passenger export) updates
2026-07-20 00:42:46 +03:00
Stephanos A.
8d7a914ab7 Merge branch 'dev' into quick-fix-main 2026-07-20 00:42:25 +03:00
Stephanos A.
e683ed50b9 Merge pull request #824 from Tria-plc/quick-fix-main
Reports (overall, seats report, passenger export) updates
2026-07-20 00:39:59 +03:00
Stephanos A
c62491b236 Reports (overall, seats report, passenger export) updates 2026-07-20 00:37:10 +03:00
robiman
efa3c218fe Merge pull request #823 from Tria-plc/alpha
Include coach number to voucher
2026-07-20 00:22:00 +03:00
Roba Boru
3293040438 Merge branch 'main' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-20 00:19:31 +03:00
Roba Boru
f5cbf512ea Merge branch 'dev' of https://github.com/Tria-plc/edr-platform into alpha 2026-07-20 00:17:32 +03:00
Stephanos A.
594e56b042 Merge pull request #822 from Tria-plc/quick-fix-main
Search schedule update
2026-07-19 23:58:35 +03:00
Roba Boru
c31a337a98 Include coach number to voucher 2026-07-19 23:58:14 +03:00
Stephanos A
57390647d8 Search schedule update 2026-07-19 23:57:16 +03:00
Stephanos A.
225f5df10e Merge pull request #821 from Tria-plc/quick-fix-main
Passenger list report filter updates
2026-07-19 22:53:18 +03:00
Stephanos A
8e84fcebd5 Passenger list report filter updates 2026-07-19 22:52:23 +03:00