emoss08 / Trenova

An Open Source AI-driven asset based transportation management system
http://trenova.app
Other
24 stars 5 forks source link

🟡(change): tractor assignment implementation #274

Closed emoss08 closed 1 month ago

emoss08 commented 1 month ago

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.

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

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.

File-Level Changes

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.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.