Commit Graph

230 Commits

Author SHA1 Message Date
marshal
72df5ce689 Merge branch 'freight/develop' of github.com:Tria-plc/edr-platform into freight_feature/profile 2026-06-24 01:22:31 +03:00
Marshal
6485cbdd71 feat: implement document clearance workflow for bookings
- Added ClearanceCard component to display and manage clearance documents in ReadonlyBookingView.
- Introduced new API endpoints for clearance operations: getClearance, submitClearanceDocuments, and proceedToOperation.
- Created BookingDocumentReview entity and migration for document review status tracking.
- Developed GlClearancePage for Global Logistics to review and manage document submissions.
- Implemented utility functions for determining clearance setting codes based on trade direction and freight type.
- Added tests for booking transition clearance logic and clearance utility functions.
2026-06-23 21:33:34 +00:00
Marshal
080a08229d feat: enhance booking flow with multi-route support and onboarding document integration
- Introduced multi-route functionality in the booking process, allowing users to add additional routes for general contracts.
- Updated the StepDocuments component to display onboarding documents automatically attached to bookings.
- Refactored Step4Route to manage extra routes and quantities dynamically.
- Improved Step8Review to reflect the new onboarding document handling and updated submission readiness checks.
- Added new API endpoints and services for managing contract route lines and rejecting bookings.
- Removed the allowConsolidation field from the booking model as it is now managed by the system.
- Created migrations for the new contract route lines table and updated related entities.
2026-06-23 20:40:48 +00:00
Marshal
eb85f8d32d refactor booking priority logic and constants; adjust scoring thresholds and remove unused service types 2026-06-23 14:25:54 +00:00
Nathnael
cbbad02b29 fix: type error and other fixes 2026-06-23 13:14:06 +00:00
Marshal
6fd1b68389 enhance company approval workflow and TIN validation; add pending approval handling in booking and onboarding forms 2026-06-23 08:37:15 +00:00
Marshal
1d77f377f3 enhance service filtering and dashboard functionality with company profile support 2026-06-23 07:54:36 +00:00
ghost2023
fab05569d4 fix 2026-06-23 10:03:54 +03:00
Nathnael Wondisha
56968e0709 Merge branch 'freight/develop' into freight/style/ui-sync 2026-06-23 09:51:24 +03:00
Nathnael
a6f3fd5643 feat: finish company profile in the backoffice 2026-06-23 06:45:29 +00:00
marshal
02427f72f1 Merge pull request #243 from Tria-plc/freight_feature/profile
Freight feature/profile
2026-06-22 15:49:25 +03:00
Marshal
ad0043b580 feat: enhance service profile handling for customer companies 2026-06-22 12:11:10 +00:00
Marshal
b031ddb204 Merge branch 'freight/develop' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-22 11:43:38 +00:00
Marshal
ff039bd440 feat(bookings): update payment eligibility logic for general contracts and one-time bookings 2026-06-22 11:40:35 +00:00
yaschalew
7f51f24a77 fix conflict 2026-06-22 14:23:43 +03:00
natib21
6b1bbd8e59 last mile 2026-06-22 07:58:56 +00:00
natib21
bee47b231a add column 2026-06-22 07:54:07 +00:00
natib21
00d722fa4f last mile 2026-06-22 07:49:47 +00:00
Hagernesh
0939202c8f Merge freight/develop into Warehouse_updates 2026-06-21 15:41:32 +00:00
Hagernesh
41d21edae5 feat(warehouse): Batch 10 — import post-inspection actions (pickup / last-mile / store / dispatch)
- READY_FOR_PICKUP transitions now → DELIVERED (customer pickup) OR DISPATCHED (dispatch out) OR
  STORED (operator-chosen storage) — pickup and dispatch kept separate. No auto-storage.
- GET /warehouse-inventory/import/pickup-ready-queue: READY_FOR_PICKUP import items (shared query
  with the unloaded queue, route-derived import filter)
- WarehouseInventoryTable: PICKUP_READY rows now show explicit Store + Dispatch buttons alongside
  the customer-pickup (release/deliver) next action; reuses the existing advance() dispatcher
- Import → Dispatch Queue tab renders pickup-ready items via InventoryWorkbench (all existing
  actions + modals intact) with Last Mile shown only when door delivery was requested
- Verified: pickup-ready item → Store → STORED; → Dispatch → DISPATCHED

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 14:38:23 +00:00
Hagernesh
040ba6d495 feat(warehouse): Batch 9 — Import Unloaded Queue + bulk destination inspection
- bulkMarkInspected: UNLOADED added to eligible statuses; IMPORT passed items now advance to
  READY_FOR_PICKUP (pickup ready) instead of READY_FOR_LOADING (export unchanged)
- GET /warehouse-inventory/import/unloaded-queue: UNLOADED import items with the inspection-screen
  columns (booking, customer, arrival, container, cargo type, weight, train schedule, inspection
  status, pickup option, last-mile, current status); route-derived import filter
- Dedicated ImportUnloadedQueueTab replaces the Batch 8 workbench reuse: full spec columns,
  Select All / Unselect All / selected count / Mark Selected as Inspected, plus per-row
  Inspect / Report (InspectionReportModal) for damage / image / weight-loss detail
- Verified: import item UNLOADED → bulk inspect → READY_FOR_PICKUP (PASSED), drops out of queue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 14:15:22 +00:00
Hagernesh
8b28a7c430 feat(warehouse): Batch 8 — Import Auto Unload Arrived Bookings (→ UNLOADED)
- New UNLOADED inventory status (train-arrival landing state) + transitions + unloaded_at column
  (idempotent migration 1791000000003) + INVENTORY_UNLOADED activity type
- POST /warehouse-inventory/import/auto-unload-arrived-bookings { scheduleId }: validates ARRIVED
  IMPORT train, unloads all eligible assigned bookings (IN_TRANSIT/ARRIVED_AT_*) into UNLOADED,
  records unloadedAt + activity. Does NOT store and does NOT inspect. Reuses allocation + inventory
  plumbing. Returns { unloadedCount, skippedCount, failedCount, results }.
- Arrive Queue "Auto Unload Arrived Bookings" button now calls the new endpoint (was per-booking loop)
- Import → Unloaded Queue tab: lists UNLOADED items via InventoryWorkbench (existing actions preserved:
  Inspect/Store/Move/History) + a Last Mile action shown ONLY when booking requested door delivery
- Batch8TestDataSeeder: sets seed import train bookings to IN_TRANSIT (unload-eligible)
- Verified: auto-unload → 1 UNLOADED (unloadedAt set, not stored, not inspected); ineligible skipped;
  idempotent re-run skips already-unloaded

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 12:57:29 +00:00
Hagernesh
35c3341baf feat(warehouse): Batch 7 — Import Arrive Queue (arrived import trains, read-only)
- SchedulingReadFacade: importArriveQueue() + importTrainDetail() — read-only SELECTs only,
  direction derived from origin/destination station countries (route-based), so EXPORT/DOMESTIC
  trains are excluded. Per-train booking/container/cargo counts.
- GET /warehouse-inventory/import/arrive-queue + /import/trains/:scheduleId/items
- Import tab restructured into sub-tabs: Arrive Queue (implemented) / Unloaded Queue /
  Dispatch Queue (placeholders for next batch)
- ImportArriveQueueTab: train table (schedule id, train #, route, origin, destination, arrival,
  bookings/containers/cargoes, status) with Open (expandable assigned-items detail) + Auto Unload
  (reuses existing per-booking unload endpoint over the train's bookings)
- Batch7TestDataSeeder: 1 arrived IMPORT train (SEED-IMP-001) + 1 arrived EXPORT train
  (SEED-EXP-001, proves exclusion); idempotent
- Train schedule service logic untouched (facade is SELECT-only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 11:15:31 +00:00
Marshal
dc708a2473 Refactor phone input handling across onboarding and settings forms
- Replaced PhoneInput component with ControlledPhoneField for better integration with react-hook-form.
- Updated validation for phone numbers using isValidPhone function to ensure proper formatting.
- Removed country code handling from forms, simplifying phone number management.
- Introduced new phone field component with consistent styling and behavior.
- Added phone number validation on the backend using class-validator.
- Removed unused phone utility functions and cleaned up related code.
2026-06-21 10:34:40 +00:00
Marshal
171e02cf7f feat(bookings): enhance booking filtering and pagination
- Added createdFrom and createdTo filters to BookingListFilterOptions and FilterBookingDto for date range filtering.
- Updated BookingsService and BookingsRepository to handle pagination metadata in responses.
- Enhanced BookingsController to return pagination metadata when no company is linked.
- Introduced ModeIndicator component to display current operational mode across various pages.
- Added ContainersCard and KeyFactsStrip components for detailed booking views.
- Implemented CargoModeCell, BookingTypeBadge, and PaymentBadge for consistent display of booking attributes.
- Updated MyBookings and ContractsList pages to include new filters and display enhancements.
2026-06-21 07:41:04 +00:00
Hagernesh
a8bc5b19de feat(warehouse): fetch all PAID bookings in one call, classified IMPORT/EXPORT by route
- eligibleBookings(direction?) now returns all import+export bookings when direction omitted
  (DOMESTIC excluded); per-direction filter preserved for backward compatibility
- GET /warehouse-inventory/eligible-bookings (no query) returns the combined set
- Frontend: single shared useEligibleBookings() query; both Receive tabs filter client-side
  by route-derived direction, so only one HTTP request fires

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 20:15:26 +00:00
Hagernesh
0ab508e377 feat(warehouse): Batch 6 — Export Loaded queue + Dispatch Queue with bulk dispatch
- GET /warehouse-inventory/loaded-export: EXPORT+LOADED items (route-derived direction)
- POST /warehouse-inventory/bulk-dispatch-export: reuses existing dispatch() transition
  (LOADED → DISPATCHED, capacity freed, movement/activity logged); skips non-LOADED/non-EXPORT
- Extracted shared exportInventoryByStatus() helper (readyToLoadExport now delegates to it)
- Frontend LoadedExportTab serves both Loaded (read-only) and Dispatch Queue (dispatchable)
  sub-tabs with Dispatch / Dispatch Selected / Dispatch All + per-row Dispatch
- Replaces "Loaded" and "Dispatch Queue — coming in the next batch" placeholders
- Train/schedule flow (DISPATCHED → IN_TRANSIT) unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 20:04:18 +00:00
Marshal
b6d5047d27 feat: Implement general contract booking orders functionality
- Add DTOs for creating booking orders and viewing contract quantities.
- Create entities for booking orders and booking order lines.
- Implement service for managing general contract operations, including activation after payment and retrieving quantity lines.
- Develop UI components for contract detail and list pages, including order placement dialog.
- Integrate API service for booking orders, enabling listing and creating orders against contracts.
- Enhance contract status display and quantity pool visualization in the UI.
2026-06-20 19:31:51 +00:00
Hagernesh
806fc4a8ca feat(warehouse): Batch 5 — Export Ready To Load queue + Auto Load Ready Items
- GET /warehouse-inventory/ready-to-load-export: EXPORT+PASSED+READY_FOR_LOADING items
  with booking details (customer, container, cargo type, route, inspection status)
- Direction filtering via deriveTradeDirection (route-based, not stored field)
- Frontend ReadyToLoadTab: full table (checkbox, booking ref/id, customer, container,
  cargo type, weight, route, inspection status, current status) with selection
- Auto Load Ready Items button reuses existing POST /load-passed-export endpoint
- Replaces "Ready To Load — coming in the next batch" placeholder in Export sub-tabs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 18:03:11 +00:00
Hagernesh
50c6381341 feat(warehouse): Batch 3+4 — export receive-selected label + bulk-mark-inspected workflow
- BulkReceiveModal: Receive Selected shows "received at facility" for EXPORT
- Export inspection: POST /warehouse-inventory/bulk-mark-inspected reuses WarehouseInspectionService.create
- EXPORT items advance to READY_FOR_LOADING after inspection PASSED
- InventoryWorkbench: selection state + "Mark Selected as Inspected" bulk button
- WarehouseInventoryTable: optional Checkbox column for bulk selection
- Route-based direction in eligibleBookings, bulkReceive, getBookingDirection
- New BulkInspectDto; service + controller wired

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:52:01 +00:00
Marshal
72b6c9875d feat: integrate eTradeInfo component for auto-filling company information and enhance TIN input handling 2026-06-20 10:39:53 +00:00
Marshal
1f92a04ecf feat: add eTrade fields to company entity and onboarding process
- Added new fields to the Company entity: licenceNumber, statusDescription, dateRegistered, renewedFrom, renewalDate, renewedTo, region, zone, woreda, kebele, houseNo, and etradePhone.
- Updated onboarding wizard to include a new contact step and fetch company information from eTrade using TIN.
- Created ETradeInfo component to handle fetching and displaying eTrade data.
- Implemented ETradeService to interact with eTrade API and extract relevant company registration data.
- Added new DTOs for fetching eTrade data and handling responses.
- Updated CompanyProfileForm to integrate new fields and handle eTrade data.
- Created hooks for managing eTrade data fetching and error handling.
2026-06-20 10:27:41 +00:00
Hagernesh
b7a831b063 feat(warehouse): route-based receive direction + Export Receive Queue (Batch 2)
- Direction derived from route via existing deriveTradeDirection (eligible-bookings,
  bulk receive guard, getBookingDirection) instead of stored trade_direction
- Export tab sub-tabs (Receive Queue + Ready-to-Load/Loaded/Dispatch placeholders)
- Receive Queue: full column set + per-row Receive; eligible-bookings adds customerId
- create/update warehouse: map DB errors to 400; dashboard: distinct per-status colors

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 10:26:50 +00:00
natib21
b47fb2c475 fix data table 2026-06-20 09:54:05 +00:00
natib21
963392edb3 fix data table 2026-06-20 09:38:12 +00:00
Marshal
4a0085ef57 feat: refactor exchange rate handling by integrating new ExchangeService and removing CbeExchangeService 2026-06-20 09:22:21 +00:00
Hagernesh
0005b2edb3 feat(warehouse): Receive Import/Export tabs with bulk receive + load-passed-export
- Backend: GET eligible-bookings?direction, POST receive-bulk, POST load-passed-export
  (reuse autoUnload/autoLoad patterns; no train-schedule/wagon logic changed)
- Frontend: ReceiveInventoryModal split into Import/Export tabs with eligible PAID
  bookings table, select-all/bulk receive, and Load Passed Export Items button
- Single-booking receive and all existing inventory row actions preserved

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 08:29:59 +00:00
Marshal
54587a8c55 feat: add nationality selection and business license upload functionality
- Introduced a new step in the onboarding process to select company nationality (Ethiopian or Foreign).
- Updated API and service layers to handle nationality data for companies.
- Added support for uploading multiple business license files for each operational profile.
- Refactored company and forwarder forms to include new license upload step.
- Created a reusable RoleLicenseStep component for managing license file uploads.
- Implemented utility functions for phone number handling.
- Added migrations to update the database schema for nationality and business license files.
2026-06-20 08:28:01 +00:00
yaschalew
55663a5c43 fix 2026-06-20 09:52:32 +03:00
Marshal
ce8189d5fe feat: enhance onboarding forms with error handling and step persistence 2026-06-19 23:04:39 +00:00
Marshal
9f5d287139 feat: implement onboarding process with draft company and profile creation 2026-06-19 22:50:24 +00:00
Marshal
ed91f817ff feat: enhance onboarding process and company profile management
- Updated CompanyInfoResponseDto to include company profile data in response.
- Enhanced ResponseExternalProfileDto to include active profile type and onboarding details.
- Added new fields to ExternalProfile entity for active profile type and onboarding status.
- Implemented onboarding wizard dialog in the frontend to guide users through the onboarding process.
- Introduced API endpoints for managing company profiles and onboarding steps.
- Created migrations to add new columns for active mode and onboarding status in the database.
- Added functionality to switch between operational modes (importer/exporter) and create profiles as needed.
- Improved user experience by ensuring onboarding is enforced for new users and those without completed profiles.
2026-06-19 22:07:58 +00:00
marshal
ca5877d25a Merge branch 'freight/develop' of github.com:Tria-plc/edr-platform into freight_feature/priority 2026-06-19 15:58:36 +03:00
Nathnael
8e278a3bd6 feat: add company selection to settings onboarding 2026-06-19 12:32:55 +00:00
natib21
58bfb5045a vehicle 2026-06-19 12:25:00 +00:00
natib21
5ca107f781 vehicle 2026-06-19 12:17:18 +00:00
natib21
b2f1ce7d48 vehicle 2026-06-19 12:14:31 +00:00
natib21
fb8ade77cd vehicle 2026-06-19 12:06:01 +00:00
natib21
4c37426040 vehicle 2026-06-19 12:03:26 +00:00
natib21
ce28856352 vehicle 2026-06-19 12:01:15 +00:00