feat: Add payments, transport, and validation tabs for pedimento editing
- Implemented PaymentsTabForm component for managing payment information. - Implemented TransportTabForm component for managing transport details. - Implemented ValidationTabForm component for managing validation documents. - Enhanced the main edit page to include new tabs and handle data saving for each section. - Added alert components for success and error messages during save operations. - Updated server-side logic to handle fetching and saving of pedimento data.
This commit is contained in:
@@ -11,7 +11,7 @@ class PedimentoRectificationOriginBase(BaseModel):
|
||||
original_customs_office: Optional[str] = Field(None, max_length=3, description="Original customs office")
|
||||
original_license: Optional[str] = Field(None, max_length=4, description="Original license")
|
||||
original_pedimento_number: Optional[str] = Field(None, max_length=7, description="Original pedimento number")
|
||||
original_pedimento_key: Optional[str] = Field(None, max_length=2, description="Original pedimento key")
|
||||
original_pedimento_code: Optional[str] = Field(None, max_length=2, description="Original pedimento key")
|
||||
original_payment_date: Optional[datetime] = Field(None, description="Original payment date")
|
||||
total_cash: Optional[int] = Field(None, description="Total cash")
|
||||
total_others: Optional[int] = Field(None, description="Total others")
|
||||
@@ -33,7 +33,7 @@ class PedimentoRectificationOriginUpdate(BaseModel):
|
||||
original_customs_office: Optional[str] = Field(None, max_length=3)
|
||||
original_license: Optional[str] = Field(None, max_length=4)
|
||||
original_pedimento_number: Optional[str] = Field(None, max_length=7)
|
||||
original_pedimento_key: Optional[str] = Field(None, max_length=2)
|
||||
original_pedimento_code: Optional[str] = Field(None, max_length=2)
|
||||
original_payment_date: Optional[datetime] = None
|
||||
total_cash: Optional[int] = None
|
||||
total_others: Optional[int] = None
|
||||
|
||||
@@ -13,7 +13,7 @@ class PedimentosBase(BaseModel):
|
||||
client_id: Optional[int] = Field(None, description="Client ID")
|
||||
operation_type: Optional[int] = Field(None, description="Operation type")
|
||||
pedimento_type: Optional[int] = Field(None, description="Pedimento type")
|
||||
pedimento_key: Optional[str] = Field(None, max_length=2, description="Pedimento key")
|
||||
pedimento_code: Optional[str] = Field(None, max_length=2, description="Pedimento key")
|
||||
regime: Optional[str] = Field(None, max_length=3, description="Regime")
|
||||
status: Optional[str] = Field(None, max_length=30, description="Status")
|
||||
usd_value: Optional[Decimal] = Field(None, description="USD value")
|
||||
@@ -36,7 +36,7 @@ class PedimentosUpdate(BaseModel):
|
||||
client_id: Optional[int] = None
|
||||
operation_type: Optional[int] = None
|
||||
pedimento_type: Optional[int] = None
|
||||
pedimento_key: Optional[str] = Field(None, max_length=2)
|
||||
pedimento_code: Optional[str] = Field(None, max_length=2)
|
||||
regime: Optional[str] = Field(None, max_length=3)
|
||||
status: Optional[str] = Field(None, max_length=30)
|
||||
usd_value: Optional[Decimal] = None
|
||||
|
||||
@@ -20,7 +20,7 @@ class PedimentoRectificationOrigin(Base):
|
||||
original_customs_office = mapped_column(String(3))
|
||||
original_license = mapped_column(String(4))
|
||||
original_pedimento_number = mapped_column(String(7))
|
||||
original_pedimento_key = mapped_column(String(2))
|
||||
original_pedimento_code = mapped_column(String(2))
|
||||
original_payment_date = mapped_column(DateTime)
|
||||
total_cash = mapped_column(Integer)
|
||||
total_others = mapped_column(Integer)
|
||||
|
||||
@@ -7,6 +7,8 @@ from core.database import Base
|
||||
class Pedimentos(Base):
|
||||
__tablename__ = 'pedimentos'
|
||||
__table_args__ = (
|
||||
ForeignKeyConstraint(['regime'], ['public.pedimento_regimens.code']),
|
||||
ForeignKeyConstraint(['pedimento_code'], ['public.pedimento_codes.code']),
|
||||
ForeignKeyConstraint(['tenant_id'], ['a76.tenants.id']),
|
||||
PrimaryKeyConstraint('id', name='pedimentos_pkey'),
|
||||
Index('idx_pedimentos_client_id', 'client_id'),
|
||||
@@ -24,7 +26,7 @@ class Pedimentos(Base):
|
||||
client_id = mapped_column(Integer)
|
||||
operation_type = mapped_column(Integer)
|
||||
pedimento_type = mapped_column(Integer)
|
||||
pedimento_key = mapped_column(String(2))
|
||||
pedimento_code = mapped_column(String(2))
|
||||
regime = mapped_column(String(3))
|
||||
status = mapped_column(String(30))
|
||||
usd_value = mapped_column(Numeric(17, 6))
|
||||
|
||||
Reference in New Issue
Block a user