diff --git a/CHANGELOG.md b/CHANGELOG.md index d2c8e530ff..04db896c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#12713](https://github.com/inventree/InvenTree/pull/12713) adds SCIM 2 provisioning support, allowing InvenTree to be integrated with external identity providers for user management. - [#12731](https://github.com/inventree/InvenTree/pull/12731) adds OIDC provider settings to the Admin Center - making all Identity Federation settings now available in one place without the need to use the database admin interface. +- [#12837](https://github.com/inventree/InvenTree/pull/12837) adds a user setting `ROTATE_TABLE_HEADERS` which rotates table headers by 90 degrees, improving readability for tables with long column titles. ### Changed diff --git a/docs/docs/settings/user.md b/docs/docs/settings/user.md index bb590bb6a1..b15dc34f4e 100644 --- a/docs/docs/settings/user.md +++ b/docs/docs/settings/user.md @@ -21,6 +21,7 @@ The *Display Settings* screen shows general display configuration options: {{ usersetting("ICONS_IN_NAVBAR") }} {{ usersetting("STICKY_HEADER") }} {{ usersetting("STICKY_TABLE_HEADER") }} +{{ usersetting("ROTATE_TABLE_HEADERS") }} {{ usersetting("SHOW_SPOTLIGHT") }} {{ usersetting("BARCODE_IN_FORM_FIELDS") }} {{ usersetting("DATE_DISPLAY_FORMAT") }} diff --git a/src/backend/InvenTree/common/setting/user.py b/src/backend/InvenTree/common/setting/user.py index bbbebe30db..c30dcc6c7f 100644 --- a/src/backend/InvenTree/common/setting/user.py +++ b/src/backend/InvenTree/common/setting/user.py @@ -205,6 +205,12 @@ USER_SETTINGS: dict[str, InvenTreeSettingsKeyType] = { 'default': False, 'validator': bool, }, + 'ROTATE_TABLE_HEADERS': { + 'name': _('Rotated Table Headers'), + 'description': _('Display table column headers with rotated (vertical) text'), + 'default': False, + 'validator': bool, + }, 'SHOW_SPOTLIGHT': { 'name': _('Show Spotlight'), 'description': _('Enable spotlight navigation functionality'), diff --git a/src/frontend/src/components/tables/InvenTreeTable.tsx b/src/frontend/src/components/tables/InvenTreeTable.tsx index 40bd5d3e4c..b4b4417bb3 100644 --- a/src/frontend/src/components/tables/InvenTreeTable.tsx +++ b/src/frontend/src/components/tables/InvenTreeTable.tsx @@ -120,6 +120,10 @@ export function InvenTreeTableInternal>({ return userSettings.isSet('STICKY_TABLE_HEADER'); }, [userSettings]); + const rotateTableHeaders = useMemo(() => { + return userSettings.isSet('ROTATE_TABLE_HEADERS'); + }, [userSettings]); + const tableSearchParams = useMemo(() => { return searchParams ? excludeDetailNavigationParams(searchParams) @@ -1031,6 +1035,9 @@ export function InvenTreeTableInternal>({