mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix(Customers|Vendors): sorting customers and vendors list.
This commit is contained in:
@@ -74,12 +74,7 @@ export function AvatarCell(row) {
|
||||
* Phone number accessor.
|
||||
*/
|
||||
export function PhoneNumberAccessor(row) {
|
||||
return (
|
||||
<div>
|
||||
<div className={'work_phone'}>{row.work_phone}</div>
|
||||
<div className={'personal_phone'}>{row.personal_phone}</div>
|
||||
</div>
|
||||
);
|
||||
return <div className={'work_phone'}>{row.work_phone}</div>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,14 +116,14 @@ export function useCustomersTableColumns() {
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
id: 'phone_number',
|
||||
Header: formatMessage({ id: 'phone_number' }),
|
||||
id: 'work_phone',
|
||||
Header: formatMessage({ id: 'work_phone' }),
|
||||
accessor: PhoneNumberAccessor,
|
||||
className: 'phone_number',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
id: 'receivable_balance',
|
||||
id: 'balance',
|
||||
Header: formatMessage({ id: 'receivable_balance' }),
|
||||
accessor: BalanceAccessor,
|
||||
className: 'receivable_balance',
|
||||
|
||||
@@ -73,12 +73,7 @@ export function AvatarAccessor(row) {
|
||||
* Phone number accessor.
|
||||
*/
|
||||
export function PhoneNumberAccessor(row) {
|
||||
return (
|
||||
<div>
|
||||
<div className={'work_phone'}>{row.work_phone}</div>
|
||||
<div className={'personal_phone'}>{row.personal_phone}</div>
|
||||
</div>
|
||||
);
|
||||
return <div className={'work_phone'}>{row.work_phone}</div>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,14 +115,14 @@ export function useVendorsTableColumns() {
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
id: 'phone_number',
|
||||
Header: formatMessage({ id: 'phone_number' }),
|
||||
id: 'work_phone',
|
||||
Header: formatMessage({ id: 'work_phone' }),
|
||||
accessor: PhoneNumberAccessor,
|
||||
className: 'phone_number',
|
||||
className: 'work_phone',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
id: 'receivable_balance',
|
||||
id: 'balance',
|
||||
Header: formatMessage({ id: 'receivable_balance' }),
|
||||
accessor: BalanceAccessor,
|
||||
className: 'receivable_balance',
|
||||
|
||||
@@ -1019,4 +1019,5 @@ export default {
|
||||
'Cannot delete bill that has associated payment transactions.',
|
||||
cannot_change_item_type_to_inventory_with_item_has_associated_transactions:
|
||||
'Cannot change item type to inventory with item has associated transactions.',
|
||||
work_phone: 'Work Phone',
|
||||
};
|
||||
|
||||
@@ -129,6 +129,42 @@ export default class Customer extends TenantModel {
|
||||
|
||||
static get fields() {
|
||||
return {
|
||||
contact_service: {
|
||||
column: 'contact_service',
|
||||
},
|
||||
display_name: {
|
||||
column: 'display_name',
|
||||
},
|
||||
email: {
|
||||
column: 'email',
|
||||
},
|
||||
work_phone: {
|
||||
column: 'work_phone',
|
||||
},
|
||||
personal_phone: {
|
||||
column: 'personal_phone',
|
||||
},
|
||||
company_name: {
|
||||
column: 'company_name',
|
||||
},
|
||||
website: {
|
||||
column: 'website'
|
||||
},
|
||||
created_at: {
|
||||
column: 'created_at',
|
||||
},
|
||||
balance: {
|
||||
column: 'balance',
|
||||
},
|
||||
opening_balance: {
|
||||
column: 'opening_balance',
|
||||
},
|
||||
opening_balance_at: {
|
||||
column: 'opening_balance_at',
|
||||
},
|
||||
currency_code: {
|
||||
column: 'currency_code',
|
||||
},
|
||||
status: {
|
||||
label: 'Status',
|
||||
options: [
|
||||
|
||||
@@ -127,6 +127,42 @@ export default class Vendor extends TenantModel {
|
||||
|
||||
static get fields() {
|
||||
return {
|
||||
contact_service: {
|
||||
column: 'contact_service',
|
||||
},
|
||||
display_name: {
|
||||
column: 'display_name',
|
||||
},
|
||||
email: {
|
||||
column: 'email',
|
||||
},
|
||||
work_phone: {
|
||||
column: 'work_phone',
|
||||
},
|
||||
personal_phone: {
|
||||
column: 'personal_phone',
|
||||
},
|
||||
company_name: {
|
||||
column: 'company_name',
|
||||
},
|
||||
website: {
|
||||
column: 'website'
|
||||
},
|
||||
created_at: {
|
||||
column: 'created_at',
|
||||
},
|
||||
balance: {
|
||||
column: 'balance',
|
||||
},
|
||||
opening_balance: {
|
||||
column: 'opening_balance',
|
||||
},
|
||||
opening_balance_at: {
|
||||
column: 'opening_balance_at',
|
||||
},
|
||||
currency_code: {
|
||||
column: 'currency_code',
|
||||
},
|
||||
status: {
|
||||
label: 'Status',
|
||||
options: [
|
||||
|
||||
Reference in New Issue
Block a user