New: Sort by series year in series list

Closes #3245
This commit is contained in:
Mark McDowall 2019-08-15 23:28:54 -07:00
parent 07d553fae3
commit 8fd4a98fbe
4 changed files with 31 additions and 0 deletions

View File

@ -66,6 +66,12 @@
flex: 0 0 130px;
}
.year {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 80px;
}
.path {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';

View File

@ -105,6 +105,12 @@
flex: 0 0 130px;
}
.year {
composes: cell;
flex: 0 0 80px;
}
.path {
composes: cell;

View File

@ -94,6 +94,7 @@ class SeriesIndexRow extends Component {
added,
statistics,
latestSeason,
year,
path,
genres,
ratings,
@ -342,6 +343,17 @@ class SeriesIndexRow extends Component {
);
}
if (name === 'year') {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
{year}
</VirtualTableRowCell>
);
}
if (name === 'path') {
return (
<VirtualTableRowCell
@ -503,6 +515,7 @@ SeriesIndexRow.propTypes = {
added: PropTypes.string,
statistics: PropTypes.object.isRequired,
latestSeason: PropTypes.object,
year: PropTypes.number,
path: PropTypes.string.isRequired,
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
ratings: PropTypes.object.isRequired,

View File

@ -132,6 +132,12 @@ export const defaultState = {
isSortable: true,
isVisible: false
},
{
name: 'year',
label: 'Year',
isSortable: true,
isVisible: false
},
{
name: 'path',
label: 'Path',