* 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>
* 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
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.
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>
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>
* 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>
* 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
* [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
* 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
* Shipment row actions
* Test return order parametric view
* SalesOrderLineItem actions
* sales order parametric view
* playwright tests for sales order allocations
* 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
* 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>