Commit Graph

717 Commits

Author SHA1 Message Date
ef5c40af92 feat: Implement client and provider management service
- Added service layer for handling client and provider operations including creation, retrieval, updating, and deletion.
- Introduced DTOs for data transfer and validation.
- Implemented filtering and pagination for client/provider listing.
- Added logging for better traceability of operations.

feat: Create parts management module

- Developed a complete module for managing parts/components including creation, retrieval, updating, and deletion.
- Introduced DTOs for parts with detailed attributes and validation.
- Implemented search and filtering capabilities for parts based on various criteria.
- Added endpoints for regulatory information retrieval and parts statistics.
- Integrated logging for error handling and operational insights.
2025-11-06 20:29:18 -06:00
5c9dbacfdf Merge remote-tracking branch 'origin/catalogos_a76' into catalogos-frontend 2025-11-06 20:20:18 -06:00
07dfe1edb1 Add service layers and models for Pedimento CRUD operations
- Implemented service classes for PedimentoConfigParameters, PedimentoConfigSurcharges, PedimentoConfigUpdateRectification, PedimentoConfigUpdates, PedimentoCustomsOffices, PedimentoDates, PedimentoDecrementables, PedimentoIncrementables, PedimentoIndexes, PedimentoPayments, PedimentoRectificationDestination, PedimentoRectificationOrigin, PedimentoTransportMeans, and PedimentoValidation.
- Each service class includes methods for CRUD operations: create, read, update, and delete.
- Added a main router for the API v1, integrating various modules including authentication, tenants, licenses, and pedimentos.
- Created models for PedimentoValidation with appropriate constraints and relationships.
2025-11-06 17:16:29 -06:00
c1dee97092 # Reporte de Trabajo - 5 de Noviembre de 2025
## Cambios Realizados

### 1. **Modelos**
- Se actualizaron los modelos para incluir el esquema  en las tablas:
  -
  -
  -
  -
- Ajustes en relaciones y claves foráneas para garantizar consistencia con el esquema .
- Se añadieron anotaciones de tipo y mejoras en la documentación de los modelos.

### 2. **Servicios**
- Implementación de lógica de negocio en  para el módulo :
  - Creación, actualización, eliminación y búsqueda de partes.
  - Métodos para estadísticas y manejo de estados habilitado/deshabilitado.

### 3. **Migraciones**
- Creación de nuevas migraciones de Alembic para las tablas:
  -
  -
  -
  -
  - Tablas relacionadas con direcciones y programas de clientes/proveedores.

### 4. **Documentación**
- Actualización de :
  - Detalles de las nuevas funcionalidades implementadas.
  - Endpoints REST API agregados para los módulos.
  - Relaciones principales entre tablas.
- Actualización de :
  - Cambios realizados en los modelos para usar el esquema .
  - Beneficios de la separación de esquemas.
  - Próximos pasos para completar la integración.

## Próximos Pasos
1. Verificar las migraciones generadas y aplicarlas en el entorno de desarrollo.
2. Implementar pruebas unitarias para los nuevos servicios y modelos.

---

*Documento generado automáticamente el 5 de noviembre de 2025.*
2025-11-05 22:38:58 -06:00
38d86531e8 feat: Add comprehensive A76 modules with database relationships
 New Features:
- Company module: Single company management with comprehensive business info
- Client & Provider module: Manages clients/providers with address/program relationships
- GParts module: Parts/components management for SCAII, SCAF, and WINSAAI systems
- GClass module: Class classifications for SCAII and SCAF with tariff information

🔗 Database Relationships:
- GPart ↔ GClass: Composite key relationship (client_key, part_class ↔ class_code)
- GPart → Country: Foreign key to public.countries (country_of_origin)
- GPart → CurrencyType: Foreign key to public.currency_types (currency_key)
- GClass → MaterialType: Foreign key to public.material_types (material_key)

📊 API Endpoints Added:

Company Module (/company):
- POST / - Create company
- GET / - Get single company

Client & Provider Module (/clients-providers):
- POST / - Create client/provider
- GET / - List all with pagination
- GET /clients - List only clients
- GET /providers - List only providers
- GET /search/rfc/{rfc} - Search by RFC
- GET /{client_id} - Get by ID
- PUT /{client_id} - Update client/provider
- DELETE /{client_id} - Delete client/provider
- PATCH /{client_id}/toggle-status - Toggle status
- GET /{client_id}/address - Get address info
- GET /{client_id}/programs - Get programs info
- GET /{client_id}/basic - Get basic info

GParts Module (/parts):
- POST / - Create part
- GET / - List all with pagination and filters
- GET /client/{client_key} - Get parts by client
- GET /search/fraction/{fraction} - Search by tariff fraction
- GET /search/supplier/{supplier} - Search by supplier
- GET /search/country/{country_code} - Search by country
- GET /statistics - Get parts statistics
- GET /{client_key}/{part_number} - Get specific part
- PUT /{client_key}/{part_number} - Update part
- DELETE /{client_key}/{part_number} - Delete part
- PATCH /{client_key}/{part_number}/toggle-status - Toggle status
- GET /{client_key}/{part_number}/basic - Get basic info
- GET /{client_key}/{part_number}/regulatory - Get regulatory info

GClass Module (/classes):
- POST / - Create class
- GET / - List all with pagination and filters
- GET /client/{client_key} - Get classes by client
- GET /search/fraction/{fraction} - Search by tariff fraction
- GET /search/material/{material_key} - Search by material
- GET /search/unit-measure/{unit_of_measure} - Search by unit of measure
- GET /search/physical-review/{physical_review} - Search by physical review status
- GET /statistics - Get class statistics
- GET /{client_key}/{class_code} - Get specific class
- PUT /{client_key}/{class_code} - Update class
- DELETE /{client_key}/{class_code} - Delete class
- GET /{client_key}/{class_code}/basic - Get basic info
- GET /{client_key}/{class_code}/tariff - Get tariff information

🏗️ Architecture:
- Modular design with models, DTOs, services, and routes for each entity
- English field names with composite primary keys where applicable
- Comprehensive CRUD operations with specialized search endpoints
- SQLAlchemy relationships with proper foreign key constraints
- Type-safe DTOs with Pydantic validation

📝 Documentation:
- RELATIONSHIPS.md: Complete documentation of database relationships
- Detailed type hints and comprehensive service methods
- Consistent patterns across all modules for maintainability
2025-11-04 21:48:05 -06:00
206e81ef05 feat(auth): synchronize access token from cookies to localStorage if not present
refactor(dashboard): create dynamic columns for CodePedimentoRegimen with onSuccess callback

feat(dashboard): implement create, edit, and delete dialogs for CodePedimentoRegimen

feat(dialogs): add reusable dialog components for confirmation and details display

style(alert-dialog): improve styling and structure for alert dialog components

style(dialog): enhance styling and structure for dialog components
2025-11-02 14:20:30 -06:00
f29e219cf8 Merge pull request 'catalogos-backend' (#4) from catalogos-backend into development
Reviewed-on: ADUANASOFT/anexo76#4
2025-11-02 01:32:53 +00:00
73a535291a feat: implement sidebar components and authentication flow
- Added sidebar menu components including sidebar-menu-item, sidebar-menu-skeleton, sidebar-menu-sub-button, sidebar-menu-sub-item, sidebar-menu-sub, sidebar-menu, sidebar-provider, sidebar-rail, sidebar-separator, sidebar-trigger, and sidebar.
- Introduced skeleton loading states for sidebar items.
- Integrated tooltip components for enhanced user interaction.
- Developed mobile responsiveness using media queries.
- Established authentication flow with Keycloak, including login, logout, and token management.
- Implemented server-side redirection based on authentication status.
- Enhanced error handling and logging for authentication processes.
2025-11-01 20:04:43 -05:00
89f75cf04e se elimino token de prueba 2025-11-01 17:16:54 -06:00
e70ab22b4e feat(tests): Añadido soporte de autenticación con access token en tests GET de todos los módulos de reference_data. Ahora los tests usan un fixture access_token y envían el header Authorization. Módulos actualizados: containers, countries, currency_types, material_types, states, valuation_methods, incoterms, payment_methods, sectors, customs_sections, customs_warehouses, invoice_types, pedimento_codes, pedimento_regimens, code_pedimento_regimens, transport_modes, transport_types. 2025-11-01 17:15:09 -06:00
7adc90ac33 feat: implement authentication service with Keycloak and SSO support 2025-11-01 15:53:25 -05:00
e8294af60d public endpoints 2025-11-01 11:33:40 -06:00
0aa5fc72fd Creacion de CRUDs
se crearon los cruds de los catalogos que se encuentran en
public/reference_data
No se agrego autenticacion de los endpoints
2025-10-26 19:13:42 -06:00
1961296593 feat(auth): implement OAuth2 exchange code flow for Microsoft login, update environment configurations, and enhance frontend SSO handling 2025-10-20 19:25:29 -05:00
f460c2b8aa feat(auth): add user registration and response DTOs, implement registration endpoint in AuthService
feat(auth): create registration route and integrate with AuthService
feat(auth): implement user registration logic in AuthService with Keycloak integration
fix(config): add Keycloak admin credentials to settings
fix(middleware): update tenant middleware to include new auth routes
chore(docs): remove outdated testing guide and add project architecture documentation
feat(frontend): implement user registration page and integrate with API
feat(frontend): create login page with tenant selection and error handling
refactor(frontend): update layout to use custom auth store and improve loading states
2025-10-19 21:05:07 -05:00
58a2f0ade6 Add reference data models and seed data for incoterms, invoice types, material types, payment methods, pedimento codes, pedimento regimens, sectors, states, transport modes, transport types, and valuation methods
- Implemented SQLAlchemy models for incoterms, invoice types, material types, payment methods, pedimento codes, pedimento regimens, sectors, states, transport modes, transport types, and valuation methods.
- Added seed data for each reference data model to populate the database with initial values.
- Ensured primary key constraints and appropriate data types for each model.
- Established relationships where necessary, particularly in pedimento codes and regimens.
2025-10-19 19:03:15 -05:00
2a10d7d267 feat: Add frontend and backend initialization scripts, implement Keycloak and PostgreSQL setup
- Implemented SvelteKit frontend with authentication callback handling.
- Created demo routes and paraglide localization functionality.
- Added health check and entrypoint scripts for backend services.
- Established PostgreSQL and Keycloak initialization scripts with health checks.
- Introduced models for database schema using SQLAlchemy.
- Configured Vite and SvelteKit for development and testing environments.
- Added health check script to verify service statuses and resource usage.
- Created Docker entrypoint scripts for seamless service startup.
2025-10-19 00:14:06 -05:00