Compare commits

...

6 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
11851d114d Merge pull request #16 from bigcapitalhq/develop
Release 1.5.5
2022-01-04 22:35:49 +02:00
elforjani13
3a3dd7a565 fix(VendorForm): placeholder phone number. 2022-01-04 22:31:01 +02:00
elforjani13
687dda1e7c fix(inviteUserFrom): fix localiztion. 2022-01-04 21:31:58 +02:00
elforjani13
bfa809c831 feat(VendorList): add note accessor & personal phone. 2022-01-04 20:47:43 +02:00
elforjani13
07145e92ab feat(CustomerList): add note accessor & personal phone. 2022-01-04 20:47:28 +02:00
a.bouhuolia
21779007be fix: application version. 2022-01-03 23:14:11 +02:00
7 changed files with 75 additions and 7 deletions

View File

@@ -85,6 +85,9 @@ function getClientEnvironment(publicUrl) {
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST, WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH, WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT, WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
// Application version.
VERSION: paths.appVersion
} }
); );
// Stringify all values so we can feed into webpack DefinePlugin // Stringify all values so we can feed into webpack DefinePlugin

View File

@@ -48,6 +48,8 @@ const resolveModule = (resolveFn, filePath) => {
return resolveFn(`${filePath}.js`); return resolveFn(`${filePath}.js`);
}; };
const appVersion = require(resolveApp('package.json')).version;
// config after eject: we're in ./config/ // config after eject: we're in ./config/
module.exports = { module.exports = {
dotenv: resolveApp('.env'), dotenv: resolveApp('.env'),
@@ -65,6 +67,7 @@ module.exports = {
proxySetup: resolveApp('src/setupProxy.js'), proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'), appNodeModules: resolveApp('node_modules'),
publicUrlOrPath, publicUrlOrPath,
appVersion
}; };

View File

@@ -28,7 +28,7 @@ export default function Sidebar({ dashboardContentRef }) {
* @returns {React.JSX} * @returns {React.JSX}
*/ */
function SidebarFooterVersion() { function SidebarFooterVersion() {
const { REACT_APP_VERSION: VERSION } = process.env; const { VERSION } = process.env;
if (!VERSION) { if (!VERSION) {
return null; return null;

View File

@@ -1,5 +1,13 @@
import React, { useMemo } from 'react'; 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 clsx from 'classnames';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
@@ -79,7 +87,7 @@ export function ActionsMenu({
* Phone number accessor. * Phone number accessor.
*/ */
export function PhoneNumberAccessor(row) { export function PhoneNumberAccessor(row) {
return <div className={'work_phone'}>{row.work_phone}</div>; return <div className={'work_phone'}>{row.personal_phone}</div>;
} }
/** /**
@@ -89,6 +97,24 @@ export function BalanceAccessor(row) {
return <Money amount={row.closing_balance} currency={row.currency_code} />; 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. * Retrieve customers table columns.
*/ */
@@ -123,12 +149,20 @@ export function useCustomersTableColumns() {
}, },
{ {
id: 'work_phone', id: 'work_phone',
Header: intl.get('work_phone'), Header: intl.get('phone_number'),
accessor: PhoneNumberAccessor, accessor: PhoneNumberAccessor,
className: 'phone_number', className: 'phone_number',
width: 100, width: 100,
clickable: true, clickable: true,
}, },
{
id: 'note',
Header: intl.get('note'),
accessor: NoteAccessor,
disableSortBy: true,
width: 85,
clickable: true,
},
{ {
id: 'balance', id: 'balance',
Header: intl.get('receivable_balance'), Header: intl.get('receivable_balance'),

View File

@@ -48,7 +48,7 @@ function VendorFormAfterPrimarySection() {
{({ field, meta: { error, touched } }) => ( {({ field, meta: { error, touched } }) => (
<InputGroup <InputGroup
intent={inputIntent({ error, touched })} intent={inputIntent({ error, touched })}
placeholder={intl.get('Mobile')} placeholder={intl.get('mobile')}
{...field} {...field}
/> />
)} )}

View File

@@ -6,7 +6,9 @@ import {
MenuItem, MenuItem,
MenuDivider, MenuDivider,
Position, Position,
Tooltip,
Intent, Intent,
Classes,
} from '@blueprintjs/core'; } from '@blueprintjs/core';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
@@ -114,6 +116,24 @@ export function BalanceAccessor({ closing_balance, currency_code }) {
return <Money amount={closing_balance} currency={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. * Retrieve the vendors table columns.
*/ */
@@ -148,12 +168,20 @@ export function useVendorsTableColumns() {
}, },
{ {
id: 'work_phone', id: 'work_phone',
Header: intl.get('work_phone'), Header: intl.get('phone_number'),
accessor: PhoneNumberAccessor, accessor: PhoneNumberAccessor,
className: 'work_phone', className: 'work_phone',
width: 100, width: 100,
clickable: true, clickable: true,
}, },
{
id: 'note',
Header: intl.get('note'),
accessor: NoteAccessor,
disableSortBy: true,
width: 85,
clickable: true,
},
{ {
id: 'balance', id: 'balance',
Header: intl.get('receivable_balance'), Header: intl.get('receivable_balance'),

View File

@@ -78,7 +78,7 @@
"new": "جديد", "new": "جديد",
"invite_user": "دعوة مستخدم", "invite_user": "دعوة مستخدم",
"your_access_to_your_team": "سيتلقى زميلك في الفريق رسالة بريد إلكتروني تتيح له الوصول إلى فريقك.", "your_access_to_your_team": "سيتلقى زميلك في الفريق رسالة بريد إلكتروني تتيح له الوصول إلى فريقك.",
"invite": "التصنيف", "invite": "دعوة",
"count": "العدد", "count": "العدد",
"item_type": "نوع المنتج", "item_type": "نوع المنتج",
"item_name": "اسم المنتج", "item_name": "اسم المنتج",