2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-30 18:50:53 +00:00

[PUI] Implement "build outputs" table (#7115)

* Update build line allocation table

- Allow display of "tracked" items in main allocation table

* Add resolveItem function for finding nested items

* Update BuildLineTable

* Allow BuildLineList to be ordered by 'trackable' field

* Bump API version

* Building out columns

* Table tweaks

* Fetch list of required test templates

* Tweaks

* Add placeholders for table actions

* Add typing

* Add placeholder buttons

* Update columns

* Add button to duplicate build order

* Add placeholder cancel action

* Refactoring

* Edit company from table

* Change "create" to "add"

* Change more from Create to Add
This commit is contained in:
Oliver
2024-04-25 10:11:44 +10:00
committed by GitHub
parent 5f54aef79a
commit d30ab932ca
27 changed files with 581 additions and 147 deletions

View File

@ -14,8 +14,10 @@ import {
IconTrash,
IconUnlink
} from '@tabler/icons-react';
import { color } from '@uiw/react-codemirror';
import { ReactNode, useMemo } from 'react';
import { InvenTreeIcon } from '../../functions/icons';
import { notYetImplemented } from '../../functions/notifications';
export type ActionDropdownItem = {
@ -203,6 +205,24 @@ export function DeleteItemAction({
};
}
export function CancelItemAction({
hidden = false,
tooltip,
onClick
}: {
hidden?: boolean;
tooltip?: string;
onClick?: () => void;
}): ActionDropdownItem {
return {
icon: <InvenTreeIcon icon="cancel" iconProps={{ color: 'red' }} />,
name: t`Cancel`,
tooltip: tooltip ?? t`Cancel`,
onClick: onClick,
hidden: hidden
};
}
// Common action button for duplicating an item
export function DuplicateItemAction({
hidden = false,