mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: sorting columns.
This commit is contained in:
@@ -82,7 +82,7 @@ export function ItemsActionMenuList({
|
||||
},
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
return (
|
||||
<Menu>
|
||||
<MenuItem
|
||||
@@ -124,7 +124,7 @@ export function ItemsActionMenuList({
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export const ItemsActionsTableCell = (props) => {
|
||||
return (
|
||||
@@ -137,7 +137,6 @@ export const ItemsActionsTableCell = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve all items table columns.
|
||||
*/
|
||||
@@ -147,30 +146,35 @@ export const useItemsTableColumns = () => {
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
id: 'name',
|
||||
Header: formatMessage({ id: 'item_name' }),
|
||||
accessor: 'name',
|
||||
className: 'name',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
id:'code',
|
||||
Header: formatMessage({ id: 'item_code' }),
|
||||
accessor: 'code',
|
||||
className: 'code',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
id: 'type',
|
||||
Header: formatMessage({ id: 'item_type' }),
|
||||
accessor: ItemTypeAccessor,
|
||||
className: 'item_type',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
id: 'category',
|
||||
Header: formatMessage({ id: 'category' }),
|
||||
accessor: 'category.name',
|
||||
className: 'category',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
id:'sell_price',
|
||||
Header: formatMessage({ id: 'sell_price' }),
|
||||
Cell: SellPriceCell,
|
||||
accessor: 'sell_price',
|
||||
@@ -178,6 +182,7 @@ export const useItemsTableColumns = () => {
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
id:'cost_price',
|
||||
Header: formatMessage({ id: 'cost_price' }),
|
||||
Cell: CostPriceCell,
|
||||
accessor: 'cost_price',
|
||||
@@ -185,6 +190,7 @@ export const useItemsTableColumns = () => {
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
id:'quantity_on_hand',
|
||||
Header: formatMessage({ id: 'quantity_on_hand' }),
|
||||
accessor: 'quantity_on_hand',
|
||||
Cell: QuantityOnHandCell,
|
||||
@@ -199,4 +205,4 @@ export const useItemsTableColumns = () => {
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user