0fe1714e1a
Add PDF generation and document template management features
...
This update introduces a comprehensive PDF generation system using Puppeteer, allowing for the rendering and downloading of document templates in various formats. Key features include the addition of preview and download routes for document templates, integration of EJS for template rendering, and utilities for converting PDFs to images. The new `TemplateManager` class manages template loading and rendering, while the `pdffactory.js` handles PDF generation. Additionally, several assets and styles for document templates have been added to enhance the visual presentation. This enhancement significantly improves the document management capabilities of the application.
2026-08-19 18:18:44 +01:00
5a4770820a
Refactor audit logs route and service for improved readability and maintainability
...
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This update enhances the `auditlogs.js` files by formatting the allowed filters for better clarity and refactoring the `listAuditLogsRouteHandler` function to improve code readability. Unused filter translations for Mongoose have been removed, streamlining the filtering logic. These changes contribute to cleaner code and easier future modifications.
2026-08-19 17:08:13 +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
2a30b7f3f6
Enhance filtering and parsing logic in utils.js and update route handlers for async support
...
This update introduces several utility functions in `utils.js` to improve the handling of ObjectId paths, schema types, and filtering logic. Key additions include `isObjectIdPath`, `getBaseProperty`, and `getFilterFieldKind`, which enhance the flexibility of property handling. Additionally, all route handlers in the finance and inventory modules have been refactored to support asynchronous operations, ensuring better performance and responsiveness when processing requests.
2026-08-09 22:27:45 +01:00
0dafdf1eda
Update slicer.js and slicer.test.js to include createFileThumbnails function. This change integrates thumbnail creation into the slicer service and updates the test suite to mock the new function, enhancing testing coverage for file upload scenarios.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-08-01 18:30:26 +01:00
c0112d61fb
Add thumbnail creation call in slicerUploadRouteHandler to generate file thumbnails upon upload. This enhancement improves the user experience by ensuring thumbnails are created for uploaded files.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-08-01 15:22:04 +01:00
7606afcf11
Add getObjectNeighbors mock implementation in various test files for improved neighbor retrieval functionality across multiple modules.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-08-01 13:26:23 +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
8ca49e5a87
Added vendor property to document printer route handlers for improved data handling during printer updates and creation.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-27 02:37:36 +01:00
e1b6814efd
Enhanced gcodeFile schema to populate part information during validation, improving data integrity for parts. Updated service functions to reflect changes in population logic for parts, ensuring accurate data retrieval.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 21:21:30 +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
3a79526eda
Added unit property to spotlight object in trimSpotlightObject function, enhancing the object structure for improved data handling.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 20:03:06 +01:00
02a05231d1
Added support for tags in new host creation by including tags from the request body in the host object. This enhancement improves the data structure for host management.
2026-07-26 19:40:11 +01:00
6f59f75b41
Refactored newFilamentStockRouteHandler test to accommodate updated filament stock structure, including net and gross weight properties. Adjusted mock implementations to ensure accurate testing of stock creation and event handling.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 19:28:01 +01:00
5ee8f332e2
Enhanced filament schema and related service functions to include vendor information. Updated route handlers to support vendor population in filament queries and exports, improving data management and retrieval capabilities.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-26 19:07:41 +01:00
fa74c464f9
Added history tracking to inventory schemas (filament, part, product stocks) and stock events, enabling better state management and historical data retention. Updated related service functions to incorporate new history logic for stock events and recalculations.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-26 18:37:55 +01:00
c710f46a6f
Added mock implementations for createFileThumbnails and getThumbnail functions in the file management tests to enhance testing capabilities for thumbnail generation and retrieval.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 03:10:32 +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
4db7ffff6a
Updated createOrUpdateUser function in auth.js to return the expanded object IDs from the new user document directly, ensuring accurate data representation upon user creation or update.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-26 00:43:32 +01:00
13ddcbce61
Added mock implementations for getPropertyValues in various test files to enhance testing capabilities across multiple services, including management, finance, inventory, and production modules. This update ensures consistent behavior in tests by simulating property value retrieval.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-24 23:28:11 +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
11ff82a9af
Enhanced various route handlers and services to support an additional master filter parameter for improved data querying capabilities. Updated related functions across multiple management and production routes, ensuring consistent handling of master filters in property-based queries.
2026-07-24 21:52:54 +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
e112ec4386
Implemented job editing functionality by adding an editJobRouteHandler and associated logic to update draft jobs. Enhanced job schema with a recalculate method to manage subjob creation and updates based on job quantity and printer assignments. Updated tests to cover new editing capabilities and ensure proper state checks.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-18 15:19:11 +01:00
9bba139998
Removed paymentDate field from payment schema and updated related route handlers to reflect this change, streamlining payment data management.
2026-07-18 14:00:44 +01:00
e192c04000
Enhanced courier service and listing schemas by adding cost-related fields and integrating courier services into listings. Updated route handlers and service logic to accommodate new fields, improving data management and retrieval capabilities.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-18 13:36:01 +01:00
bf3e23ddf1
Implemented subscribe and unsubscribe audit log functions in utils.js and integrated them into user notifier route handlers for tracking subscription changes. This enhances audit capabilities and maintains user activity logs.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-13 03:12:48 +01:00
367891eb33
Refactored population logic in invoice, payment, order item, and other route handlers to use constants for improved readability and maintainability. This change enhances consistency across the codebase and simplifies future updates to population fields.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-04 20:48:27 +01:00
0c7469b7c1
Added searchObjects mock implementation across various test files to enhance testing capabilities for finance, inventory, management, and sales modules. This update ensures that search functionality can be effectively tested in unit tests.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-04 16:56:50 +01:00
50eacb3974
Added text indexes to various schemas for improved search capabilities across finance, inventory, and management modules. Updated route handlers to include search functionality for invoices, payments, tax records, and inventory items, enhancing data retrieval efficiency.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-07-04 16:48:50 +01:00
e23ac3f6a3
Updated artifact URL construction in appupdate.js to ensure proper formatting of relative paths, enhancing reliability in artifact retrieval.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-07-04 15:11:15 +01:00
759aa1017f
Refactored login callback route handler to differentiate redirect behavior based on the redirect type, improving flexibility in response handling.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-22 03:02:01 +01:00
efb3fdbcb9
Refactored filament recalculation logic to utilize filament SKUs instead of order items, improving efficiency. Updated allowed filters in the filament SKUs route to include 'costWithTax' and modified population logic in the service for better data retrieval.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 23:59:33 +01:00
74a9139002
Removed 'fileName' field from part schema and corresponding route handlers to streamline data management and improve clarity in part creation and editing processes.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 23:15:35 +01:00
f74b85bb88
Added authorisation and decline functionality for payments, including new route handlers and schema updates to track authorisation and decline timestamps. Updated payment cancellation logic to reflect changes in payment states.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 22:32:57 +01:00
2996b1670f
Refactored tax record management by moving tax record schema and routes to the finance directory, enhancing organization. Implemented CRUD operations for tax records in the new service and added corresponding tests for route handlers.
2026-06-21 22:23:14 +01:00
a2bfd707e2
Removed unused 'populateFields' variable from the invoice route handler to streamline the code and improve clarity.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 21:41:22 +01:00
e14c1405da
Updated invoice route handler to reference 'toType' and 'fromType' fields, ensuring consistency with the latest schema adjustments.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 21:30:09 +01:00
99ef989cc5
Updated invoice route handler to include dynamic reference types for 'to' and 'from' fields, aligning with recent schema changes.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 21:29:43 +01:00
6e7419da67
Updated invoice schema to support dynamic reference types for 'from' and 'to' fields, and modified related service handlers to accommodate new 'fromType' and 'toType' properties.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 19:08:20 +01:00
a25deb0de2
Implemented view changes.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 18:11:55 +01:00
c507f708eb
Enhanced app update service with Redis caching for branch retrieval and current build information, improving performance and reducing API calls.
2026-06-21 15:42:19 +01:00
3d8e6325b2
Implemented software update installation.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 15:18:07 +01:00
645a1b6220
Implemented about page.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 13:19:15 +01:00
afce36b30a
Added app update storage URL to config and modified artifact mapping to use the new storage path in app update service.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 04:04:50 +01:00
779cb8cdf1
Fixed GCode file selection.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 02:15:45 +01:00
de40e0c3ff
Started app update implementation.
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
2026-06-21 01:59:07 +01:00
fd636c6c82
Fixed product SKUs.
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
2026-06-20 22:27:21 +01:00