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,
|
sortable: true,
|
||||||
switchable: false,
|
switchable: false,
|
||||||
minWidth: '175px',
|
minWidth: '175px',
|
||||||
|
copyable: (record: any) => {
|
||||||
|
const part = resolveItem(
|
||||||
|
record,
|
||||||
|
props.part ?? props.accessor ?? 'part_detail'
|
||||||
|
);
|
||||||
|
return part?.full_name ?? part?.name ?? '';
|
||||||
|
},
|
||||||
render: (record: any) => {
|
render: (record: any) => {
|
||||||
const part = resolveItem(
|
const part = resolveItem(
|
||||||
record,
|
record,
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ export default function BuildLineTable({
|
|||||||
<Text
|
<Text
|
||||||
c='red'
|
c='red'
|
||||||
style={{ fontStyle: 'italic' }}
|
style={{ fontStyle: 'italic' }}
|
||||||
|
size='sm'
|
||||||
>{t`No stock available`}</Text>
|
>{t`No stock available`}</Text>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -447,7 +448,9 @@ export default function BuildLineTable({
|
|||||||
extra={extra}
|
extra={extra}
|
||||||
value={
|
value={
|
||||||
<Group justify='space-between' wrap='nowrap'>
|
<Group justify='space-between' wrap='nowrap'>
|
||||||
<Text>{formatDecimal(record.requiredQuantity)}</Text>
|
<Text size='sm'>
|
||||||
|
{formatDecimal(record.requiredQuantity)}
|
||||||
|
</Text>
|
||||||
{record?.part_detail?.units && (
|
{record?.part_detail?.units && (
|
||||||
<Text size='xs'>[{record.part_detail.units}]</Text>
|
<Text size='xs'>[{record.part_detail.units}]</Text>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -181,7 +181,9 @@ function partTableColumns(): TableColumn[] {
|
|||||||
<TableHoverCard
|
<TableHoverCard
|
||||||
value={
|
value={
|
||||||
<Group gap='xs' justify='left' wrap='nowrap'>
|
<Group gap='xs' justify='left' wrap='nowrap'>
|
||||||
<Text c={color}>{text}</Text>
|
<Text c={color} size='sm'>
|
||||||
|
{text}
|
||||||
|
</Text>
|
||||||
{record.units && (
|
{record.units && (
|
||||||
<Text size='xs' c={color}>
|
<Text size='xs' c={color}>
|
||||||
[{record.units}]
|
[{record.units}]
|
||||||
|
|||||||
Reference in New Issue
Block a user