Fix icons

This commit is contained in:
Oliver 2024-02-29 23:42:29 +00:00
parent cc6d544b0e
commit c7891a1399
2 changed files with 5 additions and 2 deletions

View File

@ -243,7 +243,8 @@ export default function PartDetail() {
type: 'string',
name: 'creation_user',
label: t`Created By`,
badge: 'user'
badge: 'user',
icon: 'user'
},
{
type: 'string',
@ -338,6 +339,7 @@ export default function PartDetail() {
name: 'stocktake_user',
label: t`Stocktake By`,
badge: 'user',
icon: 'user',
value_formatter: () => {
const { data } = useSuspenseQuery({
queryKey: ['stocktake', id],

View File

@ -38,6 +38,7 @@ export type PartIconsType = {
export type DetailsField =
| {
hidden?: boolean;
icon?: string;
name: string;
label?: string;
badge?: BadgeType;
@ -400,7 +401,7 @@ export function DetailsTableField({
justifyContent: 'flex-start'
}}
>
<InvenTreeIcon icon={field.name} />
<InvenTreeIcon icon={field.icon ?? field.name} />
</td>
<td>
<Text>{field.label}</Text>