fix: rename dashboard routes.

This commit is contained in:
elforjani3
2021-01-17 20:47:26 +02:00
parent c843a28d30
commit c7b81b1998
17 changed files with 69 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ import { compose } from 'utils';
import 'style/pages/Customers/PageForm.scss';
function Customer({
function CustomerFormPage({
// // #withDashboardActions
// changePageTitle,
@@ -69,4 +69,4 @@ function Customer({
);
}
export default compose(withCustomersActions, withCurrenciesActions)(Customer);
export default compose(withCustomersActions, withCurrenciesActions)(CustomerFormPage);

View File

@@ -71,8 +71,8 @@ function CustomersList({
);
const handleEditCustomer = useCallback(
(cusomter) => {
history.push(`/customers/${cusomter.id}/edit`);
(customer) => {
history.push(`/customers/${customer.id}/edit`);
},
[history],
);

View File

@@ -21,7 +21,7 @@ import withExchangeRatesActions from 'containers/ExchangeRates/withExchangeRates
import { compose } from 'utils';
function ExchangeRate({
function ExchangeRatesList({
// #withDashboardActions
changePageTitle,
@@ -51,7 +51,7 @@ function ExchangeRate({
useEffect(() => {
id
? changePageTitle(formatMessage({ id: 'exchange_rate_details' }))
: changePageTitle(formatMessage({ id: 'exchange_rate_list' }));
: changePageTitle(formatMessage({ id: 'exchange_rates_list' }));
}, [id, changePageTitle, formatMessage]);
const handelDeleteExchangeRate = useCallback(
@@ -201,4 +201,4 @@ export default compose(
withResourceActions,
withDashboardActions,
withDialogActions,
)(ExchangeRate);
)(ExchangeRatesList);

View File

@@ -18,7 +18,7 @@ import 'style/pages/Expense/PageForm.scss';
/**
* Expense page form.
*/
function Expenses({
function ExpenseFormPage({
// #withwithAccountsActions
requestFetchAccounts,
requestFetchAccountTypes,
@@ -109,4 +109,4 @@ export default compose(
withExpensesActions,
withCustomersActions,
withDashboardActions,
)(Expenses);
)(ExpenseFormPage);

View File

@@ -16,7 +16,7 @@ import { compose } from 'utils';
import 'style/pages/Bills/PageForm.scss';
function Bills({
function BillFormPage({
// #withwithAccountsActions
requestFetchAccounts,
@@ -112,4 +112,4 @@ export default compose(
withAccountsActions,
withSettingsActions,
withDashboardActions
)(Bills);
)(BillFormPage);

View File

@@ -24,7 +24,7 @@ import { compose } from 'utils';
/**
* Bills list.
*/
function BillList({
function BillsList({
// #withDashboardActions
changePageTitle,
@@ -48,7 +48,7 @@ function BillList({
const [selectedRows, setSelectedRows] = useState([]);
useEffect(() => {
changePageTitle(formatMessage({ id: 'bill_list' }));
changePageTitle(formatMessage({ id: 'bills_list' }));
}, [changePageTitle, formatMessage]);
const fetchResourceViews = useQuery(
@@ -195,4 +195,4 @@ export default compose(
withBills(({ billsTableQuery }) => ({
billsTableQuery,
})),
)(BillList);
)(BillsList);

View File

@@ -21,7 +21,7 @@ import 'style/pages/PaymentMade/PageForm.scss'
/**
* Payment made - Page form.
*/
function PaymentMade({
function PaymentMadeFormPage({
//#withAccountsActions
requestFetchAccounts,
@@ -119,5 +119,5 @@ export default compose(
withPaymentMadeActions,
withSettingsActions,
withDashboardActions,
)(PaymentMade);
)(PaymentMadeFormPage);

View File

@@ -15,7 +15,7 @@ import { compose } from 'utils';
import 'style/pages/SaleEstimate/PageForm.scss';
function Estimates({
function EstimateFormPage({
// #withCustomersActions
requestFetchCustomers,
@@ -101,4 +101,4 @@ export default compose(
withItemsActions,
withSettingsActions,
withDashboardActions,
)(Estimates);
)(EstimateFormPage);

View File

@@ -20,7 +20,7 @@ import withViewsActions from 'containers/Views/withViewsActions';
import { compose } from 'utils';
function EstimateList({
function EstimatesList({
// #withDashboardActions
changePageTitle,
@@ -65,7 +65,7 @@ function EstimateList({
);
useEffect(() => {
changePageTitle(formatMessage({ id: 'estimate_list' }));
changePageTitle(formatMessage({ id: 'estimates_list' }));
}, [changePageTitle, formatMessage]);
// handle delete estimate click
@@ -288,4 +288,4 @@ export default compose(
estimatesTableQuery,
estimateViews,
})),
)(EstimateList);
)(EstimatesList);

View File

@@ -15,7 +15,7 @@ import { compose } from 'utils';
import 'style/pages/SaleInvoice/PageForm.scss';
function Invoices({
function InvoiceFormPage({
// #withCustomersActions
requestFetchCustomers,
@@ -100,4 +100,4 @@ export default compose(
withItemsActions,
withSettingsActions,
withDashboardActions,
)(Invoices);
)(InvoiceFormPage);

View File

@@ -23,7 +23,7 @@ import { compose } from 'utils';
/**
* Invoices list.
*/
function InvoiceList({
function InvoicesList({
// #withDashboardActions
changePageTitle,
@@ -48,7 +48,7 @@ function InvoiceList({
const [selectedRows, setSelectedRows] = useState([]);
useEffect(() => {
changePageTitle(formatMessage({ id: 'invoice_list' }));
changePageTitle(formatMessage({ id: 'invoices_list' }));
}, [changePageTitle, formatMessage]);
const fetchResourceViews = useQuery(
@@ -222,4 +222,4 @@ export default compose(
withInvoices(({ invoicesTableQuery }) => ({
invoicesTableQuery,
})),
)(InvoiceList);
)(InvoicesList);

View File

@@ -42,7 +42,7 @@ function PaymentReceiveList({
const [selectedRows, setSelectedRows] = useState([]);
useEffect(() => {
changePageTitle(formatMessage({ id: 'payment_Receive_list' }));
changePageTitle(formatMessage({ id: 'payment_Receives_list' }));
}, [changePageTitle, formatMessage]);
const fetchResourceViews = useQuery(

View File

@@ -14,7 +14,7 @@ import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import { compose } from 'utils';
function Receipts({
function ReceiptFormPage({
//#withwithAccountsActions
requestFetchAccounts,
@@ -107,4 +107,4 @@ export default compose(
withAccountsActions,
withSettingsActions,
withDashboardActions,
)(Receipts);
)(ReceiptFormPage);

View File

@@ -20,7 +20,7 @@ import withViewsActions from 'containers/Views/withViewsActions';
import { compose } from 'utils';
function ReceiptList({
function ReceiptsList({
// #withDashboardActions
changePageTitle,
@@ -54,7 +54,7 @@ function ReceiptList({
);
useEffect(() => {
changePageTitle(formatMessage({ id: 'receipt_list' }));
changePageTitle(formatMessage({ id: 'receipts_list' }));
}, [changePageTitle, formatMessage]);
// handle delete receipt click
@@ -206,4 +206,4 @@ export default compose(
withReceipts(({ receiptTableQuery }) => ({
receiptTableQuery,
})),
)(ReceiptList);
)(ReceiptsList);

View File

@@ -11,7 +11,7 @@ import withCurrenciesActions from 'containers/Currencies/withCurrenciesActions';
import { compose } from 'utils';
function Vendor({
function VendorFormPage({
// #withVendorActions
requestFetchVendorsTable,
requsetFetchVendor,
@@ -65,4 +65,4 @@ function Vendor({
);
}
export default compose(withCurrenciesActions, withVendorActions)(Vendor);
export default compose(withCurrenciesActions, withVendorActions)(VendorFormPage);