2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +00:00

16571 Commits

Author SHA1 Message Date
Matthias Mair
9bc0d599bc
chore: improve ci security (#9384)
* pin docker files

* pin github actions

* enforce hashes that are already present

* run style checks on cicd changes
2025-03-26 13:04:45 +11:00
Jacob Felknor
2bd26c0f49
use dayjs in datefield (#9380) 2025-03-26 10:35:26 +11:00
Matthias Mair
d8f5a56064
fix(backend): Bump maybe vulnerable esbuild (#9155)
* fix(backend): Bump vulnerable vanilla-extract

* bump deps futher

* remove @types/dompurify

* bump @lingui

* use more modern image
20.04 ships with node 18 as default, 24.04 with 20

* bump rest of image deps

* bump deps

* bump base deps

* bump resolution

* lower resolution

* fix resolution

* update lingui

* switch to build-in macro

* fix imports
2025-03-26 09:30:59 +11:00
Matthias Mair
5d4b587bf7
fix list format (#9376) 2025-03-25 20:07:42 +11:00
Matthias Mair
b397affa57
Add docs for governance and security (#9360)
* add docs for governance and security

* fix formatting

* rename page

* add thread modell info

* fix list rendering

* Add links to the thread modell throughout the docs

* add link to devsecops

* fix thread / threat

* fix path

* text fixes
2025-03-25 10:57:46 +11:00
gunstr
a6e4742ce4
Show part revision in Build Details panel (#9373) 2025-03-25 10:57:16 +11:00
Matthias Mair
42dcc01f9d
feat: Add email notification when a part is changed (#9275)
* Add function to star / unstar a part

* Also use with category

* Email notification when a part is changed
Fixes #7834

* enable disabling of recent checks

* Add error handler

* remove unneeded function
2025-03-25 09:21:11 +11:00
dependabot[bot]
8e0f79cdfc
Bump the dependencies group with 3 updates (#9372)
Bumps the dependencies group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/upload-artifact` from 4.6.1 to 4.6.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](4cec3d8aa0...ea165f8d65)

Updates `actions/download-artifact` from 4.1.9 to 4.2.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](cc20338598...95815c38cf)

Updates `github/codeql-action` from 3.28.11 to 3.28.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...1b549b9259)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  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>
2025-03-25 07:27:05 +11:00
Oliver
357c1ae0bc
Add upload progress to attachment table (#9371) 2025-03-24 23:11:28 +11:00
Jacob Felknor
f5e6352181
fix contact copy, add email/phone if they exist (#9354) 2025-03-24 21:19:04 +11:00
Oliver
136e179cc4
[UI] Alerts (#9365)
* remove TODO (now implemented)

* Add Mantine tooltips

* Add "alerts" to header

* Add more alert types
2025-03-24 20:45:34 +11:00
Oliver
8997f193c9
[UI] Edit fix (#9367)
* Fix for editing stock location

* Fix for editing part category
2025-03-24 19:24:23 +11:00
Oliver
fc5b8479cb
Add docs for rendering markdown content (#9364) 2025-03-24 10:59:45 +11:00
Matthias Mair
fe807cb826
Fix req file (#9359)
* Bump mkdocs-material

Bumps the dependencies group with 1 update in the /docs directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.6.8 to 9.6.9
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.8...9.6.9)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix requirements file

* also run server checks if requirements changed

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-22 12:59:05 +11:00
dependabot[bot]
a837b16829
Bump mkdocs-material (#9358)
Bumps the dependencies group with 1 update in the /docs directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.6.8 to 9.6.9
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.8...9.6.9)

---
updated-dependencies:
- dependency-name: mkdocs-material
  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>
2025-03-22 08:08:25 +11:00
Jacob Felknor
3ec8832925
create allauth email from django_auth_ldap if configured (#9350) 2025-03-21 13:48:30 +11:00
Matthias Mair
bd0dc3fe50
feat(frontend): Improve comms around authentication (#9348)
* use enum for flow authentication

* fix inaccurate texts

* add a better user info on login

* fix test assertation
2025-03-21 13:42:50 +11:00
Oliver
cb240e4e0f
[UI] Icons in navbar (#9346)
* Add Icons to main header

* Add user configurability
2025-03-20 10:19:50 +11:00
Oliver
bdc5f9e84e
[Feature] Mandatory Plugins (#9339)
* Define which builtin plugins are always-active

* Adds 'mandatory' property to PluginConfig

* Update API / frontend

* Fix form method

* Tweaks

* Bump API version

* Tweak unit tests
2025-03-20 10:19:31 +11:00
Oliver
ae1ec31ca9
Bug fix for activating plugins via UI (#9338) 2025-03-20 09:16:31 +11:00
Lukas
3260d94369
added some visual improvements (#9342)
* added some visual improvements

* fix lint

* Undo changes to sample icons for now

* use primary color
2025-03-20 08:24:35 +11:00
Oliver
cfd83a3d62
[UI] Stylish text tweak (#9336)
* Update <StylishText>

- Re-enable gradient
- Based on selected highlight color

* Refactor UI

* Do not require size prop

* Memoize
2025-03-20 07:09:38 +11:00
Oliver
662a0b275e
[UI] Web Prefix (#9334)
* [UI] Change default web prefix

- Adjust default from "platform" to "web"
- Much more standard prefix

* Cleanup

* Fixes for playwright tests

* Fix unit tests

* Refactor base_url into getBaseUrl
2025-03-20 00:12:52 +11:00
github-actions[bot]
832d884c85
New Crowdin translations by GitHub Action (#9314)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-18 19:22:20 +11:00
Oliver
8d51aa1563
[Feature] Data export plugins (#9096)
* Move data export code out of "importer" directory

* Refactoring to allow data export via plugin

* Add brief docs framework

* Add basic DataExportMixin class

* Pass context data through to the serializer

* Extract custom serializer

* Refactoring

* Add builtin plugin for BomExport

* More refactoring

* Cleanup for UseForm hooks

* Allow GET methods in forms

* Create new 'exporter' app

* Refactor imports

* Run cleanup task on boot

* Add enumeration for plugin mixin types

* Refactor with_mixin call

* Generate export options serializer

* Pass plugin information through

* Offload export functionality to the plugin

* Generate output

* Download generated file

* Refactor frontend code

* Generate params for downloading

* Pass custom fields through to the plugin

* Implement multi-level export for BOM data

* Export supplier and manufacturer information

* Export substitute data

* Remove old BOM exporter

* Export part parameter data

* Try different app order

* Use GET instead of POST request

- Less 'dangerous' - no chance of performing a destructive operation

* Fix for constructing query parameters

- Ignore any undefined values!

* Trying something

* Revert to POST

- Required, other query data are ignored

* Fix spelling mistakes

* Remove SettingsMixin

* Revert python version

* Fix for settings.py

* Fix missing return

* Fix for label mixin code

* Run playwright tests in --host mode

* Fix for choice field

- Prevent empty value if field is required

* Remove debug prints

* Update table header

* Playwright tests for data export

* Rename app from "exporter" to "data_exporter"

* Add frontend table for export sessions

* Updated playwright testing

* Fix for unit test

* Fix build order unit test

* Back to using GET instead of POST

- Otherwise, users need POST permissions to export!
- A bit of trickery with the forms architecture

* Fix remaining unit tests

* Implement unit test for BOM export

- Including test for custom plugin

* Fix unit test

* Bump API version

* Enhanced playwright tests

* Add debug for CI testing

* Single unit test only (for debugging)

* Fix typo

* typo fix

* Remove debugs

* Docs updates

* Revert typo

* Update tests

* Serializer fix

* Fix typo

* Offload data export to the background worker

- Requires mocking the original request object
- Will need some further unit testing!

* Refactor existing models into DataOutput

- Remove LabelOutput table
- Remove ReportOutput table
- Remove ExportOutput table
- Consolidate into single API endpoint

* Remove "output" tables from frontend

* Refactor frontend hook to be generic

* Frontend now works with background data export

* Fix tasks.py

* Adjust unit tests

* Revert 'plugin_key' to 'plugin'

* Improve user checking when printing

* Updates

* Remove erroneous migration file

* Tweak plugin registry

* Adjust playwright tests

* Refactor data export

- Convert into custom hook
- Enable for calendar view also

* Add playwright tests

* Adjust unit testing

* Tweak unit tests

* Add extra timeout to data export

* Fix for RUF045
2025-03-18 11:35:44 +11:00
Oliver
947a1bcc3a
Use primary color for StylishText (#9332) 2025-03-18 10:37:45 +11:00
Matthias Mair
6d42789cb2
fix api version (#9331) 2025-03-17 22:51:33 +00:00
Matthias Mair
2bc2cb6363
chore: bump container deps (#9329) 2025-03-18 08:08:48 +11:00
Matthias Mair
f8de4e29a1
feat(frontend): Add token managment tools (#9244)
* Add typing

* feat(frontend): Add token managment tools
Closes https://github.com/inventree/InvenTree/issues/9166

* remove debug msg

* split responsibilities for token endpoint

* move ApiTokenTable

* add option for superusers to show all user tokens

* Add tokens to admin users interface

* adjust api text

* adress raised issues

* make stuff sortable / filterable
2025-03-18 07:27:19 +11:00
Matthias Mair
5a5f16fd47
chore: bump setup tools (#9330) 2025-03-18 07:26:53 +11:00
dependabot[bot]
9c2ea28933
Bump docker/login-action from 3.3.0 to 3.4.0 in the dependencies group (#9328)
Bumps the dependencies group with 1 update: [docker/login-action](https://github.com/docker/login-action).


Updates `docker/login-action` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](9780b0c442...74a5d14239)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 07:23:05 +11:00
Oliver
ddc3cd32f5
[UI] Bulk edit actions (#9320)
* Allow bulk selection of sales order shipment

* Tweaks

* Support bulk-edit for location parent and category parent

* Allow more login attempts for playwright
2025-03-17 23:27:32 +11:00
Oliver
9db5205f79
Bulk update mixin (#9313)
* Refactor BulkDeleteMixin

* Implement BulkUpdateMixin class

* Refactor NotificationsTable

- Use common bulkdelete operation

* Update successMessage

* Update metadata constructs

* Add bulk-edit support for PartList endpoint

* Implement set-category for part table

* Cleanup old endpoint

* Improve form error handling

* Simplify translated text

* Add playwright tests

* Bump API version

* Fix unit tests

* Further test updates
2025-03-17 09:21:43 +11:00
Matthias Mair
897afd029b
feat(frontend): show if redirecting inline (#9122)
* https://github.com/inventree/InvenTree/pull/6293

* refactor to a shared component

* refactoring container stuff to a wrapper

* move title to wrapper

* move logoff and loader to wrapper

* mvoe functions to general auth

* seperate login and register into seperate pages

* unify auth styling

* rename component

* adapt to new look

* check if registration is enabled

* feat(frontend):show if redirecting

* reduce diff

* fix missing import

* remove double warning
2025-03-17 09:03:42 +11:00
Oliver
a453c9b286
[refactor] Remove django-weasyprint entirely (#9316)
* Remove django-weasyprint entirely

* Handle null request

* Bug fix
2025-03-17 07:51:29 +11:00
Oliver
3afafe594b
[UI] Reimplement calendar views (#8933)
* Add deps for @fullcalendar

* Basic calendar setup

* Add locale support

* Add custom <SegmentedIconControl> component

* optional 'control' for panel

* Scaffolding out build index page

* Fetch build orders based on calendar dates

* Display builds

* Click to navigate to build

* Working on custom header

* Implement button functionality

* Display current month name

* Implement datepicker dropdown

* Adjust layout

* Custom rendering

* Include part detail

* Implement hook to track calendar state

* Clearing search causes immediate update

* Offload core functionality into hook

- Adds search input

* Spread props correctly

* Cleanup

* Allow build orders to be edited directly from calendar view

* Cleanup

* Fix for InvenTreeCalendarProps

* Improve date range filtering for Build model

* Simplify BuildFilter

* Refactoring

* PurchaseOrder calendar implementation

* Allow edit of purchase orders

* Refactor and implement for all order types

- Add missing "issue_date" field for SalesOrder
- Refactor API for other order types
- Fix rendering issues

* Bump API version

* Add playwright tests for calendar (simple)

* Fix migrations

* Simplify notifications

* Refactor filter components

- Make them more generic

* Enable custom filters for calendars

* Custom filters per table

* Display status label

* Refactoring

* Update playwright tests

* Update build order docs

* Bug fix for order date editing

* Update purchase order docs

* Return Order docs

* Update date formatting
2025-03-16 18:01:51 +11:00
Oliver
191c0b1007
Docker Compose Fix (#9311)
* Fix postgres version in docker-compose file

- Pin to version 16
- Compatible with the alpine image

* Add check for backup and restore procedures
2025-03-16 10:43:40 +11:00
github-actions[bot]
fc34bd0a5e
New Crowdin translations by GitHub Action (#9288)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-16 09:40:18 +11:00
Matthias Mair
516755db97
refactor(frontend): Do not request token in frontend (#9217)
* remove calls that reference tokens

* remove call to token endpoint

* ensure CSRFToken is always send

* bump axios

* lower axios

* reset axios change

* bump reslution down
2025-03-16 08:36:58 +11:00
Oliver
0e43e8de2d
Further reduce log output for weasyprint (#9305)
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-16 07:42:54 +11:00
Oliver
4eaa5880c1
Fix currency rendering (#9308)
- Closes https://github.com/inventree/InvenTree/issues/9300
2025-03-16 07:42:34 +11:00
Oliver
e1ac1c77c0
Provide mocked URL to dummy print requst (#9307)
* Provide mocked URL to dummy print requst

- FIxes bug which prevented background printing with DEBUG=False

* Disable debug for postgres testing
2025-03-16 00:53:19 +11:00
Oliver
3ac126102a
Fix formatting for docs/requirements.txt (#9309) 2025-03-16 00:26:33 +11:00
Joe Rogers
d7aa5e45b9
Check for schema generation state when removing fields (#9236)
* Ensure notes are not removed when generating schema

* Skip remaining conditional field removals when generating schema, remove removable fields from required lists

* Update API version, add schema gen state check for api-doc endpoint

* Add test for generate schema state

* Add test for schema postprocessing function

* Filter nullable + read_only fields out of schema required lists

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-15 23:53:30 +11:00
Oliver
cdb445583b
Prevent sentry reporting in test mode (#9304) 2025-03-15 22:42:18 +11:00
dependabot[bot]
f1cf78e9a1
Bump the dependencies group across 1 directory with 3 updates (#9302)
Bumps the dependencies group with 3 updates in the /docs directory: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin), [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings).


Updates `mkdocs-git-revision-date-localized-plugin` from 1.4.4 to 1.4.5
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.4.4...v1.4.5)

Updates `mkdocs-material` from 9.6.7 to 9.6.8
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.7...9.6.8)

Updates `mkdocstrings[python]` from 0.27.0 to 0.29.0
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.27.0...0.29.0)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-15 21:58:55 +11:00
Oliver
3dfd1ed146
Static Asset Management (#9292)
* Caddyfile: Redirect asset requests

- Ensure the static asset files are served by the proxy
- Reduce gunicorn / python load
- Significant server performance increase

* Allow CORS requests to 'assets' path

* Update static assets path for vite build

* Remove RedirectAssetView

* Specify relative base path

Ref: https://vite.dev/guide/build.html#relative-base

* Revert settings.py

* Revert caddyfile

* Remove defunct unit test

* Add timeout to test
2025-03-14 08:20:51 +11:00
Oliver
b25bf5e669
Dynamic filters (#9290)
* Add attributes to TableFilter type def

* Refactoring

* Refactor ProjectCodeFilter

* Provide simple string rendering of a dynamic filter

* Refactor ResponsibleFilter

* Further refactoring

* More refactoring

* Fix placeholder value
2025-03-13 13:09:37 +11:00
Oliver
7a43c3a83e
Auto-fill currency for new supplier part (#9286)
- Closes https://github.com/inventree/InvenTree/issues/9284
2025-03-13 01:35:29 +11:00
dependabot[bot]
0049544305
Bump @babel/runtime from 7.25.6 to 7.26.10 in /src/frontend (#9285)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.6 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 00:46:09 +11:00