Commit Graph
1888 Commits
Author SHA1 Message Date
Syogo-SuganoyaandClaude Opus 5.5 1f51dfe64b [UI] Warn before closing the template editor with unsaved changes (#13280)
* Warn before closing the template editor with unsaved changes

- Allow DetailDrawer close actions to be intercepted (onBeforeClose)
- Track the saved template code in the TemplateEditor
- Ask for confirmation before discarding unsaved changes (drawer close / page unload)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Treat a failed unsaved-changes check as unsaved

- Ask for confirmation if the editor code cannot be read
- Reject the plugin preview update if no handler is registered, so the template is not assumed to be saved

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Do not treat unavailable editor code as saved

An editor which is still initializing (e.g. a plugin editor) returns no
code yet. Fall back to the code which was last handed to the editor, and
ask for confirmation if the editor content is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Only mark the template as saved when the preview returns a promise

A preview handler which returns synchronously does not report whether the
template was actually stored, so keep the editor marked as unsaved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 18:30:33 +11:00
Matthias Mair a87489ca44 refactor: use generic model insights for frontend features (#13072)
* feat:generic model insights

inspired by https://github.com/inventree/InvenTree/pull/13069 this adds a more general approach to generic features like attachments, notes

some tests and functions written with assistance of AI

* lazy load panels

* add pr version

* fix snapshot issue

* move history panel to new generic mechanism

* Update api_version.py

* move to generic

* remove duplicate

* clean up import

* fix test

* add ignore for broken contract in test
2026-11-16 09:45:17 +11:00
github-actions[bot] 016f965ac8 New Crowdin translations by GitHub Action (#13240)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-15 18:28:37 +11:00
Oliver b2a9218cfb [bug] API row locking (#13274)
* row locking on patch

* row-level locking on action endpoints

* apply row locking to barcode actions

* additional row-locking for build actions

* rename exception class

* updated docs

* Add specific error code

* Fix translated text

* Handle AttributeError
2026-11-15 15:26:47 +11:00
Alex Martens 80ad822688 fix(backend): preserve redirect target through /accounts/login/ (#13279)
AuthRequiredMiddleware redirects unauthenticated requests for
server-rendered paths to /accounts/login/?next=<path>, but the
account_login redirect view then bounced straight to the frontend
root, dropping the target.

Forward a safe relative 'next' parameter to the SPA's /logged-in
page instead, where LoggedIn.tsx recovers it once the login flow
completes. Absolute or protocol-relative targets are dropped to
rule out open redirects.
2026-11-14 19:36:06 +11:00
ed0bbc3c75 [UI] Size the detail image modal to the viewport (#13264)
Clicking a detail image opened it at Mantine's default modal width
(about 440 px), so a large image was shown no bigger than the preview.
Open the modal at 90vw and cap the image at 85vh so it fits the window.

Fixes #13252

Co-authored-by: jbc-af <jbc@autofruit.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-11-14 16:36:16 +11:00
0aa364dea3 Add optional linked part revision column to BOM table (#13267)
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-11-14 16:36:01 +11:00
OliverandCopilot Autofix powered by AI 12c16000d9 MFA workflow fixes (#13241)
* MFA workflow fixes

- Fixes https://github.com/inventree/InvenTree/issues/13238
- Verify email on successful password reset
- Invalidate password on account creation
- Fix MFA workflows
- Add regression tests

* Update docs

* Update OTP secret expectation to use exact match

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

* Attempt to fix flaky test

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-11-14 13:34:57 +11:00
b9b46797c2 fix(frontend): preserve redirect target through SSO login (#13270)
The redirect target set by ProtectedRoute travels in react-router state,
which does not survive the full page navigation through the identity
provider. After the SSO round trip users always landed on /home.

Forward the target through the flow as a 'next' query param on the
allauth callback URL instead, and recover it on the /logged-in page.
Falls back to /home when no valid in-app path is present.

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-11-14 13:11:56 +11:00
Matthias Mair de77fc4293 fix(frontend): mfa test reauth dialogs (#13273)
* fix the stepts that need a password now

* use different selectors to make more robust

* fix popup breaking flow

* support password reauth in reauth
2026-11-14 10:07:00 +11:00
Oliver c80090b3ce [UI] Improve error messaging for API fields (#13254)
- Handle condition where an API field has the same name as one of the "backup" catch-all fields
2026-11-12 17:39:48 +11:00
OliverandMatthias Mair af5055b33e Messages endpoint (#13247)
* Adds /api/status/ endpoint for admin-facing system messages

* update alerts menu

* right-align badges

* Rename SERVER_RESTART_REQUIRED to _SERVER_RESTART_REQUIRED

* Adjust API endpoint

- Move to /api/system/status/
- Make messages a sub-list
- Remove "system_state" from /api/

* move staff-only messages to new endpoint (and adjust UI accordingly)

* system dialogs staff only

* Reduce scope and revert most changes

* ignore reports in frontend

* clean up blob

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-11-12 11:14:01 +11:00
Oliver 2c8ec53ed2 [UI] Display "primary" badge for SupplierPart (#13246)
When displaying a SupplierPart inline (e.g. within a form) - add a "Primary" badge
2026-11-11 14:33:22 +11:00
Miguel Brandt 6c363d4a32 [UI] Show consuming build orders in child stock items (#13208)
* Show consuming build orders in child stock items

* Reference PR in changelog and API version notes

* Clarify stock reference test setup and assertions

* Use optional build details for consumed stock

* Include consuming build references in stock exports

* Make stock prefetch test portable to MySQL
2026-11-11 11:27:02 +11:00
Matthias Mair a8a867400d feat(backend): enable disabling of basic authentication (#13169)
* !feat(backend): disable basic authentication by default

* align PR

* add PR number

* fix schema creation/discovery

* mask basic auth

* fix error code

* reduce diff

* adjust changelog message

* fix test (needs basic auth which is now off by default)

* switch to default on; retain warning

* update test for new default

* fix assertation
2026-11-10 13:32:38 +11:00
github-actions[bot] be9639266d New Crowdin translations by GitHub Action (#13204)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 11:40:19 +11:00
Oliver 3383e865cb [UI] Fixes for "tags" field (#13233)
- Fetch appropriate 'tags' detail in the form request
- Additional playwright tests
2026-11-09 23:42:12 +11:00
Oliver 48ec9d1dd2 [UI] playwright updates (#13231)
* [UI] playwright updates

- Increased coverage
- various tweaks / fixes

* Additional updates

* Robustify further
2026-11-09 22:57:13 +11:00
Oliver df2a5d853e Add CI checks for /api-doc/ endpoint (#13210)
* Add CI checks for /api-doc/ endpoint

Ref: https://github.com/inventree/InvenTree/issues/13200

* fix playwright test

* Reduce flakiness
2026-11-08 17:55:12 +11:00
Carmelo Mordini 92f93a9b83 [UI] Fix row click in parametric table when preview panel is disabled (#13206) 2026-11-07 13:31:28 +11:00
Oliver 02d6a038bf Token issuance updates (#13214)
- Ensure all token issuance endpoints are explicitly checked for MFA auth
- Additional backend unit tests
- Additional frontend unit tests
2026-11-07 13:18:30 +11:00
github-actions[bot] a9c21da6a7 New Crowdin translations by GitHub Action (#13192)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-06 11:52:55 +11:00
Oliver c5c878d6af [bug] API form fixes (#13196)
* Improve API error feedback

* Add 'message' field opt

* Update error handling logic
2026-11-05 18:41:11 +11:00
Oliver 5fe105b948 [UI] Add link rendering helper for plugin (#13193)
- Adds reusable helpers for rendering sanitized links
- Can be used by plugins
2026-11-05 17:35:25 +11:00
Oliver 9416b81799 [UI] playwright test fixes (#13197) 2026-11-05 17:07:05 +11:00
d01645c5fb feat(stock): add exclude_from_stock option to StockLocation (#7064) (#13166)
* feat(stock): add exclude_from_stock option to StockLocation (#7064)

* feat(stock): add UI detail, table filters, API version bump, and prek formatting (#7064)

---------

Co-authored-by: UGREEN USER <jaharoni@debian.dedomain>
Co-authored-by: WholeTroutMedia <cortex@inceptionengine.systems>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-11-05 12:06:26 +11:00
github-actions[bot] df098c46b0 New Crowdin translations by GitHub Action (#13160)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-05 08:32:56 +11:00
Oliver 62d363a99d [UI] Context details for plugin actions (#13172)
* [UI] Context details for plugin actions

Adds additional target instance context when registering custom UI actions

* Add CHANGELOG entry

* Improve test
2026-11-03 17:22:26 +11:00
Oliver 461186bee9 [UI] Launch forms directly from plugin (#13174)
* [UI] Launch forms directly from plugin

Provide ability for plugins to dynamically launch modal forms, without specifying the underlying react components.

This allows (for example) a primary action on a detail page to launch a new native API form

* Add CHANGELOG entry
2026-11-03 16:41:33 +11:00
Oliver ad723c15e4 Update frontend plugin lib (#13173)
* Update frontend plugin lib

* Bump package.json version
2026-11-03 15:37:53 +11:00
Oliver c3948f56ed Implement stock adjust barcode actions (#13170) 2026-11-03 12:03:33 +11:00
Oliver c9ba1169f4 [UI] Copy error button (#13168)
Adds button to copy UI error information
2026-11-03 10:36:54 +11:00
Oliver 2310b54e26 [UI] Handle duplicate cameras (#13167)
Fixes https://github.com/inventree/InvenTree/issues/13164
2026-11-03 10:33:48 +11:00
Oliver b4cdbf3d07 [UI] Improved notification links (#13159)
Handle internal notification links which are stored as a fully qualified URL. These can now be routed internally rather than reloading the whole page
2026-11-02 14:47:24 +11:00
github-actions[bot] dcec25f777 New Crowdin translations by GitHub Action (#13127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-02 14:00:49 +11:00
Oliver 581fef33bc Add playwright test for MFA login flow (#13146) 2026-11-01 22:26:26 +11:00
dependabot[bot] c1cd45fd83 chore(deps): bump follow-redirects in /src/frontend (#13143)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.1 to 1.16.2.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.1...v1.16.2)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-01 17:48:30 +11:00
Matthias Mair df7f9521d7 feat: add notification on token issuance (#13141)
* add notification on token issuance

* add entries

* fix link url

* increate test timing

* ignore fallback line

* add test for notification
2026-11-01 14:08:58 +11:00
Oliver e6bc21b66f [UI] Link fixing (#13117)
* Use <Link> in navbar

* Use <Link> in PanelGroup

* <Link> in main navigation menu

* Update Breadcrumbs

* Refactor search drawer results

* Update NavigationTree and SearchDrawer

* Fix Link elements for dashboard widgets

* Adjust login helpers for playwright

* update playwright tests
2026-10-30 10:17:51 +11:00
Oliver 1dc2419652 [UI] Part description in build table (#13129)
* Add "part description" column to build table

* Add part description on build detail page
2026-10-29 13:15:08 +11:00
Oliver c5253560e8 [UI] Add "on_order" column to SupplierPartTable (#13128)
* [UI] Add "on_order" column to SupplierPartTable

* Add 'on_order' filter for SupplierPart

* Update table

* Fix PR ref
2026-10-29 10:41:09 +11:00
マサハル電機andTSUBASA 86b6c5fbfc fix(frontend): ignore Enter during IME composition (#13122)
Co-authored-by: TSUBASA <246341638+highvoltagescientist-arch@users.noreply.github.com>
2026-10-28 20:40:40 +11:00
github-actions[bot] eb84f0eb1e New Crowdin translations by GitHub Action (#13106)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-28 18:48:13 +11:00
Oliver c1683db714 Consumable fix (#13120)
* Disable "consumable" attribute on PartDetail page

* Update playwright tests
2026-10-28 14:54:28 +11:00
dependabot[bot]andOliver 4f80cda960 chore(deps): bump @fullcalendar/react (#13088)
Bumps the dependencies group with 1 update in the /src/frontend directory: [@fullcalendar/react](https://github.com/fullcalendar/fullcalendar/tree/HEAD/packages/react).


Updates `@fullcalendar/react` from 6.1.21 to 6.1.22
- [Release notes](https://github.com/fullcalendar/fullcalendar/releases)
- [Changelog](https://github.com/fullcalendar/fullcalendar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fullcalendar/fullcalendar/commits/v6.1.22/packages/react)

---
updated-dependencies:
- dependency-name: "@fullcalendar/react"
  dependency-version: 6.1.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-10-27 17:58:47 +11:00
Oliver 7c03b6fcf2 Frontend coverage (#13114)
* Shipment row actions

* Test return order parametric view

* SalesOrderLineItem actions

* sales order parametric view

* playwright tests for sales order allocations
2026-10-27 16:45:43 +11:00
Oliver c4280c2a03 [Refactor] Stock tracking audit (#13101)
* Add "event_type" and "notes" support to AuditLog model

* Register history entries for stock items

* record stock edited events as normal updates

* Remove legacy tracking entry generation code

* Updated unit tests for all stock event types

* remove legacy endpoints

* remove legacy tables from UI

* Updated docs

* Data migration

* Remove old models

* Update docs

* Updated playwright tests

* Fix broken links

* Update CHANGELOG.md

* Cache CID value

* Fix migration tests

* Increase query threshold for unit test

* Fix bug and add regression test

* mark migration as one-way

* flush events in the correct order

* improve prefetch

* Adjust row rendering
2026-10-27 15:14:15 +11:00
Miklós MártonandOliver dbffb960f7 Select default location for new stock items if it is set for a part (#12916)
* Select default location for new stock items in the case if it is set for a part

Fixes #12304

* Add playwright test to check that the part's default stock location has
precedence on the category's default stock location

* Rename test cases for clarity in pui_forms.spec.ts

* Adjust formatting

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-10-26 22:58:45 +11:00
github-actions[bot] f61e6d79b3 New Crowdin translations by GitHub Action (#13095)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-26 17:59:43 +11:00
Oren 6d0ae8dfb5 fix(frontend): hide news widget from default dashboard for non-superusers (#13099)
defaultLayouts only places the news widget for superusers, but
defaultWidgets always included it, so non-superusers saw a
"Requires Superuser" alert on a fresh dashboard.
2026-10-26 14:15:38 +11:00