refactoring: account form.

refactoring: expense form.
refactoring: manual journal form.
refactoring: invoice form.
This commit is contained in:
a.bouhuolia
2021-02-15 12:03:47 +02:00
parent 692f3b333a
commit 760c38b54b
124 changed files with 2694 additions and 2967 deletions

View File

@@ -1,9 +1,8 @@
import React, { useEffect } from 'react';
import { useIntl } from 'react-intl';
import React from 'react';
import 'style/pages/Customers/List.scss';
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
import { DashboardContentTable, DashboardPageContent } from 'components';
import CustomersActionsBar from './CustomersActionsBar';
import CustomersViewsTabs from './CustomersViewsTabs';
@@ -12,27 +11,15 @@ import CustomersAlerts from 'containers/Customers/CustomersAlerts';
import { CustomersListProvider } from './CustomersListProvider';
import withCustomers from './withCustomers';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import { transformTableStateToQuery, compose } from 'utils';
/**
* Customers list.
*/
function CustomersList({
// #withDashboardActions
changePageTitle,
// #withCustomers
customersTableState,
}) {
const { formatMessage } = useIntl();
// Changes the dashboard page title once the page mount.
useEffect(() => {
changePageTitle(formatMessage({ id: 'customers_list' }));
}, [changePageTitle, formatMessage]);
return (
<CustomersListProvider
query={transformTableStateToQuery(customersTableState)}
@@ -41,7 +28,10 @@ function CustomersList({
<DashboardPageContent>
<CustomersViewsTabs />
<CustomersTable />
<DashboardContentTable>
<CustomersTable />
</DashboardContentTable>
</DashboardPageContent>
<CustomersAlerts />
</CustomersListProvider>
@@ -49,6 +39,5 @@ function CustomersList({
}
export default compose(
withDashboardActions,
withCustomers(({ customersTableState }) => ({ customersTableState })),
)(CustomersList);