Commit graph

337 commits

Author SHA1 Message Date
Jan
35ea0da5a9 update group name length 2025-11-17 11:41:11 +01:00
Jan
0a3d759733 Added single user fetch to user api 2025-11-17 10:16:01 +01:00
Jan
cd66b5bba5 Renamed error store to notification store, centralized spinner modal
Increased thread pool capacities in `AsyncConfig.java` and adjusted database schema for larger text fields. Enhanced HS code validation logic and added logging to `EUTaxationApiService` for improved traceability. Cleaned up unused error modal code and aligned styles for calculation processing spinners.
2025-11-16 23:02:11 +01:00
Jan
5adadb671e Centralized notification/error management in frontend, more infos in error log, bugfixing in tariff rate services. 2025-11-16 18:32:28 +01:00
Jan
35b0b8584d Refactored MaterialEdit.vue to streamline field definitions using v-for, centralized field properties in displayFields, and enhanced input handling for HS codes and tariff rates. Improved property validation and default handling in component props for better maintainability. Updated styles and removed unused CSS for a cleaner layout. Adjusted startCalculation in premiseSingleEdit.js for payload consistency. 2025-11-16 10:09:58 +01:00
Jan
a4d0f4f913 Integrated NomenclatureService for handling incomplete HS codes, added resolveIncompleteHsCodesIntern for enhanced nomenclature resolution, updated MaterialEdit.vue for dynamic HS code and tariff rate inputs, and introduced nomenclature master data table with initialization script. 2025-11-15 16:49:29 +01:00
Jan
305033e8f0 Removed unused components, services, and database schema related to nomenclature and custom tariff handling, seperated mass edit and single edit in frontend:
- **Frontend**: Deleted `SelectNode.vue` component and related styles.
- **Backend**: Removed `CustomController`, `ChangeMaterialService`, `ChangeSupplierService`, `NomenclatureService`, `NomenclatureRepository`, and unused DTOs.
- **Database**: Dropped `nomenclature` table and eliminated associated migration script.
- **Other**: Cleaned up imports and references to the removed implementations throughout the codebase.
2025-11-14 20:34:05 +01:00
Jan
b99e7b3b4f Enhanced distance calculation by integrating support for user-specific nodes:
- **Backend**: Updated `DistanceMatrixRepository`, `DistanceApiService`, and related services to handle user-node-specific relationships and unique constraints.
- **Database**: Modified `distance_matrix` table schema to include `from_user_node_id` and `to_user_node_id` with exclusive constraints and foreign key references to `sys_user_node`.
- **Frontend**: Refined error modal messages and adjusted layout for better usability. Increased pagination size in error logs for improved data display.
2025-11-12 14:04:05 +01:00
Jan
dc6ed83853 fixed upload right managment. Checking if the hs code is 10 - 12 chars long and numbers only 2025-11-10 22:19:10 +01:00
Jan
3e9e9e1d34 Replaced MaterialExcelMapper with MaterialFastExcelMapper using fastexcel instead of Apache POI. 2025-11-10 22:00:31 +01:00
Jan
a009c35b52 copy to clipboard functionality for system log. Report view sharpening 2025-11-10 20:19:49 +01:00
Jan
2975c8c3a1 fixing error in session refresh, fixing error in common.js/buildDate, added enhanced information to error log detail page 2025-11-10 17:14:49 +01:00
Jan
5d775a7dda Standardized date formatting across components by introducing buildDate utility:
- Replaced duplicate date-handling logic in multiple components (e.g., `CountryProperties.vue`, `Rates.vue`, `ErrorLog.vue`) with centralized `buildDate` method from `common.js`.
- Improved date consistency and readability by adopting `YYYY/MM/DD` format with optional time support.
2025-11-10 14:50:59 +01:00
Jan
af7b51578b Added session management with periodic keepalive:
- **Backend**: Introduced `SessionController` with `/keepalive` endpoint to keep sessions active.
- **Frontend**: Enhanced session handling with `startSessionRefresh` and activity tracking in `backend.js`. Integrated session refresh initiation in `main.js`. Adjusted logic in `CalculationAssistant.vue` for input validation.
- **Other Changes**: Updated `BulkOperationRepository` cleanup interval to 60 minutes for improved timeout handling.
2025-11-10 14:19:01 +01:00
Jan
982b637d47 Refined BulkOperationRepository timeout handling logic: renamed timeout to cleanupTimeouts and expanded state conditions to include SCHEDULED. 2025-11-07 18:39:19 +01:00
Jan
1b1356e590 Enhanced bulk processing with executor updates and timeout handling:
- **Backend**: Added `bulkProcessingExecutor` with advanced configuration (thread naming, queue handling, timeout behavior). Updated `BulkOperationController` with monitoring endpoint to expose executor stats. Enhanced `BulkOperationExecutionService` with timeout handling and error logging for bulk operation processes.
- **Frontend**: Enabled `allowFreeInput` in `AutoSuggestSearchBar.vue` for enhanced customization. Adjusted date handling across multiple components for improved consistency and formatting.
- **Database**: Introduced `timeout` logic in `BulkOperationRepository` to handle stale processing states.
2025-11-07 18:30:30 +01:00
Jan
d9229b3d73 Integrated EUTaxationApiWrapperService and asynchronous precheck:
- **Backend**: Added `EUTaxationApiWrapperService` to validate HS codes during pre-calculation. Updated `PreCalculationCheckService` to run asynchronously and return `CompletableFuture`.
- **Frontend**: Refined toast messages in `CalculationSingleEdit.vue` to handle and display server errors more clearly.
- **Database**: Marked distance matrix entries as stale during node updates.
- **Other**: Added `customLookupExecutor` for asynchronous processing in `AsyncConfig`. Updated related services and repositories to utilize async improvements.
2025-11-07 12:09:21 +01:00
Jan
a17d50b9a6 Added caching for user authorities and refactored filters:
- Introduced `UserAuthorityCacheService` with support for caching user authorities using Caffeine.
- Added `CacheConfig` with Caffeine configuration for authority caching.
- Implemented `AuthorityRefreshFilter` to dynamically refresh user roles in the security context.
- Refactored filter package structure by moving existing filters to `config.filter`.
- Updated `SecurityConfig` to integrate the new `AuthorityRefreshFilter`.
- Modified `UserService` to invalidate user authority cache upon user updates.
2025-11-07 10:48:03 +01:00
Jan
62e911caf5 Added generateRandomWorkdayId method in SecurityConfig to create random IDs if workday id shall be ignored 2025-11-07 09:58:38 +01:00
Jan
21e8a9e43a Refactored UserRepository.update to return user ID and updated SecurityConfig to handle returned value. 2025-11-07 09:39:37 +01:00
Jan
a28a14d1d3 Added configurable user identification logic:
- Introduced new properties to differentiate identification by `email` or `workdayId`.
- Updated `SecurityConfig` to handle claims dynamically based on `application.properties` configuration.
2025-11-07 09:13:01 +01:00
Jan
ae10417c44 Added bulk material update endpoint and support for deprecation handling logic:
- **Controller**: Introduced `updateMaterial` method in `MaterialController` for batch material updates.
- **Service**: Implemented update logic in `MaterialService` to handle both updates and deprecations based on the new `MaterialUpdateDTO`.
- **Transformer**: Updated `MaterialUpdateDTOTransformer` to map deprecation status and remove unused fields.
- **Repository**: Added `updateByPartNumber` and `deleteByIds` methods in `MaterialRepository` for efficient updates and deprecations.
2025-11-06 20:22:48 +01:00
Jan
6ab0f4d630 Refined tariff rate handling for bulk and mass edit features:
- **Frontend**: Properly adjusted `tariff_rate` validation and formatting in `BulkEditRow.vue`. Improved logic in `CalculationMassEdit.vue` by resetting `doLookup` state post mapping.
- **Store**: Fixed `tariffRates` mapping to ensure correct data application during premise updates.
2025-11-06 19:17:39 +01:00
Jan
d9b27bc987 Integrated EUTaxationApiWrapperService for enhanced tariff rate calculations:
- **Backend**: Introduced `getTariffRateImmediate` method for immediate tariff rate retrieval, replacing `CustomApiService` in relevant services. Updated constructor dependencies across services.
- **Frontend**: Added tariff measure sorting by code for improved data presentation in customs store.
2025-11-06 18:13:08 +01:00
Jan
ce6b8dd9b0 Integrated tariff rate calculations and customs API:
- **Backend**: Introduced `EUTaxationApiService` for TARIC data retrieval and integrated tariff rate lookup functionality. Added supporting DTOs and updated services to handle custom measures and updated logic for material and supplier changes.
- **Frontend**: Enhanced mass and single edit calculation components to include tariff rate lookup functionality and warnings. Introduced `useCustomsStore` for state management of customs data.
- **Database**: Added `nomenclature` table for storing HS code-related information.
- **Other**: Configured SOAP client for TARIC API and added logging for debugging.
2025-11-06 17:35:41 +01:00
Jan
be1ef5091b Refined distance calculations and enhanced reporting layout:
- **Backend**: Adjusted `getDistance` implementation to retrieve distances via `DistanceApiService`, with fallback to `fast` algorithm. Updated `DistanceService` to utilize API responses for more accurate calculations. Enhanced `ExcelReportingService` handling for main run containers and mixed premises logic.
- **Frontend**: Improved `Report.vue` structure for better readability and modularity. Added logic to conditionally display container details based on the main run's existence.
2025-11-01 13:27:12 +01:00
Jan
f7efc9eb81 Refined actuator endpoint security rules:
- Allowed public access to `/actuator/health`.
- Enforced authentication for other `/actuator/**` endpoints in production.
- Allowed all `/actuator/**` endpoints in development.
2025-10-30 21:56:35 +01:00
Jan
f62cfbfb66 Fixing API access through external APPs 2025-10-30 21:36:10 +01:00
Jan
d06aa74029 Fixing the redirect loop in the entra id authentication 2025-10-30 18:38:14 +01:00
Jan
9bf148a09f Added csrf protection matcher to exclude bearer token calls from csfr 2025-10-30 17:04:33 +01:00
Jan
98e69164ed Added custom BearerTokenResolver to stop oauth2ResourceServer from evaluating requests with jwt token (API) 2025-10-30 16:37:52 +01:00
Jan
a3563449c8 Refined production CORS configuration and streamlined /oauth2/token settings:
- Centralized CORS logic with distinct configuration for `/oauth2/token`.
- Improved handling of allowed methods, headers, credentials, and max age.
2025-10-30 15:18:57 +01:00
Jan
a289cce805 Enhanced CORS configuration for OAuth2 and role-based tab visibility in frontend:
- **Backend**: Added separate CORS settings for `/oauth2/token` endpoint with enhanced origin handling based on new `lcc.allowed_oauth_token_cors` property.
- **Frontend**: Updated `Config.vue` to conditionally display `nodesTab` and `bulkOperationsTab` based on user roles.
2025-10-30 15:05:12 +01:00
Jan
e1791942cb Updated CORS configuration to handle empty allowed origins and added placeholder property. 2025-10-30 14:25:09 +01:00
Jan
c02a716ecc added release gitea action 2025-10-30 14:21:08 +01:00
Jan
5486c25603 Added production VITE environment file and renamed development environment file 2025-10-30 14:02:51 +01:00
Jan
a7ea4d97d2 Enhanced owner validation and property checks in services:
- **Backend**:
  - Check ownership before execution in DestinationService and PremisesService
  - Added Valid period check in pre flight check
  - Fixed allowed headers in cors config
  - added user groups to migration
2025-10-30 13:39:59 +01:00
Jan
302967e645 Enhanced error handling and route saving mechanism, improved UI modal behavior:
- **Frontend**: Updated `CalculationAssistant.vue` modal to disable backdrop closing via `:close-on-backdrop="false"`.
- **Backend**:
  - Adjusted error message processing in `CalculationExecutionService` to handle potential `null` values gracefully.
  - Improved route saving in `DestinationService` by correcting source node logic and refining `RouteIds` assignments.
2025-10-28 21:35:30 +01:00
Jan
e1c1b2918f Updated Air Freight Share Properties logic:
- Modified V4 migration to calculate `AIR_SHARE` as `0.03` for countries with `SAFETY_STOCK` value of 55, otherwise `0`.
- Refactored SQL to use `CASE` expression and JOIN for safety stock lookup within property set constraints.
2025-10-28 18:40:06 +01:00
Jan
d840b05da2 Enhanced OAuth2 API Tester tool, updated validation and improved CORS configuration:
- Improved OAuth2 Tester UI/UX: added support for multiple HTTP methods, query parameters, request body validation, collapsible result sections, and dynamic input handling.
- Enhanced `UserController` with validation annotations for `UserDTO` in API requests.
- Updated `UserDTO` to include stricter validation constraints (`@NotNull`, `@NotBlank`, `@Email`).
- Adjusted CORS configuration to allow all origins for OAuth endpoints.
2025-10-28 18:01:21 +01:00
Jan
42913045b3 Merge remote-tracking branch 'origin/main' 2025-10-28 15:58:26 +01:00
Jan
7ff657ba0a Added OAuth2 API Tester tool and improved CORS/OAuth support:
- Introduced `OAuth2 API Tester` (HTML+JS) in `/tools`.
- Updated security configuration:
  - Added comprehensive CORS configurations for OAuth endpoints.
  - Enhanced CSRF handling to exclude `/oauth2/token`.
  - Adjusted role handling to ensure case-insensitivity.
- Fixed `RIGHT-MANAGEMENT` role in `UserController`.
- Replaced logo asset in frontend.
2025-10-28 15:58:15 +01:00
Anja Guenther
9604d342d7 Merge branch 'main' of git.avatic.de:avatic/lcc_tool
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2025-10-26 21:52:17 +01:00
Anja Guenther
562764561e Merge branch 'main' of git.avatic.de:avatic/lcc_tool 2025-10-26 21:50:59 +01:00
Anja Guenther
4c6b0e5fe2 Container Berechnung limiting factor korrigiert,
Migration für materialien vollständig,
Safety target für countries geändert
2025-10-26 21:50:01 +01:00
Jan
68b688673c Added AppGroupItem Vue component for displaying group information with selection functionality 2025-10-26 17:22:32 +01:00
Jan
6acfbe1602 Introduced app management functionality:
- Added Vue components (`AppListItem`, `AddApp`, `Apps`) for app management.
- Implemented Vuex stores for apps and groups.
- Enhanced backend:
  - CRUD operations for apps and group mappings.
  - Introduced a new service for app-related logic.
  - Updated database schema and DTO structure.
- Adjusted security and CORS configurations.
- Updated docker-compose to align service dependencies.
2025-10-26 17:19:46 +01:00
Jan
f75b20830c Extended role-based access in MaterialController to include additional roles. 2025-10-26 12:37:11 +01:00
Jan
932b42d926 Cleanup application.properties and .env, added vite .env to repository 2025-10-25 18:52:54 +02:00
Jan
55daec064c Commented out dynamic OAuth2 redirection configuration in SecurityConfig. 2025-10-25 17:19:06 +02:00