Commit Graph

39 Commits

Author SHA1 Message Date
Marshal
ed3c8307bb refactor(train-scheduling): rename and restructure container movement logic 2026-07-21 23:49:10 +00: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
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
21df861979 back date validator 2026-07-20 07:13:52 +00:00
Marshal
3a1a08b1e1 add lashing surcharge for cargo types with hasLashing flag
add lashing surcharge for cargo types with hasLashing flag
2026-07-17 23:25:53 +00:00
Marshal
801872c106 fix rate edit 2026-07-17 10:15:26 +00:00
Marshal
e8e12c1363 fix u=issue 2026-07-16 12:02:11 +00:00
Marshal
19c9da28ae changes 2026-07-15 13:29:01 +00:00
Marshal
11771e5f92 remove reopen delay minutes from global rules and update related types
- Removed the  field from  and related components.
- Updated  to reflect the removal of the reopen delay input field.
- Modified  to include new train number fields:  and .
- Added  interface to manage active schedules with trade direction.
- Introduced  interface to track wagon shortages in bookings.
- Updated  logic to ensure consistent UI state representation.
- Created migrations to drop the  column and add  and  columns to the  table.
- Added tests for the new booking window display logic and wagon planning functionality.
2026-07-15 09:13:02 +00:00
Marshal
5cffe2860c fix train builder and consolidation 2026-07-14 13:49:39 +00:00
Marshal
6d0cf50b4d train 2026-07-14 11:06:49 +00:00
Marshal
4b7f6d2548 enhance contract and booking services with server-side search and validation improvements
- Added  parameter to  and  for server-side free-text search on contract reference, company name, and booking details.
- Introduced new validation errors in  for container clashes and space issues when creating bookings.
- Implemented paginated dropdown settings retrieval in .
- Updated  to fetch active yards using a new method that handles pagination.
- Enhanced  with a  method to fetch all records by walking through pages.
- Refactored  to support filtering and pagination in schedule listings.
- Improved  to return a paginated list of facilities.
- Updated UI components in  and  to utilize debounced search inputs for better performance.
- Added alerts in  to inform users about booking constraints related to splits and capacity.
- Enhanced  to display notifications for split bookings and capacity usage.
2026-07-12 10:51:31 +00:00
Marshal
e4429592d3 fix issues 2026-07-09 20:26:14 +00:00
Marshal
eb819d66a1 Enhance wagon capacity handling and validation in booking service
- Added default capacities for container and bulk wagons.
- Updated wagonsFor method to consider weight and length for wagon calculations.
- Improved handling of overweight bookings with appropriate warnings.
- Adjusted tests to reflect changes in wagon capacity and validation logic.
2026-07-09 13:10:32 +00:00
Marshal
fed5f2f43f implement intercity booking management and booking window websocket integration 2026-07-06 13:28:21 +00:00
Marshal
3e2299960a add script to seed freight contracts across flow variants 2026-07-05 18:06:24 +00:00
Marshal
3447394e32 add bookings management and settings 2026-07-05 10:22:58 +00:00
Marshal
93b8b69464 Add window close hour to booking desk configuration 2026-07-05 08:53:27 +00:00
Marshal
ff9cb4e6cd Merge branch 'dev' of github.com:Tria-plc/edr-platform into freight_feature/usermanagement 2026-07-03 18:48:18 +00:00
Marshal
a5c46505e3 Add migration to widen window_duration_hours precision and update related components for duration handling 2026-07-03 16:37:09 +00:00
Hagernesh
e2867e3086 import loading backend 2026-07-03 13:47:45 +00:00
Marshal
56de90892d Add booking window management and locomotive scheduling features
- Implemented migration to release stuck assigned locomotives.
- Added schedule window phases to train schedules.
- Created booking batch offers table for partial capacity bookings.
- Developed BookingSplitService to handle partial booking offers and splits.
- Introduced BookingWindowService to manage booking window lifecycle and transitions.
- Added BookingBatchOffer entity to represent offers made during booking splits.
- Enhanced locomotive options with warnings for scheduling.
- Created UpcomingWindowsSection component to display upcoming booking windows.
2026-07-03 03:36:06 +00:00
hagiye
14a00af341 train gate pass, Telebirr and Wafi 2026-07-01 16:23:52 +03:00
marshal
1c01c792fc merge conflict 2026-06-29 12:45:40 +03:00
Marshal
0f7cac2b68 add booking request functionality for GENERAL customs contracts
- Create migration for booking_requests table with necessary fields and indexes.
- Implement BookingRequestRepository for database operations related to booking requests.
- Develop BookingRequestService to handle business logic for submitting, accepting, rejecting, and canceling booking requests.
- Create DTOs for creating booking requests and reviewing them.
- Define BookingRequest entity to map to the booking_requests table.
- Add UI components for managing shipment requests, including detail and list pages.
- Implement OperationDatePicker component for selecting available shipment days.
2026-06-29 09:30:44 +00:00
hagiye
fee4365b70 Import operation gate pass 2026-06-27 21:04:27 +03:00
Marshal
e0c3044933 feat(train-sets): implement multi-locomotive support for train sets
- Added TrainSetLocomotive entity to link multiple locomotives to a train set.
- Updated TrainSet entity to include a OneToMany relationship with TrainSetLocomotive.
- Modified the train scheduling logic to require at least two locomotives for a train set.
- Enhanced the UI components to support selecting multiple locomotives.
- Introduced new permissions for viewing customs clearance.
- Updated migrations to create the train_set_locomotives table and backfill existing data.
- Implemented utility functions for managing train numbers based on cargo type and direction.
- Added tests for train number utilities to ensure correct functionality.
2026-06-24 23:54:45 +00:00
Marshal
421e0266bc feat(train-scheduling): implement day-level booking pool
- Added `unplaced` method in `BookingNotifierService` to log warnings for bookings that cannot be placed on any train.
- Introduced `getAvailableDays` method in `TrainSchedulingService` to retrieve distinct days with open departures for a given route.
- Created `AvailableDaysQueryDto` for querying available days based on origin and destination yards.
- Updated `TrainSchedulingController` to expose an endpoint for available days.
- Modified frontend components to support day-level booking, allowing customers to select only a day without pinning to a specific train.
- Removed references to train schedules in booking forms and review steps, emphasizing day selection.
- Added a database migration to create an index for efficient querying of bookings by route and day.
2026-06-18 14:12:46 +00:00
marshal
87b0ce6339 Replace wagon/locomotive readiness with yard tracking, assign unassigned bookings from origin-yard fleet, standardize rates on USD with CBE ETB conversion, and update fleet/scheduling UI 2026-06-14 02:13:08 +03:00
Marshal
b73bf2154e add detail batch and allocation monitoring page 2026-06-13 18:28:39 +00:00
marshal
ef0abf1c41 auto allocation and batch managemnt, tracking the train 2026-06-12 11:42:46 +03:00
Marshal
132f2150a8 add cron jobs and aslo 2026-06-11 20:59:19 +00:00
Marshal
cde3e462ba automate the schedule 2026-06-11 19:42:23 +00:00
Marshal
088295d81f schedule logic 2026-06-10 09:22:57 +00:00
marshal
5774d7db9d booking operations and trains scheduling also allocations 2026-06-10 00:48:32 +03:00
Michael Abebe
b45421d2a2 feat(freight): changed the train schedule 2026-06-06 16:31:19 +03:00
Michael Abebe
e731051320 fix(freight): fixed some issues 2026-06-06 11:12:59 +03:00
hagiye
dc42838a43 Trains management CRUD issues solved 2026-06-05 21:07:04 +03:00
Michael Abebe
8b3aaad5fd feat(freight): basics of train scheduling 2026-06-04 16:50:38 +03:00