2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-16 14:12:21 +00:00
Commit Graph

1227 Commits

Author SHA1 Message Date
Oliver
c484b1f134 Table pagination fix (#10236)
* Correct pagination offset calculation

* Add playwright tests

* Enhanced playwright test

* Add comment

* Fix typo
2025-08-28 20:38:11 +10:00
Oliver
ae16823d5d [ui] Settings fix (#10239)
* Enhance playwright test

* Update zustand

* Fix machine settings

* Fix for PluginSettingList

* Fix user plugin settings

* Fix issue in RelatedModelField

* Enforce values when rebuilding a form

* Update react-hook-form

* Enhanced playwright testing
2025-08-28 16:57:02 +10:00
Oliver
394377b028 Bump @inventreedb/ui version (#10234) 2025-08-26 12:47:10 +10:00
Oliver
e773d876bd Update react-window (#10232) 2025-08-26 11:33:09 +10:00
Oliver
82c3edd52a Display error message in email table (#10231) 2025-08-26 10:53:36 +10:00
Oliver
e9b8c264b1 Update dockerfile (#10225)
* Update dockerfile

Updated dockerfile to provide support for new node LTS

* Tweak plugin-react version

* Fix Dockerfile
2025-08-25 22:50:39 +10:00
github-actions[bot]
214e19dd10 New Crowdin translations by GitHub Action (#10205)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-25 18:38:27 +10:00
Oliver
f4233981f5 Build source location (#10220)
* Display build source location

* Fix docstring

* Enhance build availability filter

- Take build source location into account
- Improve pre-fetch

* Enhance type annotations
2025-08-25 18:38:22 +10:00
Oliver
564fcc42f2 Bump frontend lib version (#10219)
- Ref: https://github.com/inventree/InvenTree/pull/10202/
2025-08-25 16:02:01 +10:00
Matthias Mair
dee26bfa46 chore(frontend): upgrade react to 19 (#10202)
* Initial plan

* Upgrade React from 18.3.1 to 19.1.1 with TypeScript fixes

Co-authored-by: matmair <66015116+matmair@users.noreply.github.com>

* Update Vite React plugin to 5.0.1 for better React 19 support

Co-authored-by: matmair <66015116+matmair@users.noreply.github.com>

* Fix biome style issue in PluginUIFeature.tsx

Co-authored-by: matmair <66015116+matmair@users.noreply.github.com>

* remove biome

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-08-25 15:18:25 +10:00
Oliver
d6c7220419 Tweak 'description' column for build table (#10218) 2025-08-25 15:16:08 +10:00
github-actions[bot]
9dae8724d8 New Crowdin translations by GitHub Action (#10190)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-20 23:00:53 +10:00
Oliver
bd9c52eeaf Machine registry improvements (#10150)
* Add wrapper function for machine registry

* Decorate entrypoint functions

* Docstrings

* Fix for boolean setting

* Add playwright tests

* Use proper entrypoints

* Ensure settings are fetched correctly

* Prevent recursion of machine registry decorator

* Fix machine status display

* Enhanced warning msg

* Add simple machine sample printer

* Adds playwright tests for machine UI

* re-throw exception

* Define 'machine' plugin mixin class

* Adjust machine discovery

* Use plugin mixins for registering machine types and drivers

* Adjust unit test

* Remove plugin static files when deactivating

* Force machine reload when plugin registry changes

* Add plugins specific to testing framework

* Add test for plugin loading sequence

* Add session caching

- Significantly reduce DB hits

* Enhanced unit testing and test plugins

* Refactor unit tests

* Further unit test fixes

* Adjust instance rendering

* Display table of available drivers

* Cleanup

* ADjust unit test

* Tweak unit test

* Add docs on new mixin type

* Tweak machine overview docs

* Tweak playwright tests

* Additional unit test

* Add unit test for calling machine func

* Enhanced playwright tests

* Account for database not being ready
2025-08-20 23:00:39 +10:00
Oliver
ed31503d3b Column min width (#10204)
* Support minimum column width

* Adjust DescriptionColumn and StatusColumn

* Column refactoring

* Refactor PartColumn

* Refactor LineItemsProgerssColumn

* Tweaks
2025-08-20 21:49:27 +10:00
Oliver
885ec81a08 Import update (#10188)
* Add field to "update" existing records

* Ensure the ID is first

* Prevent editing of "ID" field

* Extract db instance

* Bump API version

* Prevent edit of "id" field

* Refactoring

* Enhanced playwright tests for data importing

* Update docs

* Update src/backend/InvenTree/importer/models.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/frontend/src/forms/ImporterForms.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix silly AI mistake

* Fix for table pagination

- Ensure page does not exceed available records

* Bug fix for playwright test

* Add end-to-end API testing

* Fix unit tests

* Adjust table page logic

* Ensure sensible page size

* Simplify playwright test

* Simplify test again

* Tweak unit test

- Importing has invalidated the BOM?

* Adjust playwright tests

* Further playwright fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-20 15:34:49 +10:00
Oliver
49cc5fb137 Build order consume (#8191)
* Adds "consumed" field to BuildLine model

* Expose new field to serializer

* Add "consumed" column to BuildLineTable

* Boolean column tweaks

* Increase consumed count when completing allocation

* Add comment

* Update migration

* Add serializer for consuming build items

* Improve build-line sub-table

* Refactor BuildItem.complete_allocation method

- Allow optional quantity to be specified
- Adjust the allocated quantity when consuming

* Perform consumption

* Add "BuildConsume" API endpoint

* Implement frontend form

* Fixes for serializer

* Enhance front-end form

* Fix rendering of BuildLineTable

* Further improve rendering

* Bump API version

* Update API description

* Add option to consume by specifying a list of BuildLine objects

* Add form to consume stock via BuildLine reference

* Fix api_version

* Fix backup colors

* Fix typo

* Fix migrations

* Fix build forms

* Forms fixes

* Fix formatting

* Fixes for BuildLineTable

* Account for consumed stock in requirements calculation

* Reduce API requirements for BuildLineTable

* Docs updates

* Updated playwright testing

* Update src/frontend/src/forms/BuildForms.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/frontend/src/tables/build/BuildLineTable.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add unit test for filters

* Add functional tests

* Tweak query count

* Increase max query time for testing

* adjust unit test again

* Prevent consumption of "tracked" items

* Adjust playwright tests

* Fix table

* Fix rendering

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-19 17:03:19 +10:00
Oliver
57970b53ec Consolidate rendering of inline items (#10189)
* Consolidate rendering of inline items

* Bug fix for user rendering
2025-08-19 08:01:52 +10:00
github-actions[bot]
11f1e27926 New Crowdin translations by GitHub Action (#10185)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-19 00:57:59 +10:00
Oliver
698249ecad Badges for supplier part (#10187)
* Badges for supplier part

* Robistify playwright test
2025-08-18 14:02:28 +10:00
github-actions[bot]
bc89af272d New Crowdin translations by GitHub Action (#10169)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-16 20:02:51 +10:00
Oliver
fa15466ce4 Fix api_url for 'user' type (#10182)
* Fix api_url for 'user' type

* Added regression test
2025-08-16 08:10:02 +10:00
Oliver
0bed5cf511 [refactor] PO receive fix (#10174)
* Enhance 'count_queries' helper

* Add threshold

* Update typing

* Better rendering

* Improve StockItem

- Make model operations more efficient

* improve with_mixin

- Cache config map against the session cache

* Refactor receive_line_item

- Pass multiple line items in simultaneously
- DB query optimization
- Use bulk_create and bulk_update operations

* Remove extraneous save call

* Fix for unit tests

* Fix return type

* Fix serializer return type

* Refactor part pricing updates

* UI tweaks

* Use bulk_create

* Refactor API and endpoints

* Bump API version

* Fix unit tests

* Fix playwright tests

* Remove debug msg

* Fix for table filter hover

* Adjust unit test
2025-08-15 22:01:19 +10:00
Oliver
0f04c31ffb [UI] Search shortcut (#10181)
* Add search shortcut

- Use '/' to open search drawer

* Add user setting for spotlight

* Hide spotlight if disabled

* Updated playwright tests
2025-08-15 20:41:03 +10:00
Oliver
33a275b69f Improve instance rendering (#10165)
- Fix visual glitches on narrow viewports
2025-08-13 01:40:05 +10:00
Oliver
216bc0cba5 Hover active filters (#10168)
- Quick view of active filters on table
2025-08-13 01:39:25 +10:00
github-actions[bot]
3e375504cb New Crowdin translations by GitHub Action (#10160)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-12 14:20:54 +10:00
github-actions[bot]
02b25860ca New Crowdin translations by GitHub Action (#10077)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-08 11:48:12 +10:00
Joe Rogers
5b55bed82b Fix annotations for returning serialized StockItems as lists (#9969)
* Fix annotations/pagination on StockApi itemSerialize and BuildApi outputCreate

* Add (to schema) field to specify serial numbers on create for stock item

* Return list on StockItem creation

* Update api version

* Update test to expect list return when creating stock items

* Add note about breaking changes to api version

* Add handling for stockitem list return on creation

* Update api version

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-08-08 11:13:42 +10:00
Oliver
adef0b4435 Fix for form auto-fill (#10152)
- Properly set value
- Add playwright test for this
2025-08-08 09:16:33 +10:00
Matthias Mair
ed45a4e5bf Email history enhancement (#10114)
* add warning that the log is useless by default

* Add setting to enhance email log again

* add missing test for #10109

* add test for delete protections

* add error code

* Update email.md

* Update email.md
2025-08-08 08:04:17 +10:00
Oliver
00017400ff Bulk add test results (#10146)
* Bulk creation of test results

- Add BulkCreateMixin class
- Add frontend support

* Refactor test result serializer

- Allow lookup by template name

* Updated unit test

* Add unit tests

* Add row actions

* Docs

* Fix failing tests

* Bump API version

* Fix playwright tests
2025-08-08 07:19:20 +10:00
Oliver
7df8e06f36 Setting fix (#10148)
* Fix for boolean setting

* Add playwright tests
2025-08-08 00:59:43 +10:00
Oliver
61c8a8f703 [UI] Enhance stock item rendering (#10143)
* Enhance stock item rendering

- Show location in forms
- Allow differentiation between items

* Unit test fixes

- Account for longer query time in docker mode

* Cast to string

* Improved rendering
2025-08-07 15:29:57 +10:00
Oliver
f1b5f2c379 [refactor] Stock return API endpoints (#10132)
* Add "StockReturn" API endpoint

- Provide multiple items
- Provide quantity for each item

* Add frontend form

* update frontend forms

* Refactor frontend

* Allow splitting quantity

* Refactoring backend endpoints

* cleanup

* Update unit test

* unit tests

* Bump API version

* Fix unit test

* Add tests for returning build items to stock

* Playwright tests

* Enhanced unit tests

* Add docs
2025-08-07 10:47:26 +10:00
Oliver
5574e7cf6b [refactor] Stocktake -> Stock History (#10124)
* Remove STOCKTAKE ruleset

* Adjust wording of settings

* Cleanup

* Improve text for global settings

* Add BulkDeleteMixin to "stocktake" endpoint

* Frontend updates

* Migrations

- Remove field 'last_stocktake' from Part model
- Remove fields 'user' and 'note' from PartStocktake model
- Remove model PartStocktakeReport

* Frontend cleanup

* Rename global setting

* Rewrite stocktake functionality

* Cleanup

* Adds custom exporter for part stocktake data

* Frontend cleanup

* Bump API version

* Tweaks

* Frontend updates

* Fix unit tests

* Fix helper func

* Add docs

* Fix broken link

* Docs updates

* Adjust playwright tests

* Add unit testing for plugin

* Add unit testing for stock history creation

* Fix unit test
2025-08-06 08:02:56 +10:00
Oliver
3e74ab5a85 [bug] Incomplete output print (#10130)
* Enable printing actions for build output table

* Add playwright tests
2025-08-05 12:02:22 +10:00
Oliver
fbb7707076 Fix issue with <StarredToggleButton /> (#10128)
- Prevent rendering if no instance provided
2025-08-05 11:11:31 +10:00
Oliver
120a7ebdf9 Enhance formatting for item render functions (#10127) 2025-08-05 11:03:06 +10:00
Oliver
619b08444a Tweak form padding (#10122)
- Allow room to prevent text clipping at bottom of form
2025-08-04 15:42:49 +10:00
Oliver
bdc8525aec Fix glitch in <RelatedModelField /> (#10113)
* Fix glitch in <RelatedModelField />

- Prevent search reset until debounced value changes
-

* Robustify playwright tests

* Further playwright tweaks

* Further playwright tweaks
2025-08-03 12:31:02 +10:00
Oliver
bc382cd883 Build on order (#10111)
* add DecimalColumn component

* Adds more production information to build lines

* Bump API version

* Improve rendering
2025-08-01 15:34:39 +10:00
Oliver
37c0322365 [build order] Auto select SN (#10110)
* Add build output information

* Auto-allocate tracked items

* Add playwright testing for workflow

* Fix display issue when creating new build output
2025-08-01 13:23:57 +10:00
Oliver
4895370d0d Email history enhancements (#10109)
* Improve formatting for <ConfigValueList>

- Only used for email settings currently

* API updates:

- Allow delete operations of email record
- Allow bulk delete operations of email record

* Table updates:

- Improved table rendering
- Allow delete ops

* Display timestamp in email table

* Add setting to control email cleanup interval

* Add scheduled task to delete old emails

* Bump API version
2025-08-01 12:32:22 +10:00
Oliver
4794c6d860 Table formatting (#10104)
* Format <BuildLineTable />

* More formatting

* Add helper function for running playwright tests

* Fix playwright test

* Further formatting updates

* Adjust order tables
2025-07-31 16:39:19 +10:00
Oliver
b8ea75b2b4 [plugin] Mandatory plugins (#10094)
* Add setting for "mandatory" plugins

* Add 'is_active' method to PluginConfig model

* Check against plugin config object by priority

* Prevent plugin from reporting its own 'active' status

* Refactor get_plugin_class for LabelPrint endpoint

* Fix typo

* Mark internal plugin methods as "final"

- Prevent plugins from overriding them

* Enhanced checks for bad actor plugins

* Enhanced unit test for plugin install via API

* Playwright tests for plugin errors

* Test that builtin mandatory plugins are always activated

* Force mandatory plugins to be marked as active on load

* API unit tests

* Unit testing for plugin filtering

* Updated playwright tests

- Force one extra plugin to be mandatory in configuration

* Adjust unit tests

* Updated docs

* Tweak unit test

* Another unit test fix

* Fix with_mixin

- Checking active status first is expensive...

* Make with_mixin call much more efficient

- Pre-load the PluginConfig objects
- Additional unit tests
- Ensure fixed query count

* Fix the 'is_package' method for PluginConfig

* Tweak unit test

* Make api_info endpoint more efficient

- with_mixin is now very quick

* Run just single test

* Disable CI test

* Revert changes to CI pipeline

* Fix typo

* Debug for test

* Style fix

* Additional checks

* Ensure reload

* Ensure plugin registry is ready before running unit tests

* Fix typo

* Add debug statements

* Additional debug output

* Debug logging for MySQL

* Ensure config objects are created?

* Ensure plugin registry is reloaded before running tests

* Remove intentional failure

* Reset debug level

* Fix CI pipeline

* Fix

* Fix test mixins

* Fix test class

* Further updates

* Adjust info view

* Test refactoring

* Fix recursion issue in machine registry

* Force cache behavior

* Reduce API query limits in testing

* Handle potential error case in with_mixin

* remove custom query time code

* Prevent override of is_mandatory()

* Prevent unnecessary reloads

* Tweak unit tests

* Tweak mandatory active save

* Tweak unit test

* Enhanced unit testing

* Exclude lines from coverage

* (final)? cleanup

* Prevent recursive reloads

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-07-31 08:26:24 +10:00
Oliver
d33f07a3fc PurchaseOrder table improvements (#10098)
Clear table after receiving items
2025-07-29 14:38:01 +10:00
Oliver
0ef5b12747 Sticky headers (#9022)
* Add user setting

* Use value of user setting

* Fix user for global

* Stickiness

* Updated docs
2025-07-29 10:43:36 +10:00
Oliver
2d7775852e Prevent re-rendering (#10093) 2025-07-28 18:59:55 +10:00
Oliver
010c855e86 Prevent 'modelRenderer' passing through (#10085)
- Not recognized by underlying component
2025-07-26 18:10:10 +10:00
Oliver
b2a5533b7a Stock filters (#10083)
* Stock filters

- Add "supplier" filter
- Add "manufacturer" filter

* Fix docstring
2025-07-26 16:59:26 +10:00