Commit Graph

334 Commits

Author SHA1 Message Date
Torsten Schulz (local)
a0206dc8cb Add logging for model synchronization and cache handling in syncDatabase.js
Enhance sequelize.js by adding a console log to indicate when models are being synced without constraints. Update syncDatabase.js to include important notes on caching issues with Node.js ES-Modules and log the model loading process during deployment synchronization.
2025-12-18 16:34:10 +01:00
Torsten Schulz (local)
bf0eed3b03 Update model synchronization in sequelize.js to prevent automatic foreign key creation by adding constraints: false, ensuring foreign keys are managed through migrations only. 2025-12-18 16:14:53 +01:00
Torsten Schulz (local)
c8072b8052 Refactor multiple models to remove foreign key references while maintaining required fields, enhancing data integrity and simplifying model definitions. 2025-12-18 16:08:30 +01:00
Torsten Schulz (local)
c66fbf1a62 Enhance syncDatabase function to include cleanup for orphaned child_relation entries with invalid father_character_id, mother_character_id, or child_character_id references, improving data integrity and logging consistency. 2025-12-18 15:59:35 +01:00
Torsten Schulz (local)
e13a711a60 Refactor user_house model to remove default values for houseTypeId and userId fields, and enhance syncDatabase function to include cleanup for orphaned user_house entries with invalid house_type_id or user_id references, improving data integrity and logging. 2025-12-18 15:57:39 +01:00
Torsten Schulz (local)
346a326bfd Enhance syncDatabase function to include cleanup for orphaned promotional_gift entries, removing invalid sender and recipient character references, and improve logging for orphaned entry detection. 2025-12-18 15:49:34 +01:00
Torsten Schulz (local)
addb8e9a6d Refactor Notification model to remove VIRTUAL field definition for characterName and implement a getter method for improved data handling and synchronization. 2025-12-18 15:43:54 +01:00
Torsten Schulz (local)
ea8b9e661d Refactor VIRTUAL field detection logic in sequelize.js to improve accuracy and add special handling for Notification model's characterName field, addressing a Sequelize bug related to field mapping. 2025-12-18 15:37:52 +01:00
Torsten Schulz (local)
339ae844e9 Enhance VIRTUAL field detection in sequelize.js by implementing multiple identification methods, ensuring accurate model synchronization and preventing unintended field removals. 2025-12-18 15:34:26 +01:00
Torsten Schulz (local)
a0a7e81927 Add socket notification for status bar updates in FalukantService and enhance model sync by handling VIRTUAL fields in sequelize.js 2025-12-18 15:25:24 +01:00
Torsten Schulz (local)
31c23a0c40 Refactor syncDatabase function to improve orphaned entry cleanup for knowledge and notification, ensuring data integrity and consistent logging. 2025-12-18 15:20:09 +01:00
Torsten Schulz (local)
c1f22246ea Add cleanup for orphaned notification entries in syncDatabase functions to remove invalid user_id references, improving data integrity and logging consistency. 2025-12-18 15:18:21 +01:00
Torsten Schulz (local)
0a1388bf06 Add cleanup for orphaned knowledge entries in syncDatabase functions to remove invalid character_id and product_id references, enhancing data integrity and logging. 2025-12-18 15:17:01 +01:00
Torsten Schulz (local)
1a69b83983 Refactor stock cleanup logic in syncDatabase functions to remove orphaned stock entries with invalid branch_id and streamline logging for orphaned entries. 2025-12-18 15:13:24 +01:00
Torsten Schulz (local)
63f9443b77 Implement cleanup of orphaned user_param_visibility entries before schema updates in syncDatabase functions 2025-12-18 15:11:50 +01:00
Torsten Schulz (local)
6a9b2b8d1d Add index on (user_id, shown) in notification table to optimize markNotificationsShown queries and prevent deadlocks. Implement transaction handling in markNotificationsShown method for atomic updates. 2025-12-18 15:04:37 +01:00
Torsten Schulz (local)
8e1e0968ae Refactor product model by removing unused sellCostMinNeutral and sellCostMaxNeutral fields, and simplify product insertion logic in initialization script. 2025-12-18 14:41:56 +01:00
Torsten Schulz (local)
a486292880 Activate pgcrypto extension for digest() function in database initialization and migration scripts 2025-12-18 14:11:15 +01:00
Torsten Schulz (local)
ee4b0ee7c2 Füge Spalte product_quality zur Tabelle stock hinzu und erstelle Migration für weather_type_id in production 2025-12-16 13:00:29 +01:00
Torsten Schulz (local)
43d86cce18 Implement tax handling for branches by adding tax percent to regions, updating product sell costs, and enhancing UI for tax summaries in BranchView 2025-12-09 16:16:08 +01:00
Torsten Schulz (local)
25d7c70058 Enhance transport mode handling by adding localized labels and updating related components in MapRegionsView and BranchView 2025-12-09 11:53:56 +01:00
Torsten Schulz (local)
71c62cf5e8 Enhance vehicle speed display by adding localized labels in DirectorInfo, SaleSection, and BranchView components 2025-12-09 11:45:35 +01:00
Torsten Schulz (local)
a7350282ee Enhance parameter extraction in MessagesDialog by merging nested parameters for improved notification handling 2025-12-09 00:12:05 +01:00
Torsten Schulz (local)
676629bd8d Enhance notification enrichment by recursively collecting character IDs and attaching character names 2025-12-09 00:06:09 +01:00
Torsten Schulz (local)
1892877b11 Enhance notification handling by enriching notifications with character names 2025-12-08 23:55:50 +01:00
Torsten Schulz (local)
be218aabf7 Add character_name field and trigger for notifications in Falukant module 2025-12-08 23:37:07 +01:00
Torsten Schulz (local)
856f7d56bf Enhance parameter extraction for notifications in MessagesDialog component 2025-12-08 16:12:05 +01:00
Torsten Schulz (local)
000ebbdc2b Enhance currency formatting in MoneyHistoryView component 2025-12-08 15:35:17 +01:00
Torsten Schulz (local)
791314bef2 Enhance notification display and localization in MessagesDialog component
- Updated the MessagesDialog component to display notifications with titles and descriptions, improving clarity and user experience.
- Enhanced the formatBody method to support new notification structures, including extraction and formatting of parameters for better message presentation.
- Added a new formatParams method to handle various parameter types, ensuring accurate representation of values in notifications.
- Updated localization files in both German and English to include structured titles and descriptions for random events, enriching the user experience with detailed information.
2025-12-08 14:42:17 +01:00
Torsten Schulz (local)
bcb0b01324 Enhance child management features in Falukant module
- Added new translations for gender, baptism status, and child details in both German and English localization files, improving user experience.
- Integrated ChildDetailsDialog component into FamilyView for displaying detailed information about children.
- Updated the showChildDetails method to utilize the new dialog for better user interaction.
- Modified button styles for improved visual feedback when setting heirs.
2025-12-08 13:30:11 +01:00
Torsten Schulz (local)
03e3a21a25 Add heir management functionality in Falukant module
- Implemented setHeir method in FalukantService to designate a child as heir, including validation checks for user and child relationships.
- Updated FalukantController to expose the setHeir endpoint, allowing users to set heirs via the API.
- Enhanced FalukantRouter with a new route for setting heirs.
- Modified FamilyView component to include UI elements for setting heirs, with success and error feedback.
- Updated localization files in both German and English to include new translations related to heir management, improving user experience.
2025-12-08 13:22:43 +01:00
Torsten Schulz (local)
e97a2a62c9 Enhance weather data handling in FalukantService and update localization files
- Modified the FalukantService to explicitly load weather data for all regions, ensuring accurate weather information is associated with branches.
- Updated the return logic to utilize the newly loaded weather data, improving data accuracy in branch responses.
- Added new random event messages in both German and English localization files, enhancing user experience with richer event descriptions.
2025-12-08 11:54:10 +01:00
Torsten Schulz (local)
814f972287 Update branch selection logic in BranchView component
- Enhanced the onBranchSelected method to reload branches for updated weather information and reset the selected branch after reloading.
- Improved user experience by ensuring the correct branch is selected post-refresh, maintaining data accuracy and consistency.
2025-12-08 11:34:50 +01:00
Torsten Schulz (local)
274c2a3292 Add income update success message in DirectorInfo component
- Implemented a success message display for income updates in the DirectorInfo component, enhancing user feedback after successful updates.
- Added a timeout to automatically hide the success message after 3 seconds.
- Updated localization files to include new translations for income-related messages in both German and English, improving user experience for multilingual users.
2025-12-08 11:30:31 +01:00
Torsten Schulz (local)
4dbcebfab8 Add handling for transport removal events in BranchView component
- Implemented logic to update vehicle and inventory data when a transport is removed, ensuring real-time synchronization with the selected branch.
- Enhanced the component to refresh relevant sections (vehicles, inventory, storage) based on the transport removal event, improving user experience and data accuracy.
2025-12-08 09:36:18 +01:00
Torsten Schulz (local)
fadc301d41 Add bulk vehicle repair functionality in Falukant module
- Implemented a new repairAllVehicles method in FalukantService to handle the repair of multiple vehicles at once, including cost calculation and precondition checks.
- Updated FalukantController to expose the repairAllVehicles endpoint, allowing users to initiate bulk repairs via the API.
- Enhanced FalukantRouter to include a new route for bulk vehicle repairs.
- Modified BranchView component to add UI elements for repairing all vehicles, including a dialog for confirmation and displaying repair details.
- Updated German localization files to include translations related to bulk vehicle repair actions, improving user experience for German-speaking users.
2025-12-08 08:36:21 +01:00
Torsten Schulz (local)
b1d29f2083 Enhance nobility ID validation in FalukantService
- Added checks to ensure that provided nobility IDs are valid and exist in the database, improving error handling and user feedback.
- Updated logic to use loaded nobility objects when adding invited nobilities to a party, optimizing database interactions.
2025-12-05 20:49:12 +01:00
Torsten Schulz (local)
e756b3692d Refactor availability status logic in FalukantService
- Enhanced the logic for determining the availability status of vehicles based on the 'availableFrom' date.
- Added conditions to differentiate between 'building' and 'available' statuses, improving clarity and accuracy in status reporting.
- Updated comments for better understanding of the code flow.
2025-12-05 17:23:54 +01:00
Torsten Schulz (local)
74a3d59800 Add vehicle repair functionality in Falukant module
- Implemented a new repairVehicle method in FalukantService to handle vehicle repairs, including cost calculation and precondition checks.
- Updated FalukantController to expose the repairVehicle endpoint, allowing users to initiate repairs via the API.
- Enhanced FalukantRouter to include a new route for vehicle repairs.
- Modified BranchView component to add UI elements for repairing vehicles, including a dialog for repair confirmation and displaying repair details.
- Updated German localization files to include translations related to vehicle repair actions, improving user experience for German-speaking users.
2025-12-05 14:40:55 +01:00
Torsten Schulz (local)
0544a3dfde Add transport and inventory update handling in BranchView component
- Implemented socket event listeners for 'transport_arrived' and 'inventory_updated' to manage real-time updates in the BranchView component.
- Enhanced event handling logic to refresh vehicle and inventory data based on the selected branch, improving user experience and data accuracy.
- Updated the component to ensure proper cleanup of socket listeners on component destruction, maintaining optimal performance.
2025-12-05 14:13:14 +01:00
Torsten Schulz (local)
656c821986 Enhance SaleSection component to group and display transport data
- Updated SaleSection.vue to group running transports by relevant attributes, improving data organization and readability.
- Added a new computed property to calculate vehicle counts and total quantities for grouped transports.
- Introduced a new column in the UI to display the count of vehicles associated with each transport group.
- Updated German localization file to include translation for 'runningVehicleCount', enhancing user experience for German-speaking users.
2025-12-05 13:12:24 +01:00
Torsten Schulz (local)
865ef81012 Enhance FalukantService and UI components for improved product handling
- Updated FalukantService to allow optional inclusion of productType in queries, enhancing flexibility in data retrieval.
- Modified SaleSection.vue to conditionally display product information and size, improving user experience by handling cases with no product.
- Added new German translation for 'runningNoProduct' to enhance localization support for users.
2025-12-05 13:07:31 +01:00
Torsten Schulz (local)
5ad27a87e5 Enhance vehicle transport functionality in FalukantService and update UI components
- Modified the createTransport method in FalukantService to support optional vehicleIds, allowing for more flexible vehicle selection.
- Implemented logic to ensure that either specific vehicleIds or a vehicleTypeId must be provided, improving error handling for vehicle availability.
- Updated the BranchView component to include new UI elements for sending vehicles, including buttons for sending single or multiple vehicles of the same type.
- Added a modal dialog for selecting target branches when sending vehicles, enhancing user experience and streamlining transport operations.
- Updated German localization files to include new translations related to vehicle actions and transport functionalities.
2025-12-05 12:49:37 +01:00
Torsten Schulz (local)
085b851925 Add German translation for 'townhouse' in falukant.json
- Updated the German localization file to include the translation for 'townhouse' as 'Stadthaus'.
- This addition enhances the application's multilingual support and improves user experience for German-speaking users.
2025-12-05 11:42:41 +01:00
Torsten Schulz (local)
98dea7dd39 Implement empty transport feature in DirectorInfo component
- Added functionality to allow directors to initiate empty transports without products, enhancing logistics management.
- Introduced a new transport form in the DirectorInfo component, enabling selection of vehicle types and target branches.
- Updated the i18n localization files to include new translations for the empty transport feature.
- Enhanced the BranchView to pass vehicle and branch data to the DirectorInfo component, ensuring proper functionality.
- This update aims to improve user experience and streamline transport operations within the application.
2025-12-04 14:48:55 +01:00
Torsten Schulz (local)
e5ef334f7c Update FalukantService and PoliticsView to enhance election data handling
- Modified the FalukantService to use getOpenPolitics instead of getElections for retrieving accessible elections, improving alignment with frontend data display.
- Updated the PoliticsView to handle the response from the application submission more effectively, ensuring that already applied positions remain pre-selected after submission.
- These changes aim to streamline the election data flow and enhance user experience in the application process.
2025-12-03 17:19:13 +01:00
Torsten Schulz (local)
d6ea09b3e2 Enhance RevenueSection UI and streamline price loading logic
- Updated the display of city prices in the RevenueSection component to include both city names and formatted price values, improving user experience.
- Removed unnecessary console logs from the loadPricesForAllProducts method to clean up the code and reduce clutter, while maintaining essential functionality.
- Simplified the getBetterPrices method by eliminating redundant logging, enhancing code clarity and performance.
2025-12-03 16:30:10 +01:00
Torsten Schulz (local)
a51b8a1ff6 Fix 2025-12-03 16:29:56 +01:00
Torsten Schulz (local)
3c885b6ab9 Add detailed debug logging in loadPricesForAllProducts method of RevenueSection
- Enhanced the loadPricesForAllProducts method with additional console logs to track the loading process of product prices, including the current region ID and the number of products being processed.
- Improved visibility into the state of betterPricesMap after updates and provided detailed logs for each product's price loading, facilitating easier debugging and monitoring of price retrieval.
- Aims to enhance traceability and provide clearer insights into the price handling process within the RevenueSection component.
2025-12-03 16:22:08 +01:00
Torsten Schulz (local)
6b3b30108b Refactor betterPricesMap updates in RevenueSection for Vue 3 reactivity
- Updated the handling of betterPricesMap to create a new object for state updates, ensuring reactivity in Vue 3.
- This change replaces direct assignments with spread operator syntax to maintain the integrity of the reactive system.
- Aims to improve performance and align with Vue 3 best practices for state management.
2025-12-03 16:15:01 +01:00