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] 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 2eacc0103..a7ccde37f 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'),