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