mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-27 22:26:00 +00:00
[PUI] Build actions (#7945)
* add table buttons to build line table * Add deallocate row action * Restrict row actions * Add functionality to 'deallocate' stock from build order * Implement 'auto-allocate' * Table column cleanup * Refactor code into new hook: - Helper function to update a set of selected rows - Callback function to remove row * Refactor existing forms to use new hook * Fix for RelatedModelField - Handle callback for null value * Memoize each field instance * Cleanup dead code * Define interfac for TableField row properties * Handle processing of nested errors * Pass form controller through to table field rows * Pass row errors through to individual table rows * Allow Standalone field to render errors * Allow allocation against build lines * Adjust quantity value when stock item is changed * Fix issue related to field name * Add "available" filter * Add "remove row" button * Add field for selecting source location * Filter out consumable items * Adjust form success message
This commit is contained in:
@@ -28,6 +28,7 @@ import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { api } from '../App';
|
||||
import { ActionButton } from '../components/buttons/ActionButton';
|
||||
import RemoveRowButton from '../components/buttons/RemoveRowButton';
|
||||
import { StandaloneField } from '../components/forms/StandaloneField';
|
||||
import {
|
||||
ApiFormAdjustFilterType,
|
||||
@@ -438,13 +439,7 @@ function LineItemFormRow({
|
||||
onClick={() => open()}
|
||||
/>
|
||||
)}
|
||||
<ActionButton
|
||||
onClick={() => input.removeFn(input.idx)}
|
||||
icon={<InvenTreeIcon icon="square_x" />}
|
||||
tooltip={t`Remove item from list`}
|
||||
tooltipAlignment="top"
|
||||
color="red"
|
||||
/>
|
||||
<RemoveRowButton onClick={() => input.removeFn(input.idx)} />
|
||||
</Flex>
|
||||
</Table.Td>
|
||||
</Table.Tr>
|
||||
|
||||
Reference in New Issue
Block a user