Closed emoss08 closed 1 month ago
This pull request refactors the tractor assignment retrieval process by introducing a new filter structure, 'AssignmentQueryFilter', and updating the relevant methods and handlers to use this structure. Additionally, it enhances the frontend components to support new filtering options for active assignments, improving the overall flexibility and readability of the code.
Files | Changes |
---|---|
internal/api/services/tractor.service.go internal/api/handlers/tractor.handler.go |
Refactored active assignment retrieval to use a new filter structure, improving query flexibility and readability. |
web/frontend/src/components/shipment-management/assignment-dialog.tsx web/frontend/src/services/EquipmentRequestService.ts |
Enhanced frontend components to support new filtering options for active assignments, including status and shipment details expansion. |
Summary by Sourcery
This pull request introduces a new AssignmentQueryFilter to enable more flexible querying of active tractor assignments. It refactors the GetActiveAssignments method in TractorService and updates the AssignTractorToShipment method in ShipmentService to handle assignment statuses more robustly. Additionally, it enhances the frontend AssignmentDialog component to support new query filters.