61ec9deecb
Add utility functions for ObjectId handling and enhance expandObjectIds functionality
...
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit introduces several utility functions in `utils.js` to improve ObjectId handling, including `isByte`, `isTwelveByteBuffer`, and `objectIdToString`. The `expandObjectIds` function is updated to better handle various ObjectId formats, including BSON ObjectIds and serialized 12-byte buffers. Additionally, comprehensive tests are added in `utils.expandObjectIds.test.js` to verify the correct behavior of these enhancements, ensuring robust handling of ObjectId conversions and expansions.
2026-08-24 22:40:07 +01:00
0470f62e05
Refactor schema type handling and enhance utility functions in utils and database modules
...
This commit introduces several utility functions to improve schema type handling, including `getEmbeddedSchemaType` and `getObjectIdSchemaTypeFromPath`. The `getFilterFieldKind` function is updated to utilize these new utilities for better clarity and functionality. Additionally, the `getArrayParentPaths` function is renamed to `getArrayUnwindPaths` for improved readability, and the logic for fetching unique IDs is enhanced with a new `flattenRefIds` function. These changes streamline the code and enhance the overall management of schema references and array paths.
2026-08-22 20:02:21 +01:00
1c51766da6
Add user group management functionality and refactor permission settings
...
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit introduces a new feature for managing user groups within the application, including the creation of a `usergroup.schema.js` file for the Mongoose schema and corresponding route handlers for CRUD operations. Additionally, the permission settings functionality has been refactored to use a singular `permissionSetting` model instead of the previous plural form. Tests have been added to ensure the functionality of both user groups and permission settings services, enhancing the application's capability to manage user roles and permissions effectively.
2026-08-20 15:04:52 +01:00
234652f7b0
Enhance database utility functions for improved property value retrieval and reference handling
...
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
This update introduces several new functions in `database.js` to enhance the handling of Mongoose model references and property values. Key additions include `getObjectRefPathInfo`, `resolveMongooseModel`, and `fetchBasicObjectsByIds`, which improve the efficiency of fetching related objects based on property references. Additionally, the `getPropertyValues` function has been updated to support dynamic references and filtering, ensuring more robust data retrieval. Minor adjustments were also made to the `getJobPropertyValuesRouteHandler` to accommodate the new filtering capabilities.
2026-08-10 00:56:59 +01:00
6b80aee80a
Refactor thumbnail creation logic in createFileThumbnails function to handle GCode file types and improve thumbnail source validation. Cleaned up whitespace and enhanced caching logic for better performance in database.js.
2026-08-01 15:10:59 +01:00
1e807beacf
Implement neighbors caching and retrieval for various entities in the inventory and finance modules. Introduced new route handlers for fetching neighbors in invoices, payments, tax records, filament stocks, order items, part stocks, product stocks, purchase orders, shipments, stock audits, stock events, stock locations, and stock transfers. Updated allowed filters for improved query capabilities across these routes. Enhanced database.js with caching logic for neighbors, including cache invalidation on object updates.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-08-01 13:20:01 +01:00
5a4fecbae0
Refactored editObject function in database.js to utilize a merged object for updates, improving code clarity and reducing redundancy. Updated printer schema to include a default ID generation method and added alerts handling in editPrinterRouteHandler for enhanced printer management.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 21:11:43 +01:00
8423db2858
Implemented a merge utility function for object updates in database.js to handle array merging correctly, enhancing cache update logic for improved data integrity.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 15:00:37 +01:00
4231d548cc
Added sharp and blurhash dependencies, implemented thumbnail generation and retrieval functionality in the file management system. Updated database schema to include thumbnail metadata and enhanced route handlers for thumbnail access.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-26 03:07:23 +01:00
5e71afe246
Updated deleteObject function in database.js to convert ID values to strings before logging deletions and notifications, ensuring consistent data handling across operations.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-25 01:36:20 +01:00
287e74b682
Added new route handlers and service functions to retrieve distinct property values for various entities, including invoices, payments, tax records, filament stocks, and more. Updated corresponding routes to support these new functionalities across multiple management and production modules, enhancing data querying capabilities.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-24 23:19:48 +01:00
a42f953e9a
Removed console.log statements across various files to clean up the code and improve performance. This includes logging related to audit logs, user notifications, database operations, and session management.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-23 21:44:32 +01:00
82ca27756d
Refactored editObject function to flatten object ID references before updating the database, ensuring proper data structure. Added corresponding test case to verify the flattening functionality in update operations.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-20 02:28:13 +01:00
cb16385b33
Added printer and filament profile schemas, routes, and associated logic for managing profiles. Enhanced authentication for slicer uploads and integrated new routes for handling slicer-related operations. Updated database utilities and services to support new features, improving overall functionality and user experience.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-20 02:11:44 +01:00
ce6f396bcb
Audit log fixes.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-13 22:59:49 +01:00
710bfc6de6
Added searchObjects function to database module for enhanced querying capabilities, allowing searches by reference, ID, or text. Improved error handling and result formatting in the search process.
2026-07-04 16:43:50 +01:00
0300e00c8f
Enhanced delete functionality for filaments by adding a route handler that checks for dependencies before deletion. Updated the database service to support this check, ensuring objects in use cannot be deleted. Refactored related routes for consistency.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-03-08 01:53:07 +00:00
7c44f36590
Implemented product stocks and minor improvements.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-03-07 13:38:05 +00:00
3e47cb131b
Implemented notifications.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-03-01 01:42:30 +00:00
dea6a90b68
Removed development logging.
2025-12-27 15:19:13 +00:00
9ab08f39a1
Enhanced database functions with pagination support in listObjects, added checkStates function for state validation, and introduced editObjects function for batch updates. Updated editObject to include recalculate parameter.
2025-12-27 13:57:43 +00:00
d9247d2504
Refactored config system to have both production and development configs.
2025-12-13 23:01:03 +00:00
113a16818a
Implemented stats
2025-12-13 21:11:43 +00:00
08023e124c
Change API for object property listing to work better with the ui.
2025-12-03 00:07:27 +00:00
b44e3a5141
Added loads of features, updated packages and created schema sync.
2025-12-02 18:29:30 +00:00
dca386e6ae
Large amount of refactoring.
2025-11-16 17:06:54 +00:00
3776b4bea3
Refactor database operations: Enhanced filtering logic to translate keys ending with ._id for Mongoose, added optional distribution for new and delete operations, and implemented a recursive deletion function for child objects. Updated audit logging to handle distributed changes more effectively.
2025-09-05 23:23:26 +01:00
e1b0b707ba
Update dependencies, refactor routes, and enhance caching: Upgraded various package versions in package.json and package-lock.json for improved performance and security. Refactored routes to include new document-related endpoints and integrated caching mechanisms for user and token lookups to optimize authentication processes. Updated schemas to support new data structures and relationships, ensuring better data integrity and retrieval.
2025-08-18 00:51:46 +01:00