2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Cleanup UserDetail page

This commit is contained in:
Oliver Walters
2025-04-07 13:48:10 +00:00
parent 1cab0a1914
commit bf0a013c05

View File

@ -40,12 +40,6 @@ export default function UserDetail() {
}
const tl: DetailsField[] = [
{
type: 'text',
name: 'email',
label: t`Email`,
copy: true
},
{
type: 'text',
name: 'username',
@ -58,14 +52,23 @@ export default function UserDetail() {
name: 'first_name',
label: t`First Name`,
icon: 'info',
copy: true
copy: true,
hidden: !instance.first_name
},
{
type: 'text',
name: 'last_name',
label: t`Last Name`,
icon: 'info',
copy: true
copy: true,
hidden: !instance.last_name
},
{
type: 'text',
name: 'email',
label: t`Email`,
copy: true,
hidden: !instance.email
}
];
@ -75,17 +78,19 @@ export default function UserDetail() {
name: 'displayname',
label: t`Display Name`,
icon: 'user',
copy: true
copy: true,
hidden: !instance.displayname
},
{
type: 'text',
name: 'position',
label: t`Position`,
icon: 'info'
icon: 'info',
hidden: !instance.position
},
{
type: 'boolean',
name: 'active',
name: 'is_active',
label: t`Active`,
icon: 'info'
},
@ -94,27 +99,31 @@ export default function UserDetail() {
name: 'contact',
label: t`Contact`,
icon: 'email',
copy: true
copy: true,
hidden: !instance.contact
},
{
type: 'text',
name: 'organisation',
label: t`Organisation`,
icon: 'info',
copy: true
copy: true,
hidden: !instance.organisation
},
{
type: 'text',
name: 'status',
label: t`Status`,
icon: 'note'
icon: 'note',
hidden: !instance.status
},
{
type: 'text',
name: 'location',
label: t`Location`,
icon: 'location',
copy: true
copy: true,
hidden: !instance.location
}
];