From 07145e92abbe0762bb12978870325976736564fa Mon Sep 17 00:00:00 2001 From: elforjani13 <39470382+elforjani13@users.noreply.github.com> Date: Tue, 4 Jan 2022 20:47:28 +0200 Subject: [PATCH 1/4] feat(CustomerList): add note accessor & personal phone. --- .../Customers/CustomersLanding/components.js | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/containers/Customers/CustomersLanding/components.js b/src/containers/Customers/CustomersLanding/components.js index 2eacc0103f..a7ccde37fb 100644 --- a/src/containers/Customers/CustomersLanding/components.js +++ b/src/containers/Customers/CustomersLanding/components.js @@ -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'; @@ -79,7 +87,7 @@ export function ActionsMenu({ * Phone number accessor. */ export function PhoneNumberAccessor(row) { - return
{row.work_phone}
; + return
{row.personal_phone}
; } /** @@ -89,6 +97,24 @@ export function BalanceAccessor(row) { return ; } +/** + * Note column accessor. + */ +export function NoteAccessor(row) { + return ( + + + + + + ); +} + /** * Retrieve customers table columns. */ @@ -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'), From bfa809c8317c15cbb1960ac94f3a3347e2efc703 Mon Sep 17 00:00:00 2001 From: elforjani13 <39470382+elforjani13@users.noreply.github.com> Date: Tue, 4 Jan 2022 20:47:43 +0200 Subject: [PATCH 2/4] feat(VendorList): add note accessor & personal phone. --- .../VendorFormAfterPrimarySection.js | 4 +-- .../Vendors/VendorsLanding/components.js | 30 ++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js b/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js index 52f67d598f..1f8202c484 100644 --- a/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js +++ b/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js @@ -39,7 +39,7 @@ function VendorFormAfterPrimarySection() { {({ field, meta: { error, touched } }) => ( )} @@ -48,7 +48,7 @@ function VendorFormAfterPrimarySection() { {({ field, meta: { error, touched } }) => ( )} diff --git a/src/containers/Vendors/VendorsLanding/components.js b/src/containers/Vendors/VendorsLanding/components.js index 19c0cf8b80..a804dd3642 100644 --- a/src/containers/Vendors/VendorsLanding/components.js +++ b/src/containers/Vendors/VendorsLanding/components.js @@ -6,7 +6,9 @@ import { MenuItem, MenuDivider, Position, + Tooltip, Intent, + Classes, } from '@blueprintjs/core'; import intl from 'react-intl-universal'; @@ -114,6 +116,24 @@ export function BalanceAccessor({ closing_balance, currency_code }) { return ; } +/** + * Note column accessor. + */ +export function NoteAccessor(row) { + return ( + + + + + + ); +} + /** * Retrieve the vendors table columns. */ @@ -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'), From 687dda1e7c6d6095c8391471bc51c57c4c939759 Mon Sep 17 00:00:00 2001 From: elforjani13 <39470382+elforjani13@users.noreply.github.com> Date: Tue, 4 Jan 2022 21:31:58 +0200 Subject: [PATCH 3/4] fix(inviteUserFrom): fix localiztion. --- src/lang/ar/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/ar/index.json b/src/lang/ar/index.json index 98d4f03564..e40e670915 100644 --- a/src/lang/ar/index.json +++ b/src/lang/ar/index.json @@ -78,7 +78,7 @@ "new": "جديد", "invite_user": "دعوة مستخدم", "your_access_to_your_team": "سيتلقى زميلك في الفريق رسالة بريد إلكتروني تتيح له الوصول إلى فريقك.", - "invite": "التصنيف", + "invite": "دعوة", "count": "العدد", "item_type": "نوع المنتج", "item_name": "اسم المنتج", From 3a3dd7a565303740f84c0e714e0d913d8c1b8331 Mon Sep 17 00:00:00 2001 From: elforjani13 <39470382+elforjani13@users.noreply.github.com> Date: Tue, 4 Jan 2022 22:31:01 +0200 Subject: [PATCH 4/4] fix(VendorForm): placeholder phone number. --- .../Vendors/VendorForm/VendorFormAfterPrimarySection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js b/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js index 1f8202c484..7f9e341696 100644 --- a/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js +++ b/src/containers/Vendors/VendorForm/VendorFormAfterPrimarySection.js @@ -39,7 +39,7 @@ function VendorFormAfterPrimarySection() { {({ field, meta: { error, touched } }) => ( )} @@ -48,7 +48,7 @@ function VendorFormAfterPrimarySection() { {({ field, meta: { error, touched } }) => ( )}