Commit Graph

32 Commits

Author SHA1 Message Date
Marshal
4c549029fe feat(clearance): preview charge documents before and after upload 2026-08-21 07:04:22 +00:00
Marshal
40904049cf feat: implement consolidation approval process for shared-wagon bookings
- Add migration for consolidation approvals table and status enum
- Create ConsolidationApprovalService to handle approval logic
- Implement repository for managing consolidation approvals
- Add entity for consolidation approval with necessary fields
- Develop frontend components for displaying and managing consolidation approvals
- Create tests for consolidation approval service to ensure correct behavior
2026-08-18 13:17:55 +00:00
marshalyordanos
5da36eb128 feat: add wagon usage computation and maintenance logging features
- Implemented  utility to calculate wagon usage metrics for train schedules.
- Created  for sending wagons to maintenance with optional notes.
- Added unit tests for train builder maintenance functionalities, including formatting train run labels and building maintenance notes.
- Developed  component for merging train schedules with detailed previews and reasons for merging.
- Introduced  component for selecting wagons with search functionality and selection limits.
- Created  for displaying and filtering audit logs, including detailed views of individual log entries.
- Added  for handling API interactions related to audit logs, including fetching logs and entity types.
2026-08-12 09:36:50 +03:00
Marshal
b17a72c280 New Transit Agents admin table (name, valid-from/to, active/suspended, validity badge) — DJ assign step now picks from it, active+valid only. 2026-07-29 05:38:35 +00:00
Marshal
2429f6b629 implement contract cancellation feature and update contract statuses
- Added functionality to cancel contracts, allowing users to provide a reason for cancellation.
- Updated contract statuses to include SUSPENDED and changed CLOSED to COMPLETED.
- Enhanced the UI to reflect the new cancellation option and updated messaging for contract statuses.
- Refactored contract booking actions to accommodate changes in booking logic for ONE_TIME and GENERAL contracts.
- Removed clearance document management from the contract detail page, as it is now handled per booking.
- Introduced a SQL script to reset bookings and train schedules for development purposes.
2026-07-28 05:02:58 +00:00
Marshal
5e10c97294 add dispute functionality for contract duty and implement collection dates 2026-07-26 16:58:51 +00:00
Marshal
9a1c8e5603 feat: add hazardous goods declaration feature
- Introduced HazardDeclarationPanel component to display dangerous goods declaration details.
- Updated URL constants to include CLEARANCE_PROCEED endpoint for re-requesting operations.
- Enhanced permissions to include hazardous approval roles for contract approvals.
- Integrated HazardDeclarationPanel into ContractRequestDetailPage and ContractClearanceDetailPage.
- Added proceedToOperation method in bookings service for handling operation re-requests.
- Updated contract forms and schemas to include hazard class and UN number fields.
- Implemented validation for hazardous contracts in the contract creation flow.
- Added expiry notice functionality for contracts nearing validity end.
- Created tests for expiry notice calculations and labels.
- Updated UI components to reflect hazardous cargo information and validation errors.
2026-07-25 21:10:09 +00:00
Marshal
15a6bab5d0 revert back the clerance payment 2026-07-23 13:54:09 +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
e22b336e8c Refactor clearance terminology to document approval across services and UI components 2026-07-20 07:46:38 +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
Marshal
fc44eee25e implement update train details feature: add DTO, service method, and UI modal for editing train name and run numbers 2026-07-15 20:14:39 +00:00
Marshal
957a185a4d enhance contract clearance and train scheduling logic; add filters for clearance documents and improve booking validation 2026-07-13 21:40:10 +00:00
Marshal
95b17b2729 enhance booking and contract management features
- Added support for comma-separated ops-clearance lifecycle statuses in contracts service.
- Display reference number in Upcoming Windows section if available.
- Updated badge label for document requirements in constants.
- Improved logic for identifying phased bookings in BookingClearanceWorkflowBanner.
- Introduced tabs in ReadonlyBookingView for better organization of booking details.
- Enhanced KeyFactsStrip to reflect the general nature of drawdown bookings.
- Updated status titles and descriptions for clarity in StatusHero and constants.
- Added contractKind field to IBooking interface for better identification of booking types.
- Created DocumentsTab component to manage and display all relevant documents for bookings.
2026-07-13 06:43:17 +00:00
Marshal
e7e5b93ffc add customs clearing filter and enhance clearance documents page for non-customs contracts 2026-07-12 14:14:21 +00:00
Marshal
05b13e84a8 enhance booking and contract notification systems
- Added detailed logging for socket connection events in useBookingWindowSocket.
- Introduced new notification types for contract status and schedule updates.
- Updated notification visuals to include new icons for contract status.
- Enhanced notification href resolution for contract status and schedule updates.
- Implemented booking lifecycle notifier service for customer and staff notifications.
- Created contract notifier service for managing contract lifecycle notifications.
- Added end-to-end tests for booking window socket functionality.
2026-07-06 21:03:08 +00:00
Marshal
145240d3bd refactor: remove gate pass granting logic from clearance services and UI
- Removed the gate pass granting functionality from the BookingClearanceService and ContractClearanceService, replacing it with a new method to retrieve gate pass status from train schedules.
- Updated the ContractsController to eliminate endpoints related to gate pass granting.
- Refactored the UI components (ExportClearanceStepper and PhasedClearanceActionPanel) to reflect the new gate pass securing process, linking to the train scheduling interface instead.
- Cleaned up related constants and query hooks, removing unused code and references to the gate pass functionality.
- Adjusted types in the contracts to accommodate changes in the gate pass handling logic.
2026-07-04 07:43:03 +00:00
Marshal
85c2fd1428 feat: enhance contract clearance process with linked booking details
- Added  and  to  for better visibility of GL-created shipment bookings.
- Implemented  method in  to fetch the latest clearance phase for contracts, improving list responses.
- Introduced  property in the  entity to store the latest clearance cycle's phase.
- Updated  to surface linked booking information in the clearance view.
- Created  component to display detailed container information in booking details.
- Refactored booking actions to remove contract-related actions from the booking request page.
- Enhanced the  component to reflect the current phase of clearance actions.
- Updated UI components to provide clearer messaging regarding the status of clearance and linked bookings.
- Adjusted action handling in  to include duty payment actions.
- Improved the  to show hints for each phase of the clearance process.
2026-07-03 21:04:46 +00:00
Marshal
8d056c5014 finalize gl flow for import 2026-07-02 18:15:16 +00:00
Marshal
dd47068a4b finilize gl flow for export 2026-07-02 17:55:59 +00:00
Marshal
fe40d9f4be update import gl flow 2026-07-02 13:24:39 +00:00
marshal
4fefe4f827 finilize gl 2026-07-02 12:06:17 +03:00
marshal
9c18d086d7 changes 2026-07-01 20:55:17 +03:00
marshal
612df8daff Enhance clearance milestone management and introduce new contract actions
- Added new milestones for 'Transit Permit Uploaded' and 'Export Transport Document Issued' in the clearance milestone catalog.
- Implemented methods in ClearanceMilestoneService to skip milestones and complete them with metadata.
- Updated ContractBookingService to check boundary conditions before booking creation.
- Introduced new endpoints in ContractsController for uploading customs declarations, advising duty, and handling various document uploads.
- Enhanced the UI to support new clearance actions and display relevant components based on milestone statuses.
2026-07-01 10:20:16 +03:00
marshal
ccd5d6de31 Implement contract document download functionality and enhance clearance review status checks
- Added methods to assert clearance reviewable, finalizable, and uploadable statuses in the ContractClearanceService.
- Introduced a new endpoint in ContractsController for downloading contract PDFs.
- Implemented download functionality in the contracts service for both backoffice and portal applications.
- Updated UI components to include download buttons for contract PDFs in relevant pages.
- Enhanced contract request and view pages to support contract document downloads.
2026-07-01 07:27:53 +03:00
Marshal
01172daaa5 feat: enhance contract clearance functionality and UI, update routing and status handling 2026-06-28 21:02:37 +00:00
Marshal
7af2ecc76e add clearance history and operations history endpoints, update UI components for history view 2026-06-28 19:08:30 +00:00
Marshal
11c7f1bb74 add quantity cap for GENERAL contracts and implement capacity tracking
- Updated ContractClearanceService and ContractsController to remove region parameter from queue method.
- Enhanced ContractsRepository to attach contract files for download and added attachContractFiles method.
- Modified ContractsService to persist cargo scope with quantity cap based on contract kind.
- Introduced quantityCap field in CreateContractCargoScopeDto and ContractCargoScope entity.
- Implemented capacity tracking in the frontend with ContractCapacityNotice component to display remaining bookable quantities.
- Updated various components and services to support new capacity features, including hooks and API calls.
- Added migration to include quantity_cap column in contract_cargo_scope table.
2026-06-28 17:32:18 +00:00
Marshal
2de1c2e7be feat: enhance contract detail page with document grouping and clearance modal
- Added functionality to group contract documents into categories: Contract, Profile, and Clearance.
- Implemented a modal for uploading and managing clearance documents.
- Created a new ActionNeededSection component to display pending customer actions.
- Introduced deriveActionItems function to generate actionable items based on contract and booking statuses.
- Developed ContractClearancePanel for handling clearance document uploads and reviews.
- Added support for ad-hoc document uploads in the clearance panel.
2026-06-28 15:25:22 +00:00
Marshal
7a2a55d94b Enhance contract clearance features with review timestamps and staff identifiers; improve file handling in controllers and views for better user experience. 2026-06-27 19:30:42 +00:00
Marshal
e977893888 Implement comprehensive Global Logistics workflow for Unimodal Export and Import processes, including contract verification, documentation submission, compliance management, customs clearance, payment settlement, and last-mile transport handling. 2026-06-27 18:54:03 +00:00
Marshal
01d53c218c contrat,booking,global logestic 2026-06-26 23:24:48 +00:00