diff --git a/src/components/DisplayNameList.js b/src/components/DisplayNameList.js index cb09cb4ac..3deba980f 100644 --- a/src/components/DisplayNameList.js +++ b/src/components/DisplayNameList.js @@ -1,5 +1,6 @@ import React from 'react'; -import ListSelect from "./ListSelect"; +import intl from 'react-intl-universal'; +import ListSelect from './ListSelect'; export default function DisplayNameList({ salutation, @@ -9,25 +10,32 @@ export default function DisplayNameList({ ...restProps }) { const formats = [ - { format: '{1} {2} {3}', values: [salutation, firstName, lastName], required: [1] }, + { + format: '{1} {2} {3}', + values: [salutation, firstName, lastName], + required: [1], + }, { format: '{1} {2}', values: [firstName, lastName], required: [] }, { format: '{1}, {2}', values: [firstName, lastName], required: [1, 2] }, - { format: '{1}', values: [company], required: [1] } + { format: '{1}', values: [company], required: [1] }, ]; const formatOptions = formats - .filter((format) => !format.values.some((value, index) => { - return !value && format.required.indexOf(index + 1) !== -1; - })) + .filter( + (format) => + !format.values.some((value, index) => { + return !value && format.required.indexOf(index + 1) !== -1; + }), + ) .map((formatOption) => { const { format, values } = formatOption; let label = format; values.forEach((value, index) => { - const replaceWith = (value || ''); + const replaceWith = value || ''; label = label.replace(`{${index + 1}}`, replaceWith).trim(); }); - return { label: label.replace(/\s+/g, " ") }; + return { label: label.replace(/\s+/g, ' ') }; }); return ( @@ -35,9 +43,9 @@ export default function DisplayNameList({ items={formatOptions} selectedItemProp={'label'} textProp={'label'} - defaultText={'Select display name as'} + defaultText={intl.get('select_display_name_as')} filterable={false} - { ...restProps } + {...restProps} /> ); -} \ No newline at end of file +} diff --git a/src/containers/FinancialStatements/CustomersBalanceSummary/CustomersBalanceSummaryTable.js b/src/containers/FinancialStatements/CustomersBalanceSummary/CustomersBalanceSummaryTable.js index 6eb727d9d..29cd28088 100644 --- a/src/containers/FinancialStatements/CustomersBalanceSummary/CustomersBalanceSummaryTable.js +++ b/src/containers/FinancialStatements/CustomersBalanceSummary/CustomersBalanceSummaryTable.js @@ -25,7 +25,7 @@ export default function CustomersBalanceSummaryTable({ const columns = useCustomersSummaryColumns(); const rowClassNames = (row) => { - return [`row-type--${row.original.rowTypes}`]; + return [`row-type--${row.original.row_types}`]; }; return ( diff --git a/src/containers/FinancialStatements/CustomersTransactions/CustomersTransactionsTable.js b/src/containers/FinancialStatements/CustomersTransactions/CustomersTransactionsTable.js index 1215da2f7..295725768 100644 --- a/src/containers/FinancialStatements/CustomersTransactions/CustomersTransactionsTable.js +++ b/src/containers/FinancialStatements/CustomersTransactions/CustomersTransactionsTable.js @@ -31,7 +31,7 @@ export default function CustomersTransactionsTable({ ]); const rowClassNames = (row) => { - return [`row-type--${row.original.rowTypes}`]; + return [`row-type--${row.original.row_types}`]; }; return ( diff --git a/src/containers/FinancialStatements/CustomersTransactions/components.js b/src/containers/FinancialStatements/CustomersTransactions/components.js index 989a6c811..938e7b019 100644 --- a/src/containers/FinancialStatements/CustomersTransactions/components.js +++ b/src/containers/FinancialStatements/CustomersTransactions/components.js @@ -22,14 +22,14 @@ export const useCustomersTransactionsColumns = () => { return ( {cells[0].value} ); }, className: 'customer_name', - textOverview: true, + // textOverview: true, }, { Header: intl.get('account_name'), diff --git a/src/containers/FinancialStatements/GeneralLedger/components.js b/src/containers/FinancialStatements/GeneralLedger/components.js index 9ccb69a7f..ee60301f0 100644 --- a/src/containers/FinancialStatements/GeneralLedger/components.js +++ b/src/containers/FinancialStatements/GeneralLedger/components.js @@ -35,7 +35,7 @@ export function useGeneralLedgerTableColumns() { return row.date; }, className: 'date', - textOverview: true, + // textOverview: true, width: 120, }, { diff --git a/src/containers/FinancialStatements/InventoryItemDetails/InventoryItemDetailsTable.js b/src/containers/FinancialStatements/InventoryItemDetails/InventoryItemDetailsTable.js index 5f730f76d..5ab72ed72 100644 --- a/src/containers/FinancialStatements/InventoryItemDetails/InventoryItemDetailsTable.js +++ b/src/containers/FinancialStatements/InventoryItemDetails/InventoryItemDetailsTable.js @@ -29,7 +29,7 @@ export default function InventoryItemDetailsTable({ ); const rowClassNames = (row) => { - return [`row-type--${row.original.rowTypes}`]; + return [`row-type--${row.original.row_types}`]; }; return ( diff --git a/src/containers/FinancialStatements/InventoryItemDetails/utils.js b/src/containers/FinancialStatements/InventoryItemDetails/utils.js index 5824c4d52..35d2e29f1 100644 --- a/src/containers/FinancialStatements/InventoryItemDetails/utils.js +++ b/src/containers/FinancialStatements/InventoryItemDetails/utils.js @@ -9,7 +9,7 @@ const columnsMapper = (data, index, column) => ({ id: column.key, key: column.key, Header: column.label, - // Cell: CellForceWidth, + Cell: CellForceWidth, accessor: `cells[${index}].value`, forceWidthAccess: `cells[0].value`, className: column.key, diff --git a/src/containers/FinancialStatements/VendorsBalanceSummary/VendorsBalanceSummaryTable.js b/src/containers/FinancialStatements/VendorsBalanceSummary/VendorsBalanceSummaryTable.js index 7cb510ab9..55d57644a 100644 --- a/src/containers/FinancialStatements/VendorsBalanceSummary/VendorsBalanceSummaryTable.js +++ b/src/containers/FinancialStatements/VendorsBalanceSummary/VendorsBalanceSummaryTable.js @@ -25,7 +25,7 @@ export default function VendorsBalanceSummaryTable({ const columns = useVendorsBalanceColumns(); const rowClassNames = (row) => { - return [`row-type--${row.original.rowTypes}`]; + return [`row-type--${row.original.row_types}`]; }; return ( diff --git a/src/containers/FinancialStatements/VendorsTransactions/VendorsTransactionsTable.js b/src/containers/FinancialStatements/VendorsTransactions/VendorsTransactionsTable.js index 98343c537..637115d88 100644 --- a/src/containers/FinancialStatements/VendorsTransactions/VendorsTransactionsTable.js +++ b/src/containers/FinancialStatements/VendorsTransactions/VendorsTransactionsTable.js @@ -32,7 +32,7 @@ export default function VendorsTransactionsTable({ ]); const rowClassNames = (row) => { - return [`row-type--${row.original.rowTypes}`]; + return [`row-type--${row.original.row_types}`]; }; return ( diff --git a/src/containers/FinancialStatements/VendorsTransactions/components.js b/src/containers/FinancialStatements/VendorsTransactions/components.js index 14c9f3145..bfb8e0fe5 100644 --- a/src/containers/FinancialStatements/VendorsTransactions/components.js +++ b/src/containers/FinancialStatements/VendorsTransactions/components.js @@ -21,14 +21,14 @@ export const useVendorsTransactionsColumns = () => { return ( {cells[0].value} ); }, className: 'vendor_name', - textOverview: true, + // textOverview: true, // width: 240, }, { diff --git a/src/style/pages/FinancialStatements/CashFlowStatement.scss b/src/style/pages/FinancialStatements/CashFlowStatement.scss index 2ff22b8f2..419d7c8c1 100644 --- a/src/style/pages/FinancialStatements/CashFlowStatement.scss +++ b/src/style/pages/FinancialStatements/CashFlowStatement.scss @@ -10,7 +10,11 @@ } .tbody { .tr:not(.no-results) { - &.row-type--CASH_END_PERIOD{ + // &.row-type--AGGREGATE, + &.row-type--ACCOUNTS { + border-top: 1px solid #bbb; + } + &.row-type--CASH_END_PERIOD { border-bottom: 3px double #333; } .td { @@ -30,7 +34,7 @@ .tr.is-expanded { .td.total, - .td.date-period{ + .td.date-period { .cell-inner { display: none; } diff --git a/src/style/pages/FinancialStatements/ContactsBalanceSummary.scss b/src/style/pages/FinancialStatements/ContactsBalanceSummary.scss index 5a2ce5c5e..def379b49 100644 --- a/src/style/pages/FinancialStatements/ContactsBalanceSummary.scss +++ b/src/style/pages/FinancialStatements/ContactsBalanceSummary.scss @@ -11,6 +11,10 @@ } .tbody { .tr:not(.no-results) { + &.row-type--CUSTOMER, + &.row-type--VENDOR { + border-top: 1px solid #BBB + } .td { border-bottom: 0; padding-top: 0.4rem; diff --git a/src/style/pages/FinancialStatements/ContactsTransactions.scss b/src/style/pages/FinancialStatements/ContactsTransactions.scss index 507a8d374..7fb3ff80a 100644 --- a/src/style/pages/FinancialStatements/ContactsTransactions.scss +++ b/src/style/pages/FinancialStatements/ContactsTransactions.scss @@ -64,12 +64,11 @@ display: none; } } - } - &--CUSTOMER:last-child { - .td { - border-bottom: 1px solid #ddd; + &:not(:first-child).is-expanded .td { + border-top: 1px solid #ddd; } } + &--CUSTOMER:last-child, &--VENDOR:last-child { .td { border-bottom: 1px solid #ddd;