mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
Fix EntriesItemTable & FloatingActions
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
import EstimateListField from 'components/EstimateListField';
|
||||
import ItemListField from 'components/ItemListField';
|
||||
import classNames from 'classnames';
|
||||
import { FormGroup, Classes, Intent } from '@blueprintjs/core';
|
||||
|
||||
function EstimatesListFieldCell({
|
||||
|
||||
function ItemsListCell({
|
||||
column: { id },
|
||||
row: { index },
|
||||
cell: { value: initialValue },
|
||||
payload: { products, updateData, errors },
|
||||
payload: { items, updateData, errors },
|
||||
}) {
|
||||
const handleProductSelected = useCallback(
|
||||
const handleItemSelected = useCallback(
|
||||
(item) => {
|
||||
updateData(index, id, item.id);
|
||||
},
|
||||
@@ -21,18 +22,15 @@ function EstimatesListFieldCell({
|
||||
return (
|
||||
<FormGroup
|
||||
intent={error ? Intent.DANGER : null}
|
||||
className={classNames(
|
||||
'form-group--select-list',
|
||||
Classes.FILL,
|
||||
)}
|
||||
className={classNames('form-group--select-list', Classes.FILL)}
|
||||
>
|
||||
<EstimateListField
|
||||
products={products}
|
||||
onProductSelected={handleProductSelected}
|
||||
selectedProductId={initialValue}
|
||||
<ItemListField
|
||||
items={items}
|
||||
onItemSelected={handleItemSelected}
|
||||
selectedItemId={initialValue}
|
||||
/>
|
||||
</FormGroup>
|
||||
);
|
||||
}
|
||||
|
||||
export default EstimatesListFieldCell;
|
||||
export default ItemsListCell;
|
||||
@@ -2,15 +2,15 @@ import AccountsListFieldCell from './AccountsListFieldCell';
|
||||
import MoneyFieldCell from './MoneyFieldCell';
|
||||
import InputGroupCell from './InputGroupCell';
|
||||
import ContactsListFieldCell from './ContactsListFieldCell';
|
||||
import EstimatesListFieldCell from './EstimatesListFieldCell';
|
||||
import ItemsListCell from './ItemsListCell';
|
||||
import PercentFieldCell from './PercentFieldCell';
|
||||
import { DivFieldCell,EmptyDiv } from './DivFieldCell';
|
||||
import { DivFieldCell, EmptyDiv } from './DivFieldCell';
|
||||
export {
|
||||
AccountsListFieldCell,
|
||||
MoneyFieldCell,
|
||||
InputGroupCell,
|
||||
ContactsListFieldCell,
|
||||
EstimatesListFieldCell,
|
||||
ItemsListCell,
|
||||
PercentFieldCell,
|
||||
DivFieldCell,
|
||||
EmptyDiv,
|
||||
|
||||
Reference in New Issue
Block a user