Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "(improvements) Reports tables representation" #667

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/AffiliatesEarnings/AffiliatesEarnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AffiliatesEarnings extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -117,7 +117,7 @@ class AffiliatesEarnings extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}
return (
Expand Down
13 changes: 10 additions & 3 deletions src/components/ChangeLogs/ChangeLogs.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import JSONFormat from 'ui/JSONFormat'
import { getColumnWidth } from 'utils/columns'
Expand All @@ -19,7 +22,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsCreate)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand All @@ -33,7 +38,9 @@ export const getColumns = ({
const { log } = filteredData[rowIndex]
return (
<Cell tooltip={log}>
{log}
<TruncatedFormat>
{log}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ChangeLogs/ChangeLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ChangeLogs extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
numRows={entries.length}
tableColumns={tableColumns}
Expand All @@ -84,7 +84,7 @@ class ChangeLogs extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}
return (
Expand Down
9 changes: 7 additions & 2 deletions src/components/Derivatives/Derivatives.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import { formatAmount, fixedFloat } from 'ui/utils'
import { getColumnWidth } from 'utils/columns'
Expand Down Expand Up @@ -126,7 +129,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].timestamp)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import { getColumnWidth } from 'utils/columns'
import { getSideMsg, getSideColor } from 'state/utils'
Expand Down Expand Up @@ -147,7 +150,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsOpening)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand All @@ -161,7 +166,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsLastPayout)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down Expand Up @@ -189,7 +196,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsUpdate)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/FundingCreditHistory/FundingCreditHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ class FundingCreditHistory extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
tableColumns={tableColumns}
/>
<Pagination target={TYPE} loading={pageLoading} />
</div>
</>
)
}

Expand Down
17 changes: 13 additions & 4 deletions src/components/FundingLoanHistory/FundingLoanHistory.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import { getSideMsg, getSideColor } from 'state/utils'
import { formatAmount, formatColor, fixedFloat } from 'ui/utils'
Expand Down Expand Up @@ -145,7 +148,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsOpening)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand All @@ -159,7 +164,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsLastPayout)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand All @@ -173,7 +180,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsUpdate)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/FundingLoanHistory/FundingLoanHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class FundingLoanHistory extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -122,7 +122,7 @@ class FundingLoanHistory extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import { getColumnWidth } from 'utils/columns'
import { formatAmount, fixedFloat } from 'ui/utils'
Expand Down Expand Up @@ -151,7 +154,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsUpdate)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/FundingOfferHistory/FundingOfferHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class FundingOfferHistory extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -119,7 +119,7 @@ class FundingOfferHistory extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/FundingPayment/FundingPayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class FundingPayment extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -119,7 +119,7 @@ class FundingPayment extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}
return (
Expand Down
6 changes: 4 additions & 2 deletions src/components/Invoices/Invoices.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import { Cell, TruncatedFormat } from '@blueprintjs/table'

import JSONFormat from 'ui/JSONFormat'
import { getColumnWidth } from 'utils/columns'
Expand Down Expand Up @@ -213,7 +213,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mts)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Invoices/Invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Invoices extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -142,7 +142,7 @@ class Invoices extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}

Expand Down
6 changes: 4 additions & 2 deletions src/components/Ledgers/Ledgers.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import { Cell, TruncatedFormat } from '@blueprintjs/table'

import { insertIf, fixedFloat, formatAmount } from 'ui/utils'
import queryConstants from 'state/query/constants'
Expand Down Expand Up @@ -151,7 +151,9 @@ export default function getColumns(props) {
const timestamp = getFullTime(filteredData[rowIndex].mts)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Ledgers/Ledgers.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Ledgers extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -135,7 +135,7 @@ class Ledgers extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}

Expand Down
9 changes: 7 additions & 2 deletions src/components/Logins/Logins.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import JSONFormat from 'ui/JSONFormat'
import { getColumnWidth } from 'utils/columns'
Expand Down Expand Up @@ -33,7 +36,9 @@ export const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].time)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Logins/Logins.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Logins extends PureComponent {
showContent = <NoData />
} else {
showContent = (
<div className='data-table-wrapper'>
<>
<DataTable
section={TYPE}
numRows={entries.length}
Expand All @@ -98,7 +98,7 @@ class Logins extends PureComponent {
target={TYPE}
loading={pageLoading}
/>
</div>
</>
)
}
return (
Expand Down
9 changes: 7 additions & 2 deletions src/components/Movements/Movements.columns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'
import {
Cell,
TruncatedFormat,
} from '@blueprintjs/table'

import { formatAmount, fixedFloat, insertIf } from 'ui/utils'
import Explorer from 'ui/Explorer'
Expand Down Expand Up @@ -35,7 +38,9 @@ const getColumns = ({
const timestamp = getFullTime(filteredData[rowIndex].mtsUpdated)
return (
<Cell tooltip={timestamp}>
{timestamp}
<TruncatedFormat>
{timestamp}
</TruncatedFormat>
</Cell>
)
},
Expand Down
Loading