Commit Graph

25 Commits

Author SHA1 Message Date
404333f35e Refactor Pedimento data structure and update forms
- 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.
2025-11-18 18:20:04 -06:00
84006e3410 Merge pull request 'feat: Convertir módulo de clases para usar TenantCRUDRoutes' (#20) from classes into development
Reviewed-on: ADUANASOFT/anexo76#20
2025-11-18 22:36:29 +00:00
KevinMrkz3221
99aff32eea feat: Convertir módulo de clases para usar TenantCRUDRoutes
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
2025-11-15 20:05:29 -06:00
ba40123333 feat: Enhance Pedimentos CRUD operations with related data handling
- 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.
2025-11-14 18:14:33 -06:00
aa35635397 feat: Implement customs brokers management interface
- 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.
2025-11-12 16:57:15 -06:00
6225122832 feat: Implement client and provider management dashboard
- Added data table component for displaying clients and providers with infinite scroll functionality.
- Created dropdown actions for each client/provider including copy ID, copy RFC, view details, edit, toggle status, and delete.
- Implemented dialogs for creating, editing, viewing details, and deleting clients/providers.
- Integrated API calls for fetching, creating, editing, deleting, and toggling status of clients/providers.
- Enhanced error handling and loading states for better user experience.
- Updated server-side logic to handle pagination and company selection for client/provider data retrieval.
2025-11-12 16:08:42 -06:00
a5c1bab201 Refactor authentication handling and API calls in dashboard routes
- Centralized API URL configuration and token management in $lib/server/api.ts.
- Replaced direct token access with a centralized method for retrieving tokens.
- Updated all dashboard reference data routes to use authenticatedFetch for API calls, improving token refresh handling.
- Simplified login route by utilizing centralized token management functions.
- Added a new layout file for the dashboard to pass user and company data to the client.
2025-11-12 09:46:59 -06:00
b68c4316ff Refactor backend and frontend code for improved structure and functionality
- Rearranged imports in multiple files for consistency and clarity.
- Updated logging middleware to exclude specific paths from logging.
- Enhanced security module by cleaning up token handling and improving tenant validation.
- Added tenant and company scoped mixins for better database model management.
- Implemented generic CRUD routes for tenant-scoped resources.
- Improved error handling and response management in API routes.
- Cleaned up login and logout processes to ensure proper session management.
- Introduced mechanisms to clear local storage and cookies on tenant change.
- Enhanced company store to detect tenant changes and clear data accordingly.
- Added new DTO mixins for currency and value affect flags.
2025-11-11 17:20:47 -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
29f637a5ee Refactor pedimento-related interfaces and forms to standardize date and payment fields
- Updated `PedimentoDates`, `PedimentoPayments`, `PedimentoTransportMeans`, and `PedimentoValidation` interfaces to include new fields and rename existing ones for consistency.
- Modified forms in Svelte components to reflect the updated interfaces, including new input fields for various dates and payment details.
- Enhanced status handling in the dashboard to accommodate new status options and improve user feedback.
- Implemented token validation on the server-side to ensure secure access to the dashboard.
- Cleaned up login logic to prevent redirection loops when tokens are present but potentially expired.
2025-11-07 10:08:55 -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
cf18c8e07d feat: Implement create/edit dialog for pedimentos management
- Added create-edit-dialog component for creating and editing pedimentos.
- Integrated dialog with data table actions for editing existing pedimentos.
- Implemented infinite scroll functionality in the data table for loading more pedimentos.
- Enhanced server-side loading of pedimentos with authentication checks.
- Added filtering options for pedimentos based on status, client ID, and year.
- Improved error handling and user feedback for actions like creating, editing, and deleting pedimentos.
2025-11-06 18:35:47 -06:00
d2ae76ef81 feat(theme): add theme toggle functionality and initialize theme state 2025-11-04 22:27:31 -06:00
dd566f408b Refactor sidebar navigation and update translations
- Updated sidebar navigation titles and URLs to use new reference data keys for consistency.
- Added additional items to the general catalogs section in the sidebar.
- Changed the user avatar fallback text from "CN" to "AS" for better representation.
2025-11-04 21:40:48 -06:00
f886498bac feat(nav-user): add language toggle functionality to user menu 2025-11-04 16:56:51 -06:00
ab57c6cd79 feat: Implement reference data management for states, transport modes, transport types, and valuation methods
- Added server-side loading logic for states, transport modes, transport types, and valuation methods with pagination support.
- Created Svelte components for displaying and managing states, transport modes, transport types, and valuation methods.
- Implemented infinite scroll functionality for loading more data as the user scrolls.
- Added error handling and user feedback for API interactions.
- Included dialogs for creating and editing entries in each reference data category.
2025-11-02 16:54:27 -06:00
27b5880524 feat(countries): implement CRUD operations and UI for country management, including dialogs and data table with infinite scroll 2025-11-02 15:40:26 -06:00
39365f4e83 feat(sidebar): enhance sidebar with additional navigation items and translations
feat(translations): update English and Spanish message files with new keys
refactor(layout): simplify layout component by removing loading state logic
refactor(page.server): adjust authentication flow to return public page for unauthenticated users
2025-11-02 15:33:19 -06:00
4099d73765 feat(containers): implement CRUD operations and UI for container management 2025-11-02 14:47:44 -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
19472b840c refactor: Remove console logs and warnings from authentication and API handling 2025-11-02 13:53:29 -06:00
886a3aeab3 feat: Implement token refresh mechanism and infinite scroll for code pedimento regimens 2025-11-02 13:48:42 -06:00
2b735c27b8 feat: Implement Code Pedimento Regimens Data Table
- Added columns definition for Code Pedimento Regimens including ID, Pedimento Code, Regimen Code, Type, and Actions.
- Created DataTableActions component for handling actions on each row.
- Developed data-table component to manage pagination and rendering of the data table.
- Introduced helper functions for rendering components and snippets in table cells.
- Integrated API call in the server-side load function to fetch Code Pedimento Regimens data with pagination support.
- Updated package.json to include lucide-svelte dependency for icons.
2025-11-02 13:15:05 -06:00
3c52db25e4 feat: enhance login form UI with improved styling and descriptive elements 2025-11-01 20:28:55 -05: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