BIG-232 customer and vendor drawer link.

This commit is contained in:
elforjani13
2021-12-30 21:33:18 +02:00
parent 4403bf2b06
commit ee6f4028eb
13 changed files with 83 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
import React from 'react';
import * as R from 'ramda';
import { ButtonLink } from 'components';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
function CustomerDrawerLinkComponent({
// #ownProps
children,
customerId,
// #withDrawerActions
openDrawer,
}) {
// Handle view customer drawer.
const handleCustomerDrawer = () => {
openDrawer('customer-details-drawer', { customerId });
};
return <ButtonLink onClick={handleCustomerDrawer}>{children}</ButtonLink>;
}
export const CustomerDrawerLink = R.compose(withDrawerActions)(
CustomerDrawerLinkComponent,
);

View File

@@ -0,0 +1 @@
export * from './CustomerDrawerLink';

View File

@@ -0,0 +1,23 @@
import React from 'react';
import * as R from 'ramda';
import { ButtonLink } from 'components';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
function VendorDrawerLinkComponent({
// #ownProps
children,
vendorId,
// #withDrawerActions
openDrawer,
}) {
// Handle view customer drawer.
const handleVendorDrawer = () => {
openDrawer('vendor-details-drawer', { vendorId });
};
return <ButtonLink onClick={handleVendorDrawer}>{children}</ButtonLink>;
}
export const VendorDrawerLink = R.compose(withDrawerActions)(VendorDrawerLinkComponent);

View File

@@ -0,0 +1 @@
export * from './VendorDrawerLink'

View File

@@ -92,6 +92,8 @@ export * from './TextStatus';
export * from './Tags';
export * from './CommercialDoc';
export * from './Card';
export * from './Customers'
export * from './Vendors'
const Hint = FieldHint;