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:
@@ -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>
|
||||
)}
|
||||
|
||||
@@ -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}]
|
||||
|
||||
Reference in New Issue
Block a user