fix: dashboard sidebar expanding.

This commit is contained in:
a.bouhuolia
2021-04-19 18:34:02 +02:00
parent c6aca4ecfa
commit f29c1b6cec
27 changed files with 178 additions and 230 deletions

View File

@@ -1,11 +1,9 @@
import React, { useEffect, createContext } from 'react';
import { useIntl } from 'react-intl';
import React, { createContext } from 'react';
import { transformTableQueryToParams, isTableEmptyStatus } from 'utils';
import DashboardInsider from 'components/Dashboard/DashboardInsider';
import { useResourceViews, useResourceFields, useItems } from 'hooks/query';
import { useDashboardPageTitle } from 'hooks/state';
const ItemsContext = createContext();
@@ -40,17 +38,6 @@ function ItemsListProvider({
data: items, pagination, filterMeta,
}) && !isItemsFetching;
// Format message intl.
const { formatMessage } = useIntl();
// Change page title dispatcher.
const changePageTitle = useDashboardPageTitle();
// Changeas the page title once the page mount.
useEffect(() => {
changePageTitle(formatMessage({ id: 'items_list' }));
}, [changePageTitle, formatMessage]);
const state = {
itemsViews,
itemsFields,

View File

@@ -181,7 +181,6 @@ export const useItemsTableColumns = () => {
{
id: 'sell_price',
Header: formatMessage({ id: 'sell_price' }),
// Cell: SellPriceCell,
accessor: 'sell_price_formatted',
className: 'sell-price',
width: 150,
@@ -189,7 +188,6 @@ export const useItemsTableColumns = () => {
{
id: 'cost_price',
Header: formatMessage({ id: 'cost_price' }),
// Cell: CostPriceCell,
accessor: 'cost_price_formatted',
className: 'cost-price',
width: 150,
@@ -201,12 +199,6 @@ export const useItemsTableColumns = () => {
Cell: QuantityOnHandCell,
width: 140,
},
{
id: 'actions',
Cell: ItemsActionsTableCell,
width: 60,
skeletonWidthMin: 100,
},
],
[formatMessage],
);