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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user