2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-07-04 06:00:38 +00:00

[UI] Table tweaks (#12271)

* [UI] Make part cell text copyable

* Reduce text size

* Reduce text size
This commit is contained in:
Oliver
2026-06-29 16:01:15 +10:00
committed by GitHub
parent 25b83c7388
commit 5b1a7db07f
3 changed files with 14 additions and 2 deletions
@@ -94,6 +94,13 @@ export function PartColumn(props: PartColumnProps): TableColumn {
sortable: true,
switchable: false,
minWidth: '175px',
copyable: (record: any) => {
const part = resolveItem(
record,
props.part ?? props.accessor ?? 'part_detail'
);
return part?.full_name ?? part?.name ?? '';
},
render: (record: any) => {
const part = resolveItem(
record,
@@ -304,6 +304,7 @@ export default function BuildLineTable({
<Text
c='red'
style={{ fontStyle: 'italic' }}
size='sm'
>{t`No stock available`}</Text>
)
}
@@ -447,7 +448,9 @@ export default function BuildLineTable({
extra={extra}
value={
<Group justify='space-between' wrap='nowrap'>
<Text>{formatDecimal(record.requiredQuantity)}</Text>
<Text size='sm'>
{formatDecimal(record.requiredQuantity)}
</Text>
{record?.part_detail?.units && (
<Text size='xs'>[{record.part_detail.units}]</Text>
)}
+3 -1
View File
@@ -181,7 +181,9 @@ function partTableColumns(): TableColumn[] {
<TableHoverCard
value={
<Group gap='xs' justify='left' wrap='nowrap'>
<Text c={color}>{text}</Text>
<Text c={color} size='sm'>
{text}
</Text>
{record.units && (
<Text size='xs' c={color}>
[{record.units}]