Commit Graph

550 Commits

Author SHA1 Message Date
Marshal
7d3eb39625 fix error 2026-07-02 10:40:31 +00:00
ghost2023
cdc2592bc7 fix: script fial 2026-07-02 13:30:09 +03:00
Marshal
adddb24033 add public to InternalPaymentController 2026-07-02 10:16:58 +00:00
marshal
7b3f9094ed changes 2026-07-02 13:02:33 +03:00
Nathnael Wondisha
e874de25fe Merge pull request #397 from Tria-plc/feight/fix/ui-ux-issues
Feight/fix/UI ux issues
2026-07-02 12:49:07 +03:00
Nathnael
41fc0cabdf fix: duplicate invoice 2026-07-02 09:44:56 +00:00
Nathnael
5aafa436c1 fixes 2026-07-02 09:38:14 +00:00
Nathnael
63937db32b fix: update the updateStatus iss 2026-07-02 09:22:25 +00:00
marshal
56bb75c9a8 fix transi permit file upload 2026-07-02 12:22:07 +03:00
marshal
4fefe4f827 finilize gl 2026-07-02 12:06:17 +03:00
natib21
07abe9b679 fix 2026-07-02 08:51:21 +00:00
ghost2023
1c012ce1e2 refactor(payment): centralize invoice processing with detailed tracking and configurable logging 2026-07-02 11:47:35 +03:00
yaschalew
54b2114e7f fix issue 2026-07-02 11:28:56 +03:00
yaschalew
8b8a993953 fix conflict 2026-07-02 09:28:02 +03:00
marshal
9c18d086d7 changes 2026-07-01 20:55:17 +03:00
ghost2023
2f79178496 fix: booking invoice issue 2026-07-01 16:11:47 +03:00
ghost2023
174df0b7aa chore: fix script and add seed company 2026-07-01 15:46:25 +03:00
ghost2023
aef868bc40 fix: the invoice status syncing with booking payment window 2026-07-01 15:46:13 +03:00
ghost2023
7e96fa65b9 feat: rm the hardcoded invoice types 2026-07-01 15:10:04 +03:00
ghost2023
fbda15bac8 Merge branch 'dev' into freight/feat/invoice 2026-07-01 14:40:58 +03:00
ghost2023
b7be6d6229 feat: add the seed schedules 2026-07-01 14:37:47 +03:00
ghost2023
abdf459289 feat: add the seed contracts 2026-07-01 14:26:32 +03:00
ghost2023
c88c5ee450 chore: setup script 2026-07-01 12:26:37 +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
Nathnael
94982d3c5a feat: setup pdf on the central billing 2026-07-01 06:25:24 +00:00
Nathnael
8ab27a6721 feat: add expiration to invoice 2026-07-01 06:19:07 +00: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
7654b18385 Merge branch 'freight_feature/contrat' of github.com:Tria-plc/edr-platform into freight_feature/contrat 2026-07-01 05:45:46 +03:00
Marshal
28c1089ce6 Remove estimated shipment date from contract forms and related components 2026-07-01 02:42:05 +00:00
marshal
dc55ebda29 Merge branch 'freight_feature/contrat' of github.com:Tria-plc/edr-platform into freight_feature/contrat 2026-06-30 18:23:56 +03:00
marshal
1a6f461a06 changes 2026-06-30 18:23:47 +03:00
Marshal
708bd75d1f enhance contract review and editing experience 2026-06-30 15:16:27 +00:00
natib21
558f7f38cd feat: add fleet-wide fuel and maintenance stats endpoints
Backend:
FuelService + FuelController:
- Added getFleetFuelStats() aggregating all vehicles
- Route: GET /api/fuel/stats (before :vehicleId route)
- Returns: totalCost, totalLiters, totalPurchases, averagePricePerLiter

MaintenanceService + MaintenanceController:
- Added getFleetMaintenanceStats() aggregating all vehicles
- Route: GET /api/maintenance/stats (before :vehicleId route)
- Returns: totalCost, numberOfMaintenanceItems, averageCostPerMaintenance, costByType

Both endpoints aggregate over past 12 months (customizable via query param).

Enables dashboard to show fleet-wide operating costs.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 14:32:12 +00:00
natib21
fea869a19c feat: display vehicle name instead of ID in fuel purchases table
Backend:
- FuelService.getAllFuelPurchases() now loads vehicle relationship
- Uses leftJoinAndSelect to eagerly load Vehicle data
- Returns complete FuelPurchase with nested vehicle object

Frontend:
- Table displays vehicle.registrationNumber (primary)
- Falls back to vehicle.plateNumber if registration unavailable
- Falls back to vehicleId as last resort

Better UX: shows human-readable vehicle info instead of UUID.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 14:23:54 +00:00
natib21
796e63cc59 fix: add missing GET /api/fuel/purchases endpoint
Problem:
- Frontend calls GET /fuel/purchases (all purchases)
- Backend only had GET /fuel/purchases/:vehicleId (specific vehicle)
- Result: 404 when loading fuel purchases list

Solution:
- Added getAllFuelPurchases() to FuelService
- Added GET /fuel/purchases route to FuelController
- Route placed before parameterized route so it gets matched first
- Returns all fuel purchases ordered by date DESC

Endpoints:
- GET /api/fuel/purchases → all purchases
- GET /api/fuel/purchases/:vehicleId → specific vehicle
- POST /api/fuel/purchases → record purchase

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 14:18:26 +00:00
Nathnael
0056dec924 style: clean up the invoice and setup event for warehouse. 2026-06-30 13:28:14 +00:00
Nathnael
fa3138f2ac refactor: migrate the warehouse invoice to use the central one 2026-06-30 12:54:04 +00:00
natib21
f436916c42 feat: complete maintenance tracking backend
Service/Controller/Module:
- scheduleMaintenanceAsync: schedule work
- recordMaintenanceCost: log expenses
- getUpcomingMaintenance: due items
- getVehicleMaintenanceStats: cost aggregation

Endpoints:
- POST /maintenance/schedules
- POST /maintenance/costs
- PATCH /maintenance/schedules/:id
- GET /maintenance/upcoming/:vehicleId
- GET /maintenance/history/:vehicleId
- GET /maintenance/stats/:vehicleId

Migration: idempotent maintenance tables creation

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 12:33:29 +00:00
natib21
e59a77b859 feat: add maintenance tracking module foundation
Entities:
- MaintenanceSchedule: track preventive/corrective maintenance
- MaintenanceCost: record actual maintenance expenses

DTOs:
- CreateMaintenanceScheduleDto: schedule maintenance
- CreateMaintenanceCostDto: log costs
- UpdateMaintenanceScheduleDto: mark complete/adjust cost

Repository:
- getUpcomingMaintenance(): find due maintenance
- getMaintenanceCosts(): historical costs by date
- getTotalMaintenanceCost(): aggregate spending

Also fixed fuel-consumption.entity.ts: totalDistanceKm default 0

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 12:28:00 +00:00
natib21
5d70c3b557 fix 2026-06-30 12:13:48 +00:00
Nathnael
5ad4efd7eb feat: add pdf to the central invoice system 2026-06-30 11:58:28 +00:00
Nathnael
7fa18b8ee7 fix: reference type in payment service 2026-06-30 11:54:43 +00:00
Nathnael
228b840c26 Merge branch 'dev' into freight/feat/invoice 2026-06-30 11:26:32 +00:00
Nathnael
21cf24950d feat: add partial payment to match the warehouse invoice before migration 2026-06-30 10:50:43 +00:00
natib21
7b9cd88712 fix: correct fuel module TypeScript errors
- Use @InjectRepository decorators for proper dependency injection
- Fix BaseRepository initialization with Repository instance
- Remove unnecessary DataSource references
- Add proper type annotations to reduce handlers

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 10:08:56 +00:00
natib21
df6e417a56 feat: add fuel management system backend
- FuelPurchase entity: record fuel purchases with cost tracking
- FuelConsumption entity: monthly aggregation of fuel metrics
- FuelService: record purchases, calculate stats, efficiency
- FuelController: REST API for fuel operations
- FuelModule: integrated into app
- Migration: create fuel_purchases and fuel_consumption tables

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-30 10:07:13 +00:00
SennayT
3c5f5b5861 fix: add docker cache for pnpm installations 2026-06-30 09:54:59 +00:00
Nathnael Wondisha
fec235c433 Merge pull request #372 from Tria-plc/freight/fix/migrate-undo
fix
2026-06-30 08:39:57 +03:00
ghost2023
c299973bb0 fix 2026-06-30 08:38:27 +03:00
Nathnael Wondisha
b5a2bd537f Merge pull request #370 from Tria-plc/freight/fix/migrate-undo
fix
2026-06-30 08:32:29 +03:00