Commit Graph

41 Commits

Author SHA1 Message Date
880999b03a feat: plantilla base workspace SaaS
Some checks failed
Build Producción & Push a Harbor / test (push) Failing after 2s
Build Producción & Push a Harbor / build (push) Has been skipped
Convierte el repositorio de Anexo76 en una plantilla limpia y reutilizable
para nuevos proyectos del ecosistema Workspace de Aduanasoft.

Cambios principales:
- Elimina módulos específicos de Anexo76: a76, a24, sitar, public
- Agrega módulo example/ con patrón CRUD de referencia (models/dto/service/routes)
- Limpia migraciones Alembic: solo quedan las 6 de core (users, tenants, permissions)
- Reemplaza todas las rutas del dashboard con stubs genéricos
- Elimina lógica de negocio aduanera: shortcuts, CSV imports, permisos, catálogos
- Simplifica variables de entorno: una sola WORKSPACE_URL deriva Hub y Keycloak
- Agrega scripts/auth-mode.sh para alternar entre auth local y workspace
- Configura docker-compose con nombres genéricos (app-*)
- Corrige flujo SSO: elimina system-gate SCAF/SCAII que bloqueaba el login
- Modo DEV_LOCAL_AUTH para desarrollo sin Keycloak ni Hub

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 10:55:17 -05:00
1d1d4b1619 Merge remote-tracking branch 'origin/development' into feature/hub-integration
# Conflicts:
#	backend/.env.example
#	backend/api/v1/modules/core/auth/service.py
#	backend/api/v1/modules/core/users/service.py
#	backend/core/middleware.py
#	docker-compose.yml
#	frontend/src/lib/auth.ts
#	frontend/src/lib/components/help/HelpDrawer.svelte
#	scripts/backend-entrypoint.sh
2026-04-29 13:11:44 -05:00
797b1fcbdb Refactor Jenkinsfile and wait-for-jenkins-stack.sh for improved E2E testing
- Removed the wait-for-jenkins-stack.sh script from the Jenkinsfile, integrating its functionality directly into the Jenkins pipeline for better clarity and efficiency.
- Enhanced the wait logic for backend and frontend services, implementing a reusable function in the script to streamline the waiting process and improve error handling.
- Updated comments to clarify the purpose and behavior of the changes, ensuring better understanding of the E2E testing setup.
2026-04-24 16:13:30 -05:00
9d63b000bc Refactor Docker entrypoints and remove unused scripts
- Removed custom entrypoint scripts for backend, frontend, and PostgreSQL services from docker-compose files.
- Added a new entrypoint script in the backend and frontend Dockerfiles to handle initialization without relying on host-mounted scripts.
- Updated Dockerfiles to ensure proper permissions for the new entrypoint scripts.
- Enhanced database initialization logic by moving schema and extension creation to the Alembic migration script.
2026-04-24 12:53:11 -05:00
b8f46d09ae Enhance Jenkinsfile for frontend testing and update Playwright configuration
- Added a new 'E2E (docker compose + Playwright)' stage in the Jenkinsfile to run end-to-end tests using Docker Compose and Playwright.
- Updated the 'Test frontend' stage to utilize the Playwright test image and improved error handling for missing files.
- Modified Playwright configuration to use an environment variable for the base URL, enhancing flexibility in CI environments.
- Expanded TypeScript configuration to include additional test and configuration files for better type checking.
2026-04-24 11:18:57 -05:00
5ac757dbc1 chore: snapshot before development sync 2026-04-24 11:18:06 -05:00
d3676aa8ed Refactor code structure for improved readability and maintainability 2026-04-06 08:54:05 -05:00
c565696242 feature/limpieza-periodica 2026-03-24 16:58:48 -06:00
AlexeerCT
ef5564dd25 Refactor Dockerfile and update models and frontend components
- Removed the APP_VERSION argument from the Dockerfile and added TARGETARCH for architecture-specific wkhtmltopdf installation.
- Updated models.py to reintroduce the import of PartCountry for consistency.
- Enhanced parts.ts interface by adding new optional fields: immex_type, disable_movements, pga_program_code, non_discharge_clients, bom_items, and countries.
- Changed formType default in partForm.svelte and edit page to 'fa' for better alignment with the intended functionality.
- Improved type handling for non_discharge_clients in partForm.svelte.
- Adjusted column span logic in partForm.svelte for better rendering.
- Fixed image error handling in partForm.svelte for improved user experience.
- Updated license expiration date calculation in init_first_time.sh for compatibility with macOS.
2026-03-13 16:53:42 -06:00
4f200de5ef Refactor invoice status terminology and update related logic
- Renamed 'is_processed' fields to 'status' in the InvoiceHeader model and updated corresponding attributes in schemas, services, and frontend components for consistency.
- Adjusted query filters and validation logic to reflect the new 'status' terminology.
- Updated comments and documentation to clarify changes in invoice status handling.
2026-03-13 12:54:58 -05:00
326f4019a2 Refactor invoice processing fields and update related logic
- Renamed fields in the `InvoiceHeader` model from `is_updated` to `is_processed` and updated corresponding attributes in schemas, services, and frontend components.
- Adjusted query filters and validation logic to reflect the new processing status.
- Updated comments and documentation to ensure clarity regarding the changes in invoice status handling.
2026-03-13 12:36:41 -05:00
2aab5c8fdc feat: add optional seed data functionality to init_first_time.sh
- Implemented argument parsing to allow for optional loading of example data with --seed-data flag.
- Added functions to seed example data for customs brokers, clients and providers, packages, classes, parts, pedimentos, and invoices.
- Enhanced user feedback during the seeding process with detailed output of the seeded data counts.
- Updated usage instructions in the script header to reflect the new functionality.
2026-03-08 01:15:08 -06:00
375df79da5 Merge branch 'development' into feature/data-entry 2026-03-05 09:36:03 -06:00
a0e231196e refactor: update Svelte components to use runes, snippets, and improved reactivity patterns. 2026-03-03 16:52:17 -07:00
hreyes
9473c05602 feature/csv-pedimento 2026-03-02 10:03:45 -07:00
hreyes
a81e3700ff fix/first-fix-ports 2026-02-27 12:51:46 -07:00
hreyes
6026132db3 Merge origin/development: resolved conflicts in scripts/init_first_time.sh, backend/api/v1/modules/a76/invoices/services.py, .gitignore and others 2026-02-27 11:46:16 -07:00
dbffc95e67 Correcion de yml y los script 2026-02-26 18:03:14 -06:00
cfcf5009fd Merge branch 'development' of https://git.aduanasoft.com/ADUANASOFT/anexo76 into development 2026-02-26 12:37:29 -06:00
7289947e48 Resolucion de conflictos: Merge feature/boton_ayuda a development 2026-02-26 12:34:38 -06:00
69fda145e9 Sincronización de cambios locales en scripts y configuración 2026-02-26 12:23:37 -06:00
Galindo97
899a5c4d58 fix(pedimentos): various fixes and improvements for pedimento processing and reports 2026-02-25 09:16:42 -06:00
hreyes
a65883922a fix/conflict 2026-02-23 13:42:06 -06:00
17c1ef3947 Nuevo start con interaccion para elegir que tipo de servidor estamos 2026-02-23 12:15:44 -06:00
3b320d7381 Agregando archivito 2026-02-19 14:35:01 -06:00
bcc758953f Nueva funcionalidad 2026-02-19 11:34:03 -06:00
62315e5b24 Implementacion de sistema distribuido de boton de ayuda 2026-02-18 14:25:24 -06:00
d4b52b32ed feat: enhance audit log functionality with tenant_id handling and optional seed data in initialization script 2026-02-18 12:58:11 -06:00
4079a0cc0f Refactor database models to use server defaults for boolean and timestamp fields
- Updated `TimestampMixin` to use `server_default` for `created_at` and `updated_at` fields.
- Modified various models in the `fa_classes`, `doc_types_dig`, `ports`, `units_of_measure`, `invoices`, `parts`, `trailers`, `licenses`, `tenants`, and `user_tenant` modules to set `server_default` for boolean fields and other relevant fields.
- Adjusted the `trailer_types` model to change the schema from `a76` to `public`.
- Implemented database migration execution during application startup in `main.py`.
- Removed old Alembic migration execution logic from the entrypoint script.
- Updated seed data for units of measure and removed unused seed files.
2026-01-14 15:54:37 -06:00
f812d71508 feat: Implement user management service and frontend integration
- Added UserService to manage Keycloak users with license validation in the backend.
- Created API client for user management in the frontend.
- Developed user management page with functionalities to create, update, delete, and list users.
- Implemented user statistics retrieval and display.
- Added dialogs for user creation, editing, password change, and deletion confirmation.
2026-01-13 09:56:53 -06:00
AlexeerCT
b9aebea2b0 Update Keycloak URLs in initialization script to include /kcauth 2025-12-29 13:55:42 -06:00
44eef08445 feat: Implement license and tenant management APIs
- 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.
2025-12-09 11:51:18 -06:00
cdc3788a05 feat: update company API endpoint, refine pedimento dates model, and adjust Keycloak mapper creation 2025-11-24 09:58:24 -06:00
KevinMrkz3221
dd77a80408 Fix: Corregir inserción de tenant y relaciones en PostgreSQL usando formato -c en psql
- 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.
2025-11-13 20:18:10 -06:00
52b8fcd434 feat: Implement multi-tenancy support in middleware and security layers
- Enhanced TenantMiddleware to validate tenant information from JWT tokens.
- Added LicenseValidationMiddleware to check tenant licenses before processing requests.
- Updated security utilities to extract tenant information from tokens and validate company access.
- Introduced CompanyStore to manage active company state and handle company switching in the frontend.
- Modified API routes to include company_id in requests for better resource management.
- Improved logging and error handling throughout the middleware and API layers.
- Updated frontend components to reflect changes in company management and selection.
- Added new API route for fetching user's companies with proper authentication handling.
2025-11-11 14:15:31 -06:00
e0e38526b0 Refactor database models to include company_id and update unique constraints
- Updated PermissionRuleOct model to include company_id and modified unique constraint.
- Updated Seal model to include company_id and modified unique constraint.
- Added TYPE_CHECKING imports in reference data models for better type hinting.
- Created new models for QClasses and SClasses in the a24 module.
- Enhanced init_first_time.sh script for comprehensive system initialization, including Keycloak and PostgreSQL setup.
- Updated documentation to reflect changes in API endpoints and database relationships.
2025-11-07 18:47:41 -06:00
e6d7d23328 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.
2025-11-07 00:02:35 -06: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
f1a7087779 fix: update API URL paths in environment and health check scripts 2025-11-01 14:18:25 -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