- Added InvoiceHeader, InvoiceComplianceMx, InvoiceFinancials, InvoiceLogistics, InvoiceSalesDetails, and InvoiceCollections models.
- Created schemas for invoice operations including create, update, and response schemas.
- Developed services for handling business logic related to invoices, including retrieval, creation, updating, and deletion of invoices and their related data.
- Introduced routes for invoice management, enabling CRUD operations through a RESTful API.
- Integrated invoice routes into the main application router.
- Removed unused routers from the core module to streamline the API structure.
- Added endpoints for license management including creation, retrieval, update, validation, and usage tracking.
- Developed service layer for business logic related to licenses.
- Introduced tenant management APIs for creating, updating, listing, and deleting tenants.
- Implemented user-tenant relationship management with endpoints for adding, removing, and updating user roles in tenants.
- Created DTOs for data transfer between layers and models for ORM mapping.
- Enhanced logging and error handling across services.
- Added API client for OMA units of measure with CRUD operations.
- Created API client for general unit measures with CRUD functionality.
- Developed UI components for displaying and managing locations in a data table format.
- Implemented data table actions for unit measures, including create, edit, and delete functionalities.
- Integrated pagination and refresh capabilities in the data tables for both customs and general unit measures.
- Enhanced user experience with dialogs for creating and editing units of measure.
- Added server-side loading logic for fetching locations and units of measure with error handling.
- Added INPC management page with search functionality.
- Created Legends management page with filters for code and description.
- Implemented Multi-Currency Types management with search capabilities.
- Developed Packages management page with filtering options.
- Introduced Ports management page with authentication and data fetching.
- Added Prevalidators management page with search filters.
- Implemented Signatures management page with search by name and position.
- Created Unit Conversions management page for conversion factors.
- Developed Units of Measure management pages for ACE, American, and OMA with data tables and create/edit dialogs.
- Added models, DTOs, services, and routes for ports, including CRUD operations.
- Introduced unit conversions with corresponding models, DTOs, services, and routes.
- Developed units of measure with detailed models, DTOs, services, and routes for various types.
- Ensured all new features are integrated with FastAPI and SQLAlchemy for seamless database interactions.
Backend:
- Corregir tipos datetime en exchange_rate (dto.py, models.py)
- Agregar datetime import en packages dto.py
- Corregir orden de parámetros en seal services.py
- Actualizar router.py con nuevas rutas
Frontend:
- Crear API clients para exchange-rate, packages y seal
- Implementar componentes de tabla con renderComponent
- Crear diálogos de crear/editar para cada módulo
- Implementar data-table-actions con manejo interno de diálogos
- Agregar páginas completas con filtros e infinite scroll
- Actualizar sidebar con nuevos módulos
Características:
- Acciones inline (editar/eliminar) totalmente funcionales
- Filtros de búsqueda específicos por módulo
- Paginación con infinite scroll
- Sincronización con companyStore
- Manejo de errores robusto
- Updated the "Nueva Sección" button in customs_sections, customs_warehouses, incoterms, invoice_types, material_types, payment_methods, pedimento_codes, pedimento_regimens, sectors, states, transport_modes, and transport_types pages to use the Plus icon from Lucide.
- Updated the "Actualizar" button in the same pages to use the RefreshCw icon from Lucide.
- Added a new edit dialog component for customs brokers with a comprehensive form for editing broker details, including validation and loading states.
- Expanded the PedimentoDates, PedimentoPayments, PedimentoTransportMeans, and PedimentoValidation interfaces to include additional fields.
- Updated the dates, payments, transport, and validation tab forms to initialize form data directly from the Pedimento object, removing unnecessary API calls for data loading.
- Enhanced the payload construction in the edit page to conditionally include sub-resources only if they contain values, improving data handling during creation and update operations.
- Adjusted the form bindings to reflect the new structure and ensure proper data flow between the components.
Cambios en backend:
- Actualizado ClassResponseDTO con campos de tenant y timestamps
- Agregados métodos estáticos en servicio (get_all, get_by_id, create, update, delete)
- Reemplazados endpoints de rutas con inicialización de TenantCRUDRoutes
- Corregida ruta de importación del modelo Company en security.py
- Actualizados nombres de campos en DTO para coincidir con modelo (description_es/en)
- Agregada validación para constraint de foreign key de material_key
- Agregada validación de class_code duplicado en método create
- Agregado TimestampMixin al modelo Class
- Creada migración de Alembic para agregar columnas timestamp a tabla classes
- Corregido orden de parámetros en firma del método update
Cambios en frontend:
- Actualizados componentes de UI para módulo de clases
- Updated PedimentosService to create and update related tables for Pedimentos.
- Added company_id filtering in queries for Pedimentos.
- Improved error handling and logging during creation and update processes.
- Refactored router tags for consistency and clarity.
- Adjusted API endpoints for customs brokers to include company_id in requests.
- Enhanced company selection logic in various components to prioritize active company.
- Implemented event listeners for company changes to reload data dynamically.
- Updated frontend components to handle loading states and errors more effectively.
- Ensured all relevant routes and API calls are aligned with the new company context.
- Cambiar de heredoc (<<EOF) a formato -c para ejecutar comandos SQL
- Agregar cast explícito 'SHARED'::tenanttype para el campo type del tenant
- Arreglar inserción de company para que se ejecute correctamente
- Arreglar inserción de relación usuario-tenant en table user_tenants
- Mejora en ejecución de comandos PostgreSQL dentro de docker exec
El problema era que los heredocs no interpolaban correctamente las variables
en el contexto de docker exec. Usar -c con sentencias SQL en una línea resuelve
el problema y asegura que los INSERTs se ejecuten correctamente.
- Added a data table for displaying customs brokers with columns for key, name, type, license, RFC, email, phone, city, and actions.
- Created a dialog for adding new customs brokers with a form for inputting necessary details.
- Implemented actions for viewing details and deleting customs brokers with confirmation dialogs.
- Integrated search functionality to find customs brokers by their key.
- Established server-side loading for the customs brokers page to handle authentication and data retrieval.