feat: rename item sku to code.

feat: fix sidebar current tab issue.
This commit is contained in:
Ahmed Bouhuolia
2020-11-24 11:30:27 +02:00
parent a7e5401b7d
commit 0321f29442
20 changed files with 75 additions and 50 deletions

View File

@@ -9,6 +9,9 @@ export default function EditableItemsEntriesTable({
defaultEntry,
minLinesNumber = 2,
linesNumber = 5,
filterSellableItems = false,
filterPurchasableItems = false,
}) {
const { setFieldValue, values } = useFormikContext();
const [clearLinesAlert, setClearLinesAlert] = useState(false);
@@ -58,6 +61,8 @@ export default function EditableItemsEntriesTable({
}}
entries={value}
errors={error}
filterPurchasableItems={filterPurchasableItems}
filterSellableItems={filterSellableItems}
onClickAddNewRow={handleClickAddNewRow}
onClickClearAllLines={handleClearAllLines}
onClickRemoveRow={handleClickRemoveLine}

View File

@@ -91,6 +91,8 @@ function ItemsEntriesTable({
onClickRemoveRow,
onClickAddNewRow,
onClickClearAllLines,
filterPurchasableItems = false,
filterSellableItems = false,
}) {
const [rows, setRows] = useState([]);
const { formatMessage } = useIntl();
@@ -117,6 +119,8 @@ function ItemsEntriesTable({
Cell: ItemsListCell,
disableSortBy: true,
width: 180,
filterPurchasable: filterPurchasableItems,
filterSellable: filterSellableItems,
},
{
Header: formatMessage({ id: 'description' }),