Commit Graph

4994 Commits

Author SHA1 Message Date
marshal
6a48d9f490 Merge pull request #1403 from Tria-plc/dev
dev
2026-08-23 22:04:05 +03:00
marshal
d285006114 Merge pull request #1402 from Tria-plc/freight_feature/usermanagement
add draft declaration
2026-08-23 22:03:22 +03:00
Marshal
31fa313c66 add draft declaration 2026-08-23 19:02:33 +00:00
marshal
8547b5bb5f Merge pull request #1401 from Tria-plc/staging
Staging
2026-08-23 08:06:44 +03:00
marshal
31a4c89b80 Merge pull request #1393 from Tria-plc/dev
dev
2026-08-23 08:02:13 +03:00
marshal
74bca8bb5e Merge pull request #1400 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-23 08:01:23 +03:00
Marshal
58f88b74f8 add contract link 2026-08-23 05:00:43 +00:00
Marshal
716444e60a feat: add pagination to schedule history and consolidation approvals
- Implemented pagination in ScheduleHistoryPanel to manage large history entries.
- Updated API to support pagination parameters for schedule history.
- Enhanced ConsolidationApprovalsPage with tabbed navigation and pagination for approval rows.
- Introduced new types for paginated responses in bookings and train scheduling services.
- Added a database migration to create an index on wagon_booking_allocations for performance improvements.
2026-08-23 04:51:34 +00:00
Marshal
e2189040fa feat: add pagination to schedule history and consolidation approvals
- Implemented pagination in ScheduleHistoryPanel to manage large history entries.
- Updated API to support pagination parameters for schedule history.
- Enhanced ConsolidationApprovalsPage with tabbed navigation and pagination for approval rows.
- Introduced new types for paginated responses in bookings and train scheduling services.
- Added a database migration to create an index on wagon_booking_allocations for performance improvements.
2026-08-23 04:49:58 +00:00
marshal
105879b531 Merge pull request #1399 from Tria-plc/freight_feature/usermanagement
feat(train-scheduling): mid-route consist changes, audit history, saf…
2026-08-23 06:59:27 +03:00
Marshal
8e6fc09aac feat(train-scheduling): mid-route consist changes, audit history, safer workspace
- planned couples: loose wagons join the train at a route stop, added
  from the schedule yards tab; capacity credits them per corridor edge
  and coupling validates locomotive weight/length caps per leg
- real-cut toggle: a cut wagon permanently leaves the train build at
  its cut yard (soft cut still sits out one trip only)
- fix heaviest-leg display counting a shared slot's full cargo on
  every spanned edge (phantom pull-weight overload on S-2026-00045)
- confirmation dialogs for workspace add/load/unload/remove actions
- train-builder History and Detached-wagons tabs, backed by paginated
  endpoints; builder detaches now always write adjustment-log rows

Migrations 3660 (planned_wagon_couples, planned_wagon_real_cuts) and
3670 (adjustment log train_schedule_id nullable) — both applied to the
dev DB by hand; watch mode does not run migrations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 03:55:54 +00:00
Hagernesh Tadesse
36b24a3a1b Merge pull request #1398 from Tria-plc/credit-invoice
Permission guard Load Unload
2026-08-22 12:24:13 +03:00
Hagernesh
7f5e8349da Intercity andd import export gating 2026-08-22 09:17:28 +00:00
Hagernesh
e426e0c16e feat(train-scheduling): dedicated load/unload permissions
Carves cargo load/unload confirmation out of the coarse
trainScheduling.update permission into its own guard
(TrainSchedulingLoad/TrainSchedulingUnload), covering import, export,
and intercity — the generic per-booking route already serves all
directions, and the intercity-specific route gets the same two keys.
Adds the catalog entries and grants them to operationsOfficer/director
alongside the existing .update grant so current access is unchanged.
2026-08-22 09:17:28 +00:00
Stephanos A.
50f442a414 Merge pull request #1397 from Tria-plc/alpha
Alpha
2026-08-22 11:21:04 +03:00
Stephanos A
1be2cadf0e Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-08-22 11:18:30 +03:00
Stephanos A
81f7c0f0cd feat: coach utilization report with schedule filtering and export functionality 2026-08-22 11:17:58 +03:00
Abubeker Yasin
c6c4fcf0cf Merge pull request #1396 from Tria-plc/alpha
fix: ( passenger-portal ) fix payment amount on booking confirmation
2026-08-22 10:49:51 +03:00
Abubeker Yasin
3d741ab928 fix: ( passenger-portal ) fix payment amount on booking confirmation 2026-08-22 10:48:34 +03:00
Stephanos A.
9d8cce84a7 Merge pull request #1395 from Tria-plc/alpha
fix: change schedule listing order from ascending to descending by de…
2026-08-22 10:27:04 +03:00
Stephanos A
6ce4e13b4a fix: change schedule listing order from ascending to descending by departure time 2026-08-22 10:22:32 +03:00
marshal
41b8367638 Merge pull request #1394 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-22 09:27:19 +03:00
Marshal
ba89b670c8 fix issue 2026-08-22 06:26:43 +00:00
marshal
12b537ef90 Merge pull request #1392 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-22 09:17:41 +03:00
Marshal
722874203b fix issue 2026-08-22 06:09:36 +00:00
marshal
519cdee90a Merge pull request #1391 from Tria-plc/dev
dev
2026-08-22 04:54:01 +03:00
marshal
8923c2416c Merge pull request #1390 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-22 04:31:27 +03:00
Marshal
3455c1b3b4 fix issue 2026-08-22 01:29:44 +00:00
marshal
f4115f658d Merge pull request #1389 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-22 04:24:35 +03:00
Marshal
1ab2cfdb3b fix issue 2026-08-22 01:23:50 +00:00
marshal
43590c6042 Merge pull request #1388 from Tria-plc/dev
dev
2026-08-22 03:51:12 +03:00
marshal
e2dd761203 Merge pull request #1387 from Tria-plc/freight_feature/usermanagement
fix issue
2026-08-22 03:50:34 +03:00
Marshal
b6c1efa043 fix issue 2026-08-22 00:49:53 +00:00
marshal
78cbb6b87f Merge pull request #1386 from Tria-plc/dev
dev
2026-08-22 03:11:57 +03:00
marshal
b6a01e9635 Merge pull request #1385 from Tria-plc/freight_feature/usermanagement
changes
2026-08-22 03:10:29 +03:00
Marshal
bad418d79e changes 2026-08-22 00:09:00 +00:00
marshal
4c9fba32f2 Merge pull request #1384 from Tria-plc/dev
dev
2026-08-22 02:36:04 +03:00
marshal
1816fe41f3 Merge pull request #1383 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-22 02:33:08 +03:00
Marshal
bf4d0632f1 changes 2026-08-21 23:31:24 +00:00
Marshal
c48e9b8905 fix issue and add consolidation 2026-08-21 23:28:59 +00:00
marshal
ed57490575 Merge pull request #1382 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
2026-08-22 02:17:34 +03:00
Marshal
49b0495e8e Merge branch 'freight_feature/usermanagement' of github.com:Tria-plc/edr-platform into freight_feature/usermanagement 2026-08-21 23:16:26 +00:00
Marshal
09deecd04c fix issue and add consolidation 2026-08-21 23:16:06 +00:00
Nathnael Wondisha
a0822f9d4f Merge pull request #1381 from Tria-plc/freight/nati-2
Freight/nati 2
2026-08-21 22:48:14 +03:00
Nathnael
47a0ba5ee6 fix: pos seeder 2026-08-21 19:26:35 +00:00
Stephanos A.
6de2cc17cc Merge pull request #1380 from Tria-plc/alpha
Alpha
2026-08-21 18:28:05 +03:00
Stephanos A
e84c2edae9 Merge branch 'alpha' of github.com:Tria-plc/edr-platform into alpha 2026-08-21 18:26:54 +03:00
Stephanos A
d2a942ffbf feat: add contact phone overrides for payment links in excess baggage and supplementary charges 2026-08-21 18:26:38 +03:00
ghost2023
53e4b93ac9 test(reports): pin the receivable/payable ledger sides
Guards the two facts the report exists to get right: the cancellation
fee is never a payable, and exactly one wagon-cancellation status
(CREDIT_AVAILABLE) is a live liability. Adding a status to
WAGON_CANCELLATION_STATUSES now fails here until someone decides which
side of the ledger it lands on.

Also pins the sort expressions to the union wrapper alias — a branch
alias would resolve at build time and 42P01 at runtime, since the runner
appends ORDER BY outside the subquery.
2026-08-21 17:49:02 +03:00
ghost2023
6d113ca00c fix(reports): classify receivables and payables by real money flow
The receivable/payable split contradicted how money actually moves, in
three ways that each changed a headline number:

- The wagon-cancellation FEE was booked as a payable. It is money the
  customer owes EDR (raised ISSUED and unpaid at request time), so it
  belongs on the receivable side while open. The sign was inverted.
- A whole-booking wagon cancellation was booked at the source invoice's
  full paid_amount, and never cleared: the booking stays CANCELLED and
  the invoice stays PAID even after the credit is rebooked. The real
  liability is the ledger row's credit_amount, and only while it sits in
  CREDIT_AVAILABLE — cancellation refunds no cash, it hands back
  bookable credit redeemed by creating another booking.
- Shipping-line debt in UNBILLED has no invoice row at all, so an
  invoice-only fact table could not see it. That is the un-batched half
  of the debt, in the report whose stated purpose is shipping-line
  credit.

The report is now a UNION of the three tables that hold the answer:
invoices with a balance (plus prepayments against dead bookings),
UNBILLED shipping_line_credits, and CREDIT_AVAILABLE
booking_wagon_cancellations. A booking already carried by the
cancellation ledger is excluded from the invoice branch so its money is
counted once. Fully settled invoices are dropped — zero exposure is
neither a receivable nor a payable.

Branches are re-projected through an explicit column list before being
unioned: UNION matches by position and TypeORM does not preserve
addSelect order, which silently reordered one branch into
"gross, exposure, side_key, ..." and failed with "UNION types text and
numeric cannot be matched".

Verified against Postgres with a rollback-only fixture covering every
side, plus EXPLAIN over each filter combination and every sortable
column.
2026-08-21 17:47:41 +03:00