Commit Graph

3772 Commits

Author SHA1 Message Date
Marshal
f6e363cd6f fix gl steps 2026-07-29 07:32:26 +00:00
Marshal
dfde6b9021 Refactor EdrOrgSeeder 2026-07-29 06:28:42 +00: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
891311d861 let customers dispute booking duty/tax advice so GL Ethiopia can re-advise 2026-07-28 10:48:27 +00:00
Marshal
e1c831211f Pre-declaration Djibouti GL assignee request flow 2026-07-28 09:01:23 +00:00
Marshal
653d5782ee update body-parser implementation to use Nest's API and improve dependency handling 2026-07-28 07:21:04 +00:00
Marshal
7fcf3a7084 update body-parser implementation to use Nest's API and improve dependency handling 2026-07-28 06:33:26 +00:00
Marshal
c1c35e78d4 increase JSON body size limit, update awaiting shipment endpoint handling, and enhance contract document editor UI 2026-07-28 06:18:04 +00:00
Marshal
8319aad5c3 increase JSON body size limit, update awaiting shipment endpoint handling, and enhance contract document editor UI 2026-07-28 06:16:56 +00:00
Marshal
f40a079420 update contract document handling and improve clarity in UI messages 2026-07-28 05:51:24 +00:00
Marshal
8477de41a9 changes 2026-07-28 05:10:01 +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
481878e553 paginate wagons, locomotives and routes lists server-side 2026-07-27 21:27:36 +00:00
Marshal
496c66017f update locaomotive and fix wagon transfer issue 2026-07-27 20:34:14 +00:00
Marshal
deadc59277 fix: correct column name in orderBy clause for listRequests method 2026-07-27 14:44:16 +00:00
Marshal
15d78e1d67 fix issue 2026-07-27 05:59:49 +00:00
Marshal
773456c256 refactor DocReviewAlertButton and FreightDashboardHeader comments for clarity and accuracy 2026-07-27 05:07:09 +00:00
Marshal
bcf25538b6 add contract hazard declaration, DO collection dates, and booking request currency migrations; implement article body diff component and integrate into contract revision timeline 2026-07-26 19:14:39 +00:00
Marshal
5fa012cad3 add contract hazard declaration, DO collection dates, and booking request currency migrations; implement article body diff component and integrate into contract revision timeline 2026-07-26 19:09:01 +00:00
Marshal
af85f20789 add dispute functionality for contract duty and implement collection dates 2026-07-26 18:23:37 +00:00
Marshal
225d2c8229 add dispute functionality for contract duty and implement collection dates 2026-07-26 17:58:37 +00:00
Marshal
bfea9de660 add dispute functionality for contract duty and implement collection dates 2026-07-26 17:30:00 +00:00
Marshal
5e10c97294 add dispute functionality for contract duty and implement collection dates 2026-07-26 16:58:51 +00:00
Marshal
9b13fa2ac6 feat: implement wagon transfer management modals and page
- Add TransferFulfillModal for fulfilling wagon transfer requests.
- Create TransferRequestFormModal for filing new wagon transfer requests.
- Introduce TransferCloseShortModal for closing requests that cannot be fully fulfilled.
- Develop WagonTransfersPage to manage and display wagon transfer requests.
- Implement utility functions for handling wagon transfer request data and UI components.
- Enhance UI with Mantine components for better user experience.
2026-07-26 15:11:50 +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
fde5e6de4b add company stamp upload functionality for contract signing
- Introduced StampUpload component for uploading company stamp images.
- Integrated stamp upload in contract signing modal, supporting PNG and JPG formats.
- Implemented validation for file type and size (max 5 MB).
- Added visual feedback for drag-and-drop functionality.
- Updated contract-related pages to handle duplicate contract alerts and pricing notices.
- Enhanced contract expiry management with a nightly sweep service.
- Added unit tests for new features and updated existing tests for contract handling.
2026-07-25 17:14:58 +00:00
Marshal
54b5882355 changes 2026-07-25 06:05:20 +00:00
Marshal
286390a3cf change contrat creation 2026-07-24 13:26:19 +00:00
Hagernesh Tadesse
3da6ce4824 Merge pull request #952 from Tria-plc/intercity
Intercity
2026-07-24 15:12:01 +03:00
Hagernesh
2f124bc666 Intercity load unload with grn ,Warehouse , fleet , and allocation endpoints permission 2026-07-24 11:55:05 +00:00
Hagernesh
cf8a2e928d fix(warehouses): detention groups by canonical truck type
Join truck_types via vehicles.truck_type_id (normalized legacy
vehicle_type only as fallback) so type renames can't unmatch detention
rules and FK-less vehicles keep billing.
2026-07-24 11:55:05 +00:00
robiman
227a561e89 Merge pull request #950 from Tria-plc/alpha
Fix checkin time cutoff
2026-07-24 11:45:53 +03:00
Roba Boru
5a89e296d6 Fix checkin time cutoff 2026-07-24 11:37:52 +03:00
Sennay
7e50668737 Merge pull request #949 from Tria-plc/dev
merge dev to main
2026-07-24 09:47:26 +03:00
mulish77
ac9ba43bd3 Merge pull request #948 from Tria-plc/tests
Cut off time configuration
2026-07-24 09:02:25 +03:00
Muluhabt
7320c359d1 Cut off time configuration 2026-07-24 09:01:27 +03:00
Marshal
668b5e1c9d add permissions and fix issues 2026-07-23 20:24:20 +00:00
mulish77
114709c995 Merge pull request #947 from Tria-plc/tests
Tests
2026-07-23 20:15:42 +03:00
Muluhabt
64e1130f7d Commiting stop based booking 2026-07-23 20:11:11 +03:00
Muluhabt
8bba882710 Adding stop based booking configuration 2026-07-23 20:03:35 +03:00
Stephanos A.
ac4fdf03ba Merge pull request #946 from Tria-plc/alpha
Generate missing ticket and payment report currency updates
2026-07-23 19:51:13 +03:00
Stephanos A
84346d77ac Generate missing ticket and payment report currency updates 2026-07-23 19:39:39 +03:00
marshal
d603c0973d Merge pull request #944 from Tria-plc/freight_feature/usermanagement
changes
2026-07-23 17:31:29 +03:00
Marshal
40f16f3cec changes 2026-07-23 14:30:49 +00:00
marshal
d585351501 Merge pull request #943 from Tria-plc/freight_feature/usermanagement
changes
2026-07-23 17:20:24 +03:00
Marshal
127676055b changes 2026-07-23 14:18:24 +00:00
marshal
cf13c8d175 Merge pull request #942 from Tria-plc/freight_feature/usermanagement
revert back the clerance payment
2026-07-23 16:56:56 +03:00
Marshal
15a6bab5d0 revert back the clerance payment 2026-07-23 13:54:09 +00:00
Nathnael Wondisha
b6c4a72d2b Merge pull request #941 from Tria-plc/freight/feat/fixes-v1
Freight/feat/fixes v1
2026-07-23 16:50:18 +03:00
Nathnael
dcc94643d0 feat(companies): enforce customers:* permissions on customer endpoints
The customers:* keys were seeded and present in the backoffice constants but
enforced nowhere except reset-password. Customer CRUD sat behind the coarse
edr_freight_app:admin umbrella, and every company read endpoint was unguarded.

Two routes could not be gated on the route alone, because the authority they
need depends on the request BODY, not the path:

  - PATCH /companies/:id carries `status` (UpdateCompanyDto extends
    PartialType(CreateCompanyDto)), so it both edits fields and blacklists.
  - PATCH /company-profiles/:profileId/status is approve, reject, suspend and
    blacklist on one route.

Both now take a one-of route guard and assert per-status against a shared
STATUS_PERM map: approving/reactivating needs customers:verify, suspending or
blacklisting needs customers:deactivate. PATCH /companies/:id additionally
requires customers:update when any non-status field is present, so a caller
holding only deactivate cannot rename a company. The backoffice mirrors the
same map so no button is offered that the server would reject.

GET /companies/:companyId/documents is left authenticated-only with the split
in the handler: it is dual-audience. The portal reads its own documents during
onboarding, and the contract-request detail page (gated on contracts:view)
reads the applicant's. Gating it on customers:view alone would have 403'd
customers on their own documents and blanked the contract reviewer's panel.

The two by-company customer-view reads take a one-of guard for the same reason
— otherwise a staffer granted only customers:view gets a detail page whose tabs
403 individually.

Frontend: the customers routes were sidebar-filtered but not wrapped in
RequirePermission, so direct URL navigation rendered them for anyone.

Verified: freight-api type-check clean; backoffice type-check unchanged from
HEAD (pre-existing errors only); 25 tests pass across the companies and
freight-permission suites. Not exercised against a running API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:48:42 +00:00