feat: enhance invoice saving functionality with new top fields and transport modes

- Added InvoiceTopFieldsFormData to handle additional invoice fields.
- Updated saveInvoice function to validate and process new fields.
- Integrated transport modes fetching in the invoice edit page.
- Refactored financials and compliance data handling to accommodate new structure.
- Improved user feedback with toast notifications instead of alerts.
This commit is contained in:
AlexeerCT
2026-01-06 11:25:09 -06:00
parent 5dce19ebdf
commit 12ec8c6dfb
14 changed files with 446 additions and 866 deletions

View File

@@ -5,6 +5,7 @@ from pydantic import BaseModel
class CustomsBrokerBaseDTO(BaseModel):
"""Base fields for CustomsBroker"""
type: Optional[str] = None
name: Optional[str] = None
address: Optional[str] = None
@@ -25,16 +26,20 @@ class CustomsBrokerBaseDTO(BaseModel):
class CustomsBrokerCreateDTO(CustomsBrokerBaseDTO):
"""Schema for creating a new CustomsBroker"""
broker_key: str
class CustomsBrokerUpdateDTO(CustomsBrokerBaseDTO):
"""Schema for updating an existing CustomsBroker"""
pass
class CustomsBrokerResponseDTO(CustomsBrokerBaseDTO):
"""Schema for CustomsBroker response"""
id: int
broker_key: str
tenant_id: int
company_id: int