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:
@@ -12,6 +12,7 @@ from core.middleware import (
|
||||
LicenseValidationMiddleware,
|
||||
RequestLoggingMiddleware
|
||||
)
|
||||
from core.database import init_db
|
||||
from api.v1.router import router as api_v1_router
|
||||
|
||||
# Configurar logging
|
||||
@@ -26,12 +27,20 @@ logger = logging.getLogger(__name__)
|
||||
app = FastAPI(
|
||||
title="Anexo76 API",
|
||||
version=settings.APP_VERSION,
|
||||
description="Aplicación SaaS para gestión de comercio exterior conforme a Anexos 24, 31 y 22 del SAT",
|
||||
description="Aplicación SaaS para gestión de comercio exterior conforme a Anexos 24, 30 y 22 del SAT",
|
||||
docs_url="/api/docs" if settings.DEBUG else None,
|
||||
redoc_url="/api/redoc" if settings.DEBUG else None,
|
||||
openapi_url="/api/openapi.json" if settings.DEBUG else None,
|
||||
)
|
||||
|
||||
# Inicializar la base de datos
|
||||
@app.on_event("startup")
|
||||
async def on_startup():
|
||||
"""Evento de inicio de la aplicación"""
|
||||
logger.info("Iniciando la aplicación Anexo76...")
|
||||
init_db()
|
||||
logger.info("Base de datos inicializada correctamente.")
|
||||
|
||||
# Configurar CORS
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
@@ -41,6 +50,8 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
logger.info(f"CORS configurado para orígenes: {settings.cors_origins_list}")
|
||||
|
||||
# Agregar middlewares personalizados
|
||||
app.add_middleware(RequestLoggingMiddleware)
|
||||
app.add_middleware(LicenseValidationMiddleware)
|
||||
|
||||
Reference in New Issue
Block a user