Fix: Edit Customer.

This commit is contained in:
elforjani3
2020-11-22 10:45:50 +02:00
parent 9503444c2a
commit f73ed19e77
3 changed files with 5 additions and 12 deletions

View File

@@ -250,7 +250,7 @@ function CustomerForm({
</div>
<div className={classNames(CLASSES.PAGE_FORM_TABS)}>
<CustomersTabs customerId={customerId} />
<CustomersTabs customer={customerId} />
</div>
<CustomerFloatingActions

View File

@@ -6,16 +6,9 @@ import CustomerAttachmentTabs from './CustomerAttachmentTabs';
import CustomerFinancialPanel from './CustomerFinancialPanel';
import CustomerNotePanel from './CustomerNotePanel';
export default function CustomersTabs({
setFieldValue,
getFieldProps,
errors,
values,
touched,
customerId,
}) {
export default function CustomersTabs({ customer }) {
const { formatMessage } = useIntl();
return (
<div>
<Tabs
@@ -27,7 +20,7 @@ export default function CustomersTabs({
<Tab
id={'financial'}
title={formatMessage({ id: 'financial_details' })}
panel={<CustomerFinancialPanel />}
panel={<CustomerFinancialPanel customerId={customer} />}
/>
<Tab
id={'address'}

View File

@@ -2,7 +2,7 @@ import { connect } from 'react-redux';
import { getCustomerById } from 'store/customers/customers.reducer';
const mapStateToProps = (state, props) => ({
customerDetail: getCustomerById(state, props.customerId),
customer: getCustomerById(state, props.customerId),
});
export default connect(mapStateToProps);