New: Add page count to author books page

Fixes #408
pull/422/head
ta264 4 years ago
parent 4adffff5ba
commit 7fe8702584

@ -72,6 +72,7 @@ class BookRow extends Component {
releaseDate, releaseDate,
title, title,
position, position,
pageCount,
ratings, ratings,
isSaving, isSaving,
authorMonitored, authorMonitored,
@ -161,6 +162,16 @@ class BookRow extends Component {
); );
} }
if (name === 'pageCount') {
return (
<TableRowCell
key={name}
>
{pageCount || ''}
</TableRowCell>
);
}
if (name === 'status') { if (name === 'status') {
return ( return (
<TableRowCell <TableRowCell
@ -205,6 +216,7 @@ BookRow.propTypes = {
releaseDate: PropTypes.string, releaseDate: PropTypes.string,
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
position: PropTypes.string, position: PropTypes.string,
pageCount: PropTypes.number,
ratings: PropTypes.object.isRequired, ratings: PropTypes.object.isRequired,
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
isSaving: PropTypes.bool, isSaving: PropTypes.bool,

@ -51,6 +51,12 @@ export const defaultState = {
isSortable: true, isSortable: true,
isVisible: true isVisible: true
}, },
{
name: 'series',
label: 'Series',
isSortable: true,
isVisible: false
},
{ {
name: 'releaseDate', name: 'releaseDate',
label: 'Release Date', label: 'Release Date',
@ -58,9 +64,10 @@ export const defaultState = {
isVisible: true isVisible: true
}, },
{ {
name: 'bookCount', name: 'pageCount',
label: 'Book Count', label: 'Pages',
isVisible: false isSortable: true,
isVisible: true
}, },
{ {
name: 'rating', name: 'rating',

Loading…
Cancel
Save