Skip to content

Commit

Permalink
Merge pull request #16 from bigcapitalhq/develop
Browse files Browse the repository at this point in the history
Release 1.5.5
  • Loading branch information
abouolia authored Jan 4, 2022
2 parents 2177900 + 3a3dd7a commit 11851d1
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 6 deletions.
40 changes: 37 additions & 3 deletions src/containers/Customers/CustomersLanding/components.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import React, { useMemo } from 'react';
import { Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
import {
Menu,
MenuItem,
MenuDivider,
Intent,
Tooltip,
Position,
Classes,
} from '@blueprintjs/core';
import clsx from 'classnames';

import intl from 'react-intl-universal';
Expand Down Expand Up @@ -79,7 +87,7 @@ export function ActionsMenu({
* Phone number accessor.
*/
export function PhoneNumberAccessor(row) {
return <div className={'work_phone'}>{row.work_phone}</div>;
return <div className={'work_phone'}>{row.personal_phone}</div>;
}

/**
Expand All @@ -89,6 +97,24 @@ export function BalanceAccessor(row) {
return <Money amount={row.closing_balance} currency={row.currency_code} />;
}

/**
* Note column accessor.
*/
export function NoteAccessor(row) {
return (
<If condition={row.note}>
<Tooltip
className={Classes.TOOLTIP_INDICATOR}
content={row.note}
position={Position.LEFT_TOP}
hoverOpenDelay={50}
>
<Icon icon={'file-alt'} iconSize={16} />
</Tooltip>
</If>
);
}

/**
* Retrieve customers table columns.
*/
Expand Down Expand Up @@ -123,12 +149,20 @@ export function useCustomersTableColumns() {
},
{
id: 'work_phone',
Header: intl.get('work_phone'),
Header: intl.get('phone_number'),
accessor: PhoneNumberAccessor,
className: 'phone_number',
width: 100,
clickable: true,
},
{
id: 'note',
Header: intl.get('note'),
accessor: NoteAccessor,
disableSortBy: true,
width: 85,
clickable: true,
},
{
id: 'balance',
Header: intl.get('receivable_balance'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function VendorFormAfterPrimarySection() {
{({ field, meta: { error, touched } }) => (
<InputGroup
intent={inputIntent({ error, touched })}
placeholder={intl.get('Mobile')}
placeholder={intl.get('mobile')}
{...field}
/>
)}
Expand Down
30 changes: 29 additions & 1 deletion src/containers/Vendors/VendorsLanding/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {
MenuItem,
MenuDivider,
Position,
Tooltip,
Intent,
Classes,
} from '@blueprintjs/core';
import intl from 'react-intl-universal';

Expand Down Expand Up @@ -114,6 +116,24 @@ export function BalanceAccessor({ closing_balance, currency_code }) {
return <Money amount={closing_balance} currency={currency_code} />;
}

/**
* Note column accessor.
*/
export function NoteAccessor(row) {
return (
<If condition={row.note}>
<Tooltip
className={Classes.TOOLTIP_INDICATOR}
content={row.note}
position={Position.LEFT_TOP}
hoverOpenDelay={50}
>
<Icon icon={'file-alt'} iconSize={16} />
</Tooltip>
</If>
);
}

/**
* Retrieve the vendors table columns.
*/
Expand Down Expand Up @@ -148,12 +168,20 @@ export function useVendorsTableColumns() {
},
{
id: 'work_phone',
Header: intl.get('work_phone'),
Header: intl.get('phone_number'),
accessor: PhoneNumberAccessor,
className: 'work_phone',
width: 100,
clickable: true,
},
{
id: 'note',
Header: intl.get('note'),
accessor: NoteAccessor,
disableSortBy: true,
width: 85,
clickable: true,
},
{
id: 'balance',
Header: intl.get('receivable_balance'),
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ar/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"new": "جديد",
"invite_user": "دعوة مستخدم",
"your_access_to_your_team": "سيتلقى زميلك في الفريق رسالة بريد إلكتروني تتيح له الوصول إلى فريقك.",
"invite": "التصنيف",
"invite": "دعوة",
"count": "العدد",
"item_type": "نوع المنتج",
"item_name": "اسم المنتج",
Expand Down

0 comments on commit 11851d1

Please sign in to comment.