mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +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.
|
* Phone number accessor.
|
||||||
*/
|
*/
|
||||||
export function PhoneNumberAccessor(row) {
|
export function PhoneNumberAccessor(row) {
|
||||||
return (
|
return <div className={'work_phone'}>{row.work_phone}</div>;
|
||||||
<div>
|
|
||||||
<div className={'work_phone'}>{row.work_phone}</div>
|
|
||||||
<div className={'personal_phone'}>{row.personal_phone}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,14 +116,14 @@ export function useCustomersTableColumns() {
|
|||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'phone_number',
|
id: 'work_phone',
|
||||||
Header: formatMessage({ id: 'phone_number' }),
|
Header: formatMessage({ id: 'work_phone' }),
|
||||||
accessor: PhoneNumberAccessor,
|
accessor: PhoneNumberAccessor,
|
||||||
className: 'phone_number',
|
className: 'phone_number',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'receivable_balance',
|
id: 'balance',
|
||||||
Header: formatMessage({ id: 'receivable_balance' }),
|
Header: formatMessage({ id: 'receivable_balance' }),
|
||||||
accessor: BalanceAccessor,
|
accessor: BalanceAccessor,
|
||||||
className: 'receivable_balance',
|
className: 'receivable_balance',
|
||||||
|
|||||||
@@ -73,12 +73,7 @@ export function AvatarAccessor(row) {
|
|||||||
* Phone number accessor.
|
* Phone number accessor.
|
||||||
*/
|
*/
|
||||||
export function PhoneNumberAccessor(row) {
|
export function PhoneNumberAccessor(row) {
|
||||||
return (
|
return <div className={'work_phone'}>{row.work_phone}</div>;
|
||||||
<div>
|
|
||||||
<div className={'work_phone'}>{row.work_phone}</div>
|
|
||||||
<div className={'personal_phone'}>{row.personal_phone}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,14 +115,14 @@ export function useVendorsTableColumns() {
|
|||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'phone_number',
|
id: 'work_phone',
|
||||||
Header: formatMessage({ id: 'phone_number' }),
|
Header: formatMessage({ id: 'work_phone' }),
|
||||||
accessor: PhoneNumberAccessor,
|
accessor: PhoneNumberAccessor,
|
||||||
className: 'phone_number',
|
className: 'work_phone',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'receivable_balance',
|
id: 'balance',
|
||||||
Header: formatMessage({ id: 'receivable_balance' }),
|
Header: formatMessage({ id: 'receivable_balance' }),
|
||||||
accessor: BalanceAccessor,
|
accessor: BalanceAccessor,
|
||||||
className: 'receivable_balance',
|
className: 'receivable_balance',
|
||||||
|
|||||||
@@ -1019,4 +1019,5 @@ export default {
|
|||||||
'Cannot delete bill that has associated payment transactions.',
|
'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:
|
||||||
'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() {
|
static get fields() {
|
||||||
return {
|
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: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
options: [
|
options: [
|
||||||
|
|||||||
@@ -127,6 +127,42 @@ export default class Vendor extends TenantModel {
|
|||||||
|
|
||||||
static get fields() {
|
static get fields() {
|
||||||
return {
|
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: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
options: [
|
options: [
|
||||||
|
|||||||
Reference in New Issue
Block a user