102 Commits

Author SHA1 Message Date
c2372f661e Update configuration, add dependencies, and enhance socket event handling
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Changed log level in config.json from "debug" to "trace" for more detailed logging.
- Added new dependencies "pdf-to-img" and "sharp" in package.json for image processing capabilities.
- Introduced 'renderTemplateJPG' event handling in SocketHost and SocketUser classes to support JPG rendering.
- Implemented the renderJPG method in TemplateManager for converting templates to JPG format, including error handling and logging.
2026-07-28 23:16:05 +01:00
53b5924767 Refactor parent template handling in TemplateManager
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Updated the logic to retrieve and validate the parent template content, ensuring it is correctly fetched and checked for string type.
- Improved error logging to provide clearer messages when parent template content is missing or invalid.
2026-07-28 02:51:02 +01:00
8c445a7392 Enhance socket management and error handling in template events
- Increased the maximum HTTP buffer size for the Socket.IO server to improve data handling capabilities.
- Added error handling in `handlePreviewTemplateEvent` and `handleRenderTemplatePDFEvent` methods to log errors and return error messages through callbacks.
- Implemented a check for unknown object types in the `TemplateManager` to prevent processing errors and return appropriate error messages.
2026-07-28 01:50:24 +01:00
00198b8199 Refactor subjob schema for improved consistency and readability
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Removed unnecessary line breaks in the subjob schema to enhance code clarity.
- Ensured all required fields maintain their definitions for better data integrity.
- Updated formatting for the `state` field to align with coding standards.
2026-07-28 00:22:27 +01:00
ef5cfd34e4 Refactor inventory and filament schemas for improved consistency and readability
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Enhanced the stock event schema by ensuring consistent formatting and removing unnecessary line breaks for better maintainability.
- Updated the filament schema to improve code readability and maintain required fields while maintaining functionality.
- Introduced a new `recalculate` method in the printer schema to manage printer state changes effectively.
- Added logic to handle host disconnection in the socket host, ensuring proper state management and logging.
2026-07-26 22:41:09 +01:00
f3a3d3914a Enhance gcode file schema to populate part information from partSku
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Added logic in the pre-validation hook to populate the `part` field in `parts` array based on the `partSku` if it is not already set.
- Improved data integrity by ensuring that part information is correctly retrieved and assigned during validation.
2026-07-26 21:21:35 +01:00
652d62c758 Enhance printer schema by adding optional code field and default ID generation
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new optional field `code` in the printer schema for additional identification.
- Updated the `_id` field to use a default value generated by `generateId()` for improved uniqueness.
- Ensured schema maintains required fields and defaults for better data integrity.
2026-07-26 21:11:49 +01:00
0a1f75d050 Enhance filament schema by adding vendor reference and improving formatting
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new optional field `vendor` in the filament schema to reference the vendor associated with the filament.
- Improved code formatting for better readability and maintainability, including consistent indentation and line breaks.
- Ensured that the `recalculate` method remains functional with updated schema structure.
2026-07-26 19:07:46 +01:00
766f4722ea Refactor stock event schema for improved readability and consistency
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Cleaned up the stock event schema by removing unnecessary line breaks and ensuring consistent formatting across the code.
- Enhanced readability of function parameters and return statements for better maintainability.
- Made minor adjustments to comments and structure to align with coding standards.
2026-07-26 19:00:30 +01:00
2b660ec61d Add history tracking to inventory schemas and stock event
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a `history` field in filamentStock, partStock, productStock, and stockEvent schemas to maintain historical records of current quantities and weights.
- Enhanced stock event processing to append history entries when values change, ensuring accurate tracking of stock changes over time.
- Implemented utility functions to manage history entries and enforce rate limits on updates for improved data integrity.
2026-07-26 18:38:04 +01:00
67f929e369 Refactor inventory schemas to remove redundant stock event calculations
- Removed the `getStockEventTotal` function and associated `recalculate` methods from filamentStock, partStock, and productStock schemas to streamline code and reduce redundancy.
- Updated stockEvent schema to include a new `recalculate` method that centralizes stock recalculation logic for improved maintainability.
- Enhanced the stockEvent schema with additional utility functions for building update data and recalculating parent stock based on events.
2026-07-26 16:10:38 +01:00
0b39eef045 Add hasThumbnails field to file schema
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new optional field `hasThumbnails` in the file schema to indicate the presence of thumbnail images.
- Set the default value of `hasThumbnails` to false for improved data management.
2026-07-26 03:07:45 +01:00
49226290b6 Add ActivityManager and integrate activity tracking functionality
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced the ActivityManager class to handle object activity tracking, including viewing and editing events.
- Implemented methods for setting, clearing, and retrieving activities, as well as subscribing to activity updates via websockets.
- Replaced the LockManager with ActivityManager in SocketUser and SocketManager classes to streamline activity management.
- Added comprehensive tests for ActivityManager to ensure correct functionality and error handling.
- Removed LockManager and its associated tests to eliminate redundancy in functionality.
2026-07-26 00:43:24 +01:00
e80022513f Remove unnecessary console logs from utility and schema files for cleaner code. Update index definitions for consistency in filament and printer profile schemas.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-23 21:44:40 +01:00
aad49bfcfd Add formatTraceData utility and integrate into logging
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new utility function `formatTraceData` to standardize the formatting of trace data for logging purposes.
- Updated various modules including auth, database, and stats manager to utilize `formatTraceData` for improved log clarity and consistency.
- Added new schemas for printer profiles and filament profiles to enhance the data model.
- Implemented tests for session authentication to ensure robust functionality and error handling.
2026-07-20 02:11:56 +01:00
15132fefa0 Add user settings management functionality
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new UserSettingsManager class to handle user-specific settings, including retrieval and updates.
- Implemented user settings schema to define defaults and manage user-specific configurations.
- Enhanced SocketUser class to integrate user settings event handlers for getting and updating settings.
- Added comprehensive tests for UserSettingsManager to ensure correct functionality and error handling.
2026-07-18 14:48:46 +01:00
1cb6efdb2d Update payment schema. 2026-07-18 14:34:26 +01:00
63c4471652 Updated models.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-18 13:36:04 +01:00
107ec278ef Fixed template crash.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-13 23:20:40 +01:00
4b2f4c4bf8 Add text indexes to various schemas for improved search capabilities
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced text indexes in invoice, payment, tax record, and multiple inventory and management schemas to enhance search functionality.
- Updated schemas include invoice, payment, tax record, filament stock, order item, part stock, product stock, purchase order, shipment, stock audit, stock event, stock location, stock transfer, app password, audit log, courier, courier service, document job, document printer, document size, document template, filament, filament SKU, file, host, material, note type, part, part SKU, product, product category, product SKU, tax rate, user, vendor, gcode file, job, printer, subjob, client, listing, listing variant, and marketplace schemas.
- Improved search performance and flexibility across the application by leveraging text indexing.
2026-07-04 22:03:31 +01:00
0d395d3cb0 Enhance SocketUser tests to verify removal of all listeners during disconnection.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Added verification for `removeAllListeners` method in both SocketUser and UpdateManager to ensure proper cleanup of event listeners during disconnection handling.
2026-07-04 16:54:55 +01:00
516402d40d Enhance UpdateManager and SocketUser classes to improve subscription management and disconnection handling.
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Added `removeAllListeners` method in UpdateManager to clear all subscriptions efficiently.
- Updated SocketUser's `handleDisconnect` method to log user disconnection more accurately based on user presence.
- Introduced subscription tracking in UpdateManager to manage active subscriptions.
2026-07-04 15:30:16 +01:00
cf979a6db0 Update invoice schema to support dynamic references for 'from' and 'to' fields by introducing 'fromType' and 'toType' fields, enhancing flexibility in vendor and client associations.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-04 15:18:25 +01:00
6d4ed27996 Remove 'fileName' field from part schema to streamline data structure and improve clarity in part management. 2026-07-04 15:18:19 +01:00
083cc95523 Integrate expandObjectIds utility in UpdateManager to enhance object update handling, ensuring expanded values are emitted in socket events.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-04 15:18:04 +01:00
7002e5a6c1 Enhance callback handling in SocketUser class to ensure callback is a function before invocation, preventing potential runtime errors. 2026-07-04 15:17:56 +01:00
0748256ce8 Refactor filament schema recalculation logic to use filamentSku model instead of orderItem model. This change improves the efficiency of recalculating SKUs associated with a filament.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-06-21 23:59:34 +01:00
4f9ed6039b Add fields for payment authorisation and decline tracking in payment schema
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced 'authorisedAt' and 'declinedAt' fields to the payment schema to track payment status changes.
- Added new rollup configurations for counting and summing authorised and declined payments.
2026-06-21 22:32:59 +01:00
b1245595d9 Refactor UpdateManager to enhance filter matching logic, replacing listObjects calls with direct filter checks, and improve event emission for object updates. Added tests for reference filter matching. 2026-06-21 22:32:17 +01:00
3481b07a55 Refactor tax record model: moved taxRecord schema to finance directory and updated import path in models.js 2026-06-21 22:23:03 +01:00
4bfc7fae2a Implemented about page.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-06-21 13:19:18 +01:00
a1e4bcaf18 Added 'part' reference to partSkuUsage schema to enforce required relationship with part model.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-06-20 23:16:22 +01:00
3196385c72 Updated configuration log level to debug, added product category model and references in product schema, enhanced stock schemas with recalculation methods, and improved socket event handling to support filters for subscriptions. 2026-06-14 23:52:03 +01:00
b9b40c55ca Numerious fixes. 2026-05-17 19:11:33 +01:00
c38c1dee24 Implemented stock locations.
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
2026-05-17 16:55:05 +01:00
ca3f28fc74 Added stock location and stock transfer models, updated inventory schemas to include stockLocation references, and modified stock event schema to support stockTransfer owner type. 2026-03-21 23:14:14 +00:00
8a9c272de4 Implemented listing schemas. 2026-03-21 21:39:21 +00:00
61e4b666ef Implemented market places.
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
2026-03-13 23:32:34 +00:00
938d44d8dc Updated GCode file schema. 2026-03-13 22:56:08 +00:00
b2c854bce9 Implemented materials.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-08 01:28:31 +00:00
7a500ffa58 Added missing SKUs. 2026-03-08 01:07:39 +00:00
bea9e45cd4 Implemented Part SKUs. 2026-03-07 23:34:17 +00:00
d1dbbe2b11 Implemented Product SKU.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-07 22:42:03 +00:00
f358eaa1d0 Updated product stock schema to include default state as 'draft', added 'postedAt' field, and introduced rollup configurations for 'draft' and 'posted' states.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-07 20:38:00 +00:00
a9999f95d0 Implemented product stocks.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-07 13:38:19 +00:00
a955def849 Enhanced CORS configuration in SocketManager and added allowed origins to server settings in config.json.
Some checks reported warnings
farmcontrol/farmcontrol-ws/pipeline/head This commit is unstable
2026-03-06 23:54:01 +00:00
ab70b6e11e Implemented sales order calculations.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-06 21:14:15 +00:00
028fa9dd94 Implemented multiple app passwords.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-02 01:58:10 +00:00
289673813a Implemented redis session storage.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-01 17:06:17 +00:00
840aa0781b Updated models. 2026-03-01 16:55:15 +00:00