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