-
+
+
diff --git a/client/src/containers/Customers/CustomersLanding/CustomersList.js b/client/src/containers/Customers/CustomersLanding/CustomersList.js
index f4cb9d428..118ebbe46 100644
--- a/client/src/containers/Customers/CustomersLanding/CustomersList.js
+++ b/client/src/containers/Customers/CustomersLanding/CustomersList.js
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
import 'style/pages/Customers/List.scss';
-import { DashboardContentTable, DashboardPageContent } from 'components';
+import { DashboardPageContent } from 'components';
import CustomersActionsBar from './CustomersActionsBar';
import CustomersViewsTabs from './CustomersViewsTabs';
diff --git a/client/src/containers/Customers/CustomersLanding/CustomersTable.js b/client/src/containers/Customers/CustomersLanding/CustomersTable.js
index c2fd9c2a1..9205ee93a 100644
--- a/client/src/containers/Customers/CustomersLanding/CustomersTable.js
+++ b/client/src/containers/Customers/CustomersLanding/CustomersTable.js
@@ -92,12 +92,12 @@ function CustomersTable({
// Handle view detail contact.
const handleViewDetailCustomer = ({ id }) => {
- openDrawer('contact-detail-drawer', { contactId: id });
+ openDrawer('contact-detail-drawer', { customerId: id });
};
// Handle cell click.
const handleCellClick = (cell, event) => {
- openDrawer('contact-detail-drawer', { contactId: cell.row.original.id });
+ openDrawer('customer-details-drawer', { customerId: cell.row.original.id });
};
if (isEmptyStatus) {
diff --git a/client/src/containers/Customers/CustomersUniversalSearch.js b/client/src/containers/Customers/CustomersUniversalSearch.js
index 661f6bc46..b9e4b8768 100644
--- a/client/src/containers/Customers/CustomersUniversalSearch.js
+++ b/client/src/containers/Customers/CustomersUniversalSearch.js
@@ -3,14 +3,23 @@ import intl from 'react-intl-universal';
import { RESOURCES_TYPES } from '../../common/resourcesTypes';
import withDrawerActions from '../Drawer/withDrawerActions';
-function CustomerUniversalSearchSelectComponent({ resourceType, resourceId }) {
+function CustomerUniversalSearchSelectComponent({
+ resourceType,
+ resourceId,
+ onAction,
+
+ // #withDrawerActions
+ openDrawer,
+}) {
if (resourceType === RESOURCES_TYPES.CUSTOMER) {
+ openDrawer('customer-details-drawer', { customerId: resourceId });
+ onAction && onAction();
}
return null;
}
const CustomerUniversalSearchSelectAction = withDrawerActions(
- CustomerUniversalSearchSelectComponent
+ CustomerUniversalSearchSelectComponent,
);
/**
@@ -19,6 +28,7 @@ const CustomerUniversalSearchSelectAction = withDrawerActions(
* @returns
*/
const customersToSearch = (contact) => ({
+ id: contact.id,
text: contact.display_name,
label: contact.formatted_balance,
reference: contact,
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetails.js b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetails.js
new file mode 100644
index 000000000..4ff62bf14
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetails.js
@@ -0,0 +1,24 @@
+import React from 'react';
+import clsx from 'classnames';
+
+import { Card } from 'components';
+
+import CustomerDetailsActionsBar from './CustomerDetailsActionsBar';
+import CustomerDetailsHeader from './CustomerDetailsHeader';
+
+import Style from './CustomerDetailsDrawer.module.scss';
+
+/**
+ * contact detail.
+ */
+export default function CustomerDetails() {
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsActionsBar.js b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsActionsBar.js
new file mode 100644
index 000000000..1453a5ea2
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsActionsBar.js
@@ -0,0 +1,130 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import { useHistory } from 'react-router-dom';
+import {
+ Button,
+ NavbarGroup,
+ Classes,
+ NavbarDivider,
+ Intent,
+ Position,
+ PopoverInteractionKind,
+ Popover,
+ Menu,
+ MenuItem,
+} from '@blueprintjs/core';
+import clsx from 'classnames';
+import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
+
+import { useCustomerDetailsDrawerContext } from './CustomerDetailsDrawerProvider';
+
+import withAlertsActions from 'containers/Alert/withAlertActions';
+import withDrawerActions from 'containers/Drawer/withDrawerActions';
+
+import { Icon, FormattedMessage as T } from 'components';
+
+import { compose } from 'utils';
+
+/**
+ * Customer details actions bar.
+ */
+function CustomerDetailsActionsBar({
+ // #withAlertsActions
+ openAlert,
+
+ // #withDrawerActions
+ closeDrawer,
+}) {
+ const { contact, customerId } = useCustomerDetailsDrawerContext();
+ const history = useHistory();
+
+ // Handle new invoice button click.
+ const handleNewInvoiceClick = () => {
+ history.push('invoices/new');
+ closeDrawer('customer-details-drawer');
+ };
+ // Handle new receipt button click.
+ const handleNewReceiptClick = () => {
+ history.push('receipts/new');
+ closeDrawer('customer-details-drawer');
+ };
+ // Handle new payment receive button click.
+ const handleNewPaymentClick = () => {
+ history.push('payment-receives/new');
+ closeDrawer('customer-details-drawer');
+ };
+ // Handle new estimate button click.
+ const handleNewEstimateClick = () => {
+ history.push('estimates/new');
+ closeDrawer('customer-details-drawer');
+ };
+
+ const handleDeleteCustomer = () => {
+ openAlert(`'customer-delete`, { customerId });
+ closeDrawer('customer-details-drawer');
+ };
+ const handleEditContact = () => {
+ history.push(`/customers/${customerId}/edit`);
+ closeDrawer('customer-details-drawer');
+ };
+
+ return (
+
+
+
+ }
+ onClick={handleNewInvoiceClick}
+ />
+ }
+ onClick={handleNewEstimateClick}
+ />
+ }
+ onClick={handleNewReceiptClick}
+ />
+ }
+ onClick={handleNewPaymentClick}
+ />
+
+ }
+ minimal={true}
+ interactionKind={PopoverInteractionKind.CLICK}
+ position={Position.BOTTOM_LEFT}
+ >
+ }
+ icon={}
+ />
+
+
+
+
+ }
+ text={intl.get('edit_contact', { name: contact?.contact_service })}
+ onClick={handleEditContact}
+ />
+
+ }
+ text={}
+ intent={Intent.DANGER}
+ onClick={handleDeleteCustomer}
+ />
+
+
+ );
+}
+
+export default compose(
+ withDrawerActions,
+ withAlertsActions,
+)(CustomerDetailsActionsBar);
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawer.module.scss b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawer.module.scss
new file mode 100644
index 000000000..9643c2784
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawer.module.scss
@@ -0,0 +1,15 @@
+.root {
+
+ &_content {
+
+ &_primary {
+ padding-bottom: 15px;
+ border-bottom: 1px solid #e2e2e2;
+ }
+ }
+
+ :global .card {
+ margin: 15px;
+ padding: 18px;
+ }
+}
\ No newline at end of file
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerContent.js b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerContent.js
new file mode 100644
index 000000000..f6862ff37
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerContent.js
@@ -0,0 +1,18 @@
+import React from 'react';
+
+import CustomerDetails from './CustomerDetails';
+import { CustomerDetailsDrawerProvider } from './CustomerDetailsDrawerProvider';
+
+/**
+ * Contact detail drawer content.
+ */
+export default function CustomerDetailsDrawerContent({
+ // #ownProp
+ customerId,
+}) {
+ return (
+
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerProvider.js b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerProvider.js
new file mode 100644
index 000000000..f0579272c
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsDrawerProvider.js
@@ -0,0 +1,39 @@
+import React from 'react';
+import { DrawerHeaderContent, DashboardInsider } from 'components';
+import { useCustomer } from 'hooks/query';
+
+const ContactDetailDrawerContext = React.createContext();
+
+/**
+ * Contact detail provider.
+ */
+function CustomerDetailsDrawerProvider({ customerId, ...props }) {
+ // Handle fetch customer details.
+ const { data: customer, isLoading: isCustomerLoading } = useCustomer(
+ customerId,
+ {
+ enabled: !!customerId,
+ },
+ );
+ // Provider.
+ const provider = {
+ customer,
+ customerId,
+ isCustomerLoading,
+ };
+
+ return (
+
+
+
+
+ );
+}
+
+const useCustomerDetailsDrawerContext = () =>
+ React.useContext(ContactDetailDrawerContext);
+
+export { CustomerDetailsDrawerProvider, useCustomerDetailsDrawerContext };
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsHeader.js b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsHeader.js
new file mode 100644
index 000000000..a9aeabcf3
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/CustomerDetailsHeader.js
@@ -0,0 +1,79 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import clsx from 'classnames';
+import { defaultTo } from 'lodash';
+
+import { DetailsMenu, DetailItem, T } from 'components';
+
+import { useCustomerDetailsDrawerContext } from './CustomerDetailsDrawerProvider';
+
+import Style from './CustomerDetailsDrawer.module.scss';
+
+/**
+ * Customer details header.
+ */
+export default function CustomerDetailsHeader() {
+ const { customer } = useCustomerDetailsDrawerContext();
+
+ return (
+
+
+ }
+ >
+ {customer.formatted_balance}
+
+
+ }
+ name={'name'}
+ children={customer?.display_name}
+ />
+ }
+ name={'type'}
+ children={customer?.customer_type}
+ />
+ }>
+ 0
+
+
+
+
+ }
+ children={defaultTo(customer?.company_name, '--')}
+ />
+ }
+ children={defaultTo(customer?.email, '--')}
+ />
+ }>
+ {customer?.personal_phone}
+ {customer?.work_phone}
+
+
+ }
+ children={defaultTo(customer?.website, '--')}
+ />
+ }
+ children={customer?.formatted_opening_balance}
+ />
+ }
+ children={customer?.formatted_opening_balance_at}
+ />
+ }
+ children={customer?.currency_code}
+ />
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/CustomerDetailsDrawer/index.js b/client/src/containers/Drawers/CustomerDetailsDrawer/index.js
new file mode 100644
index 000000000..6800ff984
--- /dev/null
+++ b/client/src/containers/Drawers/CustomerDetailsDrawer/index.js
@@ -0,0 +1,30 @@
+import React from 'react';
+import { Drawer, DrawerSuspense } from 'components';
+import withDrawers from 'containers/Drawer/withDrawers';
+
+import { compose } from 'utils';
+
+const CustomerDetailsDrawerContent = React.lazy(() =>
+ import('./CustomerDetailsDrawerContent'),
+);
+
+/**
+ * Contact detail drawer.
+ */
+function CustomerDetailsDrawer({
+ name,
+
+ // #withDrawer
+ isOpen,
+ payload: { customerId },
+}) {
+ return (
+
+
+
+
+
+ );
+}
+
+export default compose(withDrawers())(CustomerDetailsDrawer);
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetails.js b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetails.js
new file mode 100644
index 000000000..32bbc2a5f
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetails.js
@@ -0,0 +1,24 @@
+import React from 'react';
+import clsx from 'classnames';
+
+import { Card } from 'components';
+
+import VendorDetailsActionsBar from './VendorDetailsActionsBar';
+import VendorDetailsHeader from './VendorDetailsHeader';
+
+import Style from './VendorDetailsDrawer.module.scss';
+
+/**
+ * contact detail.
+ */
+export default function CustomerDetails() {
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsActionsBar.js b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsActionsBar.js
new file mode 100644
index 000000000..28b75a88d
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsActionsBar.js
@@ -0,0 +1,113 @@
+import React from 'react';
+import { useHistory } from 'react-router-dom';
+import {
+ Button,
+ NavbarGroup,
+ Classes,
+ NavbarDivider,
+ Intent,
+ PopoverInteractionKind,
+ Position,
+ MenuItem,
+ Menu,
+ Popover,
+} from '@blueprintjs/core';
+import clsx from 'classnames';
+import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
+
+import { useVendorDetailsDrawerContext } from './VendorDetailsDrawerProvider';
+
+import withAlertsActions from 'containers/Alert/withAlertActions';
+import withDrawerActions from 'containers/Drawer/withDrawerActions';
+
+import { Icon, FormattedMessage as T } from 'components';
+
+import { safeCallback, compose } from 'utils';
+
+/**
+ * Vendor details actions bar.
+ */
+function VendorDetailsActionsBar({
+ // #withAlertsActions
+ openAlert,
+
+ // #withDrawerActions
+ closeDrawer,
+}) {
+ const { vendor, vendorId } = useVendorDetailsDrawerContext();
+ const history = useHistory();
+
+ // Handle edit vendor.
+ const onEditContact = () => {
+ history.push(`/vendors/${vendorId}/edit`);
+ closeDrawer('vendor-details-drawer');
+ };
+
+ // Handle delete vendor.
+ const onDeleteContact = () => {
+ openAlert(`'vendor-delete`, { vendorId });
+ closeDrawer('vendor-details-drawer');
+ };
+
+ const handleNewInvoiceClick = () => {
+ history.push('bills/new');
+ closeDrawer('vendor-details-drawer');
+ };
+
+ const handleNewPaymentClick = () => {
+ history.push('payment-mades/new');
+ closeDrawer('vendor-details-drawer');
+ };
+
+ return (
+
+
+
+ }
+ onClick={handleNewInvoiceClick}
+ />
+ }
+ onClick={handleNewPaymentClick}
+ />
+
+ }
+ minimal={true}
+ interactionKind={PopoverInteractionKind.CLICK}
+ position={Position.BOTTOM_LEFT}
+ >
+ }
+ icon={}
+ />
+
+
+
+
+ }
+ text={}
+ onClick={safeCallback(onEditContact)}
+ />
+
+ }
+ text={}
+ intent={Intent.DANGER}
+ onClick={safeCallback(onDeleteContact)}
+ />
+
+
+ );
+}
+
+export default compose(
+ withDrawerActions,
+ withAlertsActions,
+)(VendorDetailsActionsBar);
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawer.module.scss b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawer.module.scss
new file mode 100644
index 000000000..f7909a835
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawer.module.scss
@@ -0,0 +1,17 @@
+.root {
+
+
+ &_content {
+
+ &_primary {
+ padding-bottom: 15px;
+ border-bottom: 1px solid #e2e2e2;
+ }
+ }
+
+
+ :global .card {
+ margin: 15px;
+ padding: 18px;
+ }
+}
\ No newline at end of file
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerContent.js b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerContent.js
new file mode 100644
index 000000000..8b5b3503a
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerContent.js
@@ -0,0 +1,18 @@
+import React from 'react';
+
+import VendorDetails from './VendorDetails';
+import { VendorDetailsDrawerProvider } from './VendorDetailsDrawerProvider';
+
+/**
+ * Contact detail drawer content.
+ */
+export default function VendorDetailsDrawerContent({
+ // #ownProp
+ vendorId,
+}) {
+ return (
+
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerProvider.js b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerProvider.js
new file mode 100644
index 000000000..60e701a04
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsDrawerProvider.js
@@ -0,0 +1,39 @@
+import React from 'react';
+import { DrawerHeaderContent, DashboardInsider } from 'components';
+import { useVendor } from 'hooks/query';
+
+const VendorDetailDrawerContext = React.createContext();
+
+/**
+ * Contact detail provider.
+ */
+function VendorDetailsDrawerProvider({ vendorId, ...props }) {
+ // Handle fetch vendor details.
+ const { data: vendor, isLoading: isVendorLoading } = useVendor(
+ vendorId,
+ {
+ enabled: !!vendorId,
+ },
+ );
+ // Provider.
+ const provider = {
+ vendor,
+ vendorId,
+ isVendorLoading,
+ };
+
+ return (
+
+
+
+
+ );
+}
+
+const useVendorDetailsDrawerContext = () =>
+ React.useContext(VendorDetailDrawerContext);
+
+export { VendorDetailsDrawerProvider, useVendorDetailsDrawerContext };
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsHeader.js b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsHeader.js
new file mode 100644
index 000000000..3ff466e5d
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/VendorDetailsHeader.js
@@ -0,0 +1,74 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import clsx from 'classnames';
+import { defaultTo } from 'lodash';
+
+import { T, DetailsMenu, DetailItem } from 'components';
+
+import { useVendorDetailsDrawerContext } from './VendorDetailsDrawerProvider';
+
+import Style from './VendorDetailsDrawer.module.scss';
+
+/**
+ * Vendor details header.
+ */
+export default function VendorDetailsHeader() {
+ const { vendor } = useVendorDetailsDrawerContext();
+
+ return (
+
+
+ }
+ >
+ {vendor.formatted_balance}
+
+
+ }
+ name={'name'}
+ children={vendor?.display_name}
+ />
+ }>
+ 0
+
+
+
+
+ }
+ children={defaultTo(vendor?.company_name, '--')}
+ />
+
+ }>
+ {vendor?.personal_phone}
+ {vendor?.work_phone}
+
+
+ }
+ children={defaultTo(vendor?.website, '--')}
+ />
+ }
+ children={vendor?.formatted_opening_balance}
+ />
+ }
+ children={vendor?.formatted_opening_balance_at}
+ />
+ }
+ children={vendor?.currency_code}
+ />
+
+
+ );
+}
diff --git a/client/src/containers/Drawers/VendorDetailsDrawer/index.js b/client/src/containers/Drawers/VendorDetailsDrawer/index.js
new file mode 100644
index 000000000..1c7868940
--- /dev/null
+++ b/client/src/containers/Drawers/VendorDetailsDrawer/index.js
@@ -0,0 +1,30 @@
+import React from 'react';
+import { Drawer, DrawerSuspense } from 'components';
+import withDrawers from 'containers/Drawer/withDrawers';
+
+import { compose } from 'utils';
+
+const VendorDetailsDrawerContent = React.lazy(() =>
+ import('./VendorDetailsDrawerContent'),
+);
+
+/**
+ * Vendor details drawer.
+ */
+function VendorDetailsDrawer({
+ name,
+
+ // #withDrawer
+ isOpen,
+ payload: { vendorId },
+}) {
+ return (
+
+
+
+
+
+ );
+}
+
+export default compose(withDrawers())(VendorDetailsDrawer);
diff --git a/client/src/containers/Vendors/VendorsLanding/VendorsTable.js b/client/src/containers/Vendors/VendorsLanding/VendorsTable.js
index cbef01798..0a0e8b3f7 100644
--- a/client/src/containers/Vendors/VendorsLanding/VendorsTable.js
+++ b/client/src/containers/Vendors/VendorsLanding/VendorsTable.js
@@ -83,12 +83,12 @@ function VendorsTable({
// Handle view detail item.
const handleViewDetailVendor = ({ id }) => {
- openDrawer('contact-detail-drawer', { contactId: id });
+ openDrawer('vendor-details-drawer', { vendorId: id });
};
// Handle cell click.
const handleCellClick = (cell, event) => {
- openDrawer('contact-detail-drawer', { contactId: cell.row.original.id });
+ openDrawer('vendor-details-drawer', { vendorId: cell.row.original.id });
};
// Handle fetch data once the page index, size or sort by of the table change.
diff --git a/client/src/containers/Vendors/VendorsUniversalSearch.js b/client/src/containers/Vendors/VendorsUniversalSearch.js
index 073187127..6a3f7fedb 100644
--- a/client/src/containers/Vendors/VendorsUniversalSearch.js
+++ b/client/src/containers/Vendors/VendorsUniversalSearch.js
@@ -3,20 +3,33 @@ import intl from 'react-intl-universal';
import { RESOURCES_TYPES } from '../../common/resourcesTypes';
import withDrawerActions from '../Drawer/withDrawerActions';
-function VendorUniversalSearchSelectComponent({ resourceType, resourceId }) {
+/**
+ * Vendor univesal search item select action.
+ */
+function VendorUniversalSearchSelectComponent({
+ resourceType,
+ resourceId,
+ onAction,
+
+ // #withDrawerActions
+ openDrawer,
+}) {
if (resourceType === RESOURCES_TYPES.VENDOR) {
+ openDrawer('vendor-details-drawer', { vendorId: resourceId });
+ onAction && onAction();
}
return null;
}
const VendorUniversalSearchSelectAction = withDrawerActions(
- VendorUniversalSearchSelectComponent
+ VendorUniversalSearchSelectComponent,
);
/**
* Transformes vendor resource item to search.
*/
const vendorToSearch = (contact) => ({
+ id: contact.id,
text: contact.display_name,
label: contact.balance > 0 ? contact.formatted_balance + '' : '',
reference: contact,
diff --git a/client/src/lang/en/index.json b/client/src/lang/en/index.json
index 5f4b155a8..2ef61fc2f 100644
--- a/client/src/lang/en/index.json
+++ b/client/src/lang/en/index.json
@@ -1250,5 +1250,36 @@
"dashboard.subscription_msg.period_over": "Subscription period is over",
"inventory_adjustment.details_drawer.title": "Inventory adjustment details",
"setup.organization.location": "Location",
- "preferences.general.success_message": "The general preferences has been saved."
+ "preferences.general.success_message": "The general preferences has been saved.",
+ "customer.drawer.action.new_invoice": "New invoice",
+ "customer.drawer.action.new_estimate": "New estimate",
+ "customer.drawer.action.new_payment": "New payment",
+ "customer.drawer.action.new_receipt": "New receipt",
+ "customer.drawer.action.new_transaction": "New transaction",
+ "customer.drawer.label.outstanding_receivable": "Outstanding receivable",
+ "customer.drawer.label.customer_name": "Customer name",
+ "customer.drawer.label.customer_type": "Customer type",
+ "customer.drawer.label.unused_credits": "Unused Credits",
+ "customer.drawer.label.company_name": "Company name",
+ "customer.drawer.label.email": "Email",
+ "customer.drawer.label.phone_number": "Phone number",
+ "customer.drawer.label.website": "Website",
+ "customer.drawer.label.opening_balance": "Opening balance",
+ "customer.drawer.label.opening_balance_at": "Opening balance at",
+ "customer.drawer.label.currency": "Currency code",
+ "vendor.drawer.label.outstanding_payable": "Outstanding payable",
+ "vendor.drawer.label.vendor": "Vendor name",
+ "vendor.drawer.label.vendor_type": "Vendor type",
+ "vendor.drawer.label.unused_credits": "Unused Credits",
+ "vendor.drawer.label.company_name": "Company name",
+ "vendor.drawer.label.phone_number": "Phone number",
+ "vendor.drawer.label.website": "Website",
+ "vendor.drawer.label.opening_balance": "Opening balance",
+ "vendor.drawer.label.opening_balance_at": "Opening balance at",
+ "vendor.drawer.label.currency": "Currency",
+ "vendor.drawer.action.edit_vendor": "Edit vendor",
+ "vendor.drawer.action.delete": "Delete",
+ "vendor.drawer.action.new_transaction": "New transaction",
+ "vendor.drawer.action.new_payment": "New payment",
+ "vendor.drawer.action.new_invoice": "New purchase invoice"
}
\ No newline at end of file
diff --git a/server/src/services/Contacts/VendorsService.ts b/server/src/services/Contacts/VendorsService.ts
index a0f266c21..eb7aee3ac 100644
--- a/server/src/services/Contacts/VendorsService.ts
+++ b/server/src/services/Contacts/VendorsService.ts
@@ -202,7 +202,7 @@ export default class VendorsService {
* @param {number} vendorId
*/
public async getVendor(tenantId: number, vendorId: number) {
- const vendor = this.contactService.getContact(tenantId, vendorId, 'vendor');
+ const vendor = await this.contactService.getContact(tenantId, vendorId, 'vendor');
return this.vendorTransformer.transform(vendor);
}