mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
[UI] Fix thumbnail rendering (#9875)
- Fix typo which caused full image to be rendered - This could cause significant network loading time
This commit is contained in:
@ -36,7 +36,7 @@ export function RenderCompany(
|
|||||||
return (
|
return (
|
||||||
<RenderInlineModel
|
<RenderInlineModel
|
||||||
{...props}
|
{...props}
|
||||||
image={instance.thumnbnail || instance.image}
|
image={instance.thumbnail || instance.image}
|
||||||
primary={instance.name}
|
primary={instance.name}
|
||||||
secondary={instance.description}
|
secondary={instance.description}
|
||||||
url={
|
url={
|
||||||
@ -103,7 +103,7 @@ export function RenderManufacturerPart(
|
|||||||
suffix={
|
suffix={
|
||||||
part.full_name ? <Text size='sm'>{part.full_name}</Text> : undefined
|
part.full_name ? <Text size='sm'>{part.full_name}</Text> : undefined
|
||||||
}
|
}
|
||||||
image={manufacturer?.thumnbnail ?? manufacturer.image}
|
image={manufacturer?.thumbnail ?? manufacturer.image}
|
||||||
url={
|
url={
|
||||||
props.link
|
props.link
|
||||||
? getDetailUrl(ModelType.manufacturerpart, instance.pk)
|
? getDetailUrl(ModelType.manufacturerpart, instance.pk)
|
||||||
|
@ -24,7 +24,7 @@ export function RenderPurchaseOrder(
|
|||||||
status: instance.status_custom_key,
|
status: instance.status_custom_key,
|
||||||
type: ModelType.purchaseorder
|
type: ModelType.purchaseorder
|
||||||
})}
|
})}
|
||||||
image={supplier.thumnbnail || supplier.image}
|
image={supplier.thumbnail || supplier.image}
|
||||||
url={
|
url={
|
||||||
props.link
|
props.link
|
||||||
? getDetailUrl(ModelType.purchaseorder, instance.pk)
|
? getDetailUrl(ModelType.purchaseorder, instance.pk)
|
||||||
@ -52,7 +52,7 @@ export function RenderReturnOrder(
|
|||||||
status: instance.status_custom_key,
|
status: instance.status_custom_key,
|
||||||
type: ModelType.returnorder
|
type: ModelType.returnorder
|
||||||
})}
|
})}
|
||||||
image={customer.thumnbnail || customer.image}
|
image={customer.thumbnail || customer.image}
|
||||||
url={
|
url={
|
||||||
props.link
|
props.link
|
||||||
? getDetailUrl(ModelType.returnorder, instance.pk)
|
? getDetailUrl(ModelType.returnorder, instance.pk)
|
||||||
@ -97,7 +97,7 @@ export function RenderSalesOrder(
|
|||||||
status: instance.status_custom_key,
|
status: instance.status_custom_key,
|
||||||
type: ModelType.salesorder
|
type: ModelType.salesorder
|
||||||
})}
|
})}
|
||||||
image={customer.thumnbnail || customer.image}
|
image={customer.thumbnail || customer.image}
|
||||||
url={
|
url={
|
||||||
props.link ? getDetailUrl(ModelType.salesorder, instance.pk) : undefined
|
props.link ? getDetailUrl(ModelType.salesorder, instance.pk) : undefined
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ export function RenderPart(
|
|||||||
primary={instance.full_name ?? instance.name}
|
primary={instance.full_name ?? instance.name}
|
||||||
secondary={instance.description}
|
secondary={instance.description}
|
||||||
suffix={badge}
|
suffix={badge}
|
||||||
image={instance.thumnbnail || instance.image}
|
image={instance.thumbnail || instance.image}
|
||||||
url={props.link ? getDetailUrl(ModelType.part, instance.pk) : undefined}
|
url={props.link ? getDetailUrl(ModelType.part, instance.pk) : undefined}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user