mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat(GLTable): columns text overflow.
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
|||||||
FormattedMessage as T,
|
FormattedMessage as T,
|
||||||
Row,
|
Row,
|
||||||
Col,
|
Col,
|
||||||
CommercialDocTopHeader,
|
|
||||||
CommercialDocHeader,
|
CommercialDocHeader,
|
||||||
} from 'components';
|
} from 'components';
|
||||||
import { useCashflowTransactionDrawerContext } from './CashflowTransactionDrawerProvider';
|
import { useCashflowTransactionDrawerContext } from './CashflowTransactionDrawerProvider';
|
||||||
@@ -16,23 +15,14 @@ import { useCashflowTransactionDrawerContext } from './CashflowTransactionDrawer
|
|||||||
* Cashlflow transaction drawer detail Header.
|
* Cashlflow transaction drawer detail Header.
|
||||||
*/
|
*/
|
||||||
export default function CashflowTransactionDrawerHeader() {
|
export default function CashflowTransactionDrawerHeader() {
|
||||||
const {
|
const { cashflowTransaction } = useCashflowTransactionDrawerContext();
|
||||||
cashflowTransaction: {
|
|
||||||
formatted_amount,
|
|
||||||
transaction_type_formatted,
|
|
||||||
transaction_number,
|
|
||||||
reference_no,
|
|
||||||
date,
|
|
||||||
description,
|
|
||||||
},
|
|
||||||
} = useCashflowTransactionDrawerContext();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommercialDocHeader>
|
<CommercialDocHeader>
|
||||||
<CommercialDocHeader>
|
<CommercialDocHeader>
|
||||||
<DetailsMenu>
|
<DetailsMenu>
|
||||||
<DetailItem name={'total'} label={<T id={'total'} />}>
|
<DetailItem name={'total'} label={<T id={'total'} />}>
|
||||||
<h3 class="amount">{formatted_amount}</h3>
|
<h3 class="big-number">{cashflowTransaction.formatted_amount}</h3>
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
</DetailsMenu>
|
</DetailsMenu>
|
||||||
</CommercialDocHeader>
|
</CommercialDocHeader>
|
||||||
@@ -44,33 +34,26 @@ export default function CashflowTransactionDrawerHeader() {
|
|||||||
name={'transaction_type'}
|
name={'transaction_type'}
|
||||||
label={<T id={'cash_flow_drawer.label_transaction_type'} />}
|
label={<T id={'cash_flow_drawer.label_transaction_type'} />}
|
||||||
>
|
>
|
||||||
{transaction_type_formatted}
|
{cashflowTransaction.transaction_type_formatted}
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
||||||
<DetailItem
|
<DetailItem
|
||||||
name={'transaction_number'}
|
name={'transaction_number'}
|
||||||
label={<T id={'cash_flow.drawer.label_transaction_no'} />}
|
label={<T id={'cash_flow.drawer.label_transaction_no'} />}
|
||||||
>
|
>
|
||||||
{transaction_number}
|
{cashflowTransaction.transaction_number}
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
||||||
<DetailItem label={<T id={'date'} />}>
|
<DetailItem label={<T id={'date'} />}>
|
||||||
<FormatDate value={date} />
|
<FormatDate value={cashflowTransaction.date} />
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
||||||
<DetailItem name={'reference-no'} label={<T id={'reference_no'} />}>
|
<DetailItem name={'reference-no'} label={<T id={'reference_no'} />}>
|
||||||
{defaultTo(reference_no, '-')}
|
{defaultTo(cashflowTransaction.reference_no, '-')}
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
</DetailsMenu>
|
</DetailsMenu>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
{/* <div class="cashflow-drawer__content-description">
|
|
||||||
<b class="title">
|
|
||||||
<T id={'description'} />
|
|
||||||
</b>
|
|
||||||
: {defaultTo(description, '—')}
|
|
||||||
</div> */}
|
|
||||||
</CommercialDocHeader>
|
</CommercialDocHeader>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export const useInvoicePaymentTransactionsColumns = () => {
|
|||||||
accessor: 'payment_number',
|
accessor: 'payment_number',
|
||||||
width: 100,
|
width: 100,
|
||||||
className: 'payment_number',
|
className: 'payment_number',
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'payment_reference_no',
|
id: 'payment_reference_no',
|
||||||
|
|||||||
@@ -8,22 +8,24 @@ export const useGLEntriesTableColumns = () => {
|
|||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
Header: intl.get('date'),
|
Header: intl.get('date'),
|
||||||
accessor: 'date',
|
|
||||||
accessor: ({ formatted_date }) =>
|
accessor: ({ formatted_date }) =>
|
||||||
moment(formatted_date).format('YYYY MMM DD'),
|
moment(formatted_date).format('YYYY MMM DD'),
|
||||||
width: 140,
|
width: 140,
|
||||||
className: 'date',
|
className: 'date',
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('account_name'),
|
Header: intl.get('account_name'),
|
||||||
accessor: 'account_name',
|
accessor: 'account_name',
|
||||||
width: 140,
|
width: 140,
|
||||||
className: 'account_name',
|
className: 'account_name',
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('contact'),
|
Header: intl.get('contact'),
|
||||||
accessor: 'contactTypeFormatted',
|
accessor: 'contactTypeFormatted',
|
||||||
width: 140,
|
width: 140,
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('credit'),
|
Header: intl.get('credit'),
|
||||||
@@ -31,12 +33,14 @@ export const useGLEntriesTableColumns = () => {
|
|||||||
width: 100,
|
width: 100,
|
||||||
className: 'credit',
|
className: 'credit',
|
||||||
textAligment: 'right',
|
textAligment: 'right',
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('debit'),
|
Header: intl.get('debit'),
|
||||||
accessor: ({ debit }) => debit.formatted_amount,
|
accessor: ({ debit }) => debit.formatted_amount,
|
||||||
width: 100,
|
width: 100,
|
||||||
className: 'debit',
|
className: 'debit',
|
||||||
|
textOverview: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
|
|||||||
Reference in New Issue
Block a user