New: Runtime Column/Filter on Movie Index

Fixes #4131
pull/2/head
Qstick 5 years ago
parent 7584d95149
commit 3de65daf85

@ -32,6 +32,7 @@
.added,
.inCinemas,
.physicalRelease,
.runtime,
.genres {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';

@ -39,6 +39,7 @@
.added,
.inCinemas,
.physicalRelease,
.runtime,
.genres {
composes: cell;

@ -71,6 +71,7 @@ class MovieIndexRow extends Component {
added,
inCinemas,
physicalRelease,
runtime,
minimumAvailability,
path,
sizeOnDisk,
@ -212,6 +213,17 @@ class MovieIndexRow extends Component {
);
}
if (name === 'runtime') {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
{runtime} Minutes
</VirtualTableRowCell>
);
}
if (name === 'minimumAvailability') {
return (
<VirtualTableRowCell
@ -376,6 +388,7 @@ MovieIndexRow.propTypes = {
added: PropTypes.string,
inCinemas: PropTypes.string,
physicalRelease: PropTypes.string,
runtime: PropTypes.number,
minimumAvailability: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
sizeOnDisk: PropTypes.number.isRequired,

@ -114,6 +114,12 @@ export const defaultState = {
isSortable: true,
isVisible: false
},
{
name: 'runtime',
label: 'Runtime',
isSortable: true,
isVisible: false
},
{
name: 'minimumAvailability',
label: 'Min Availability',
@ -272,6 +278,11 @@ export const defaultState = {
type: filterBuilderTypes.DATE,
valueType: filterBuilderValueTypes.DATE
},
{
name: 'runtime',
label: 'Runtime',
type: filterBuilderTypes.NUMBER
},
{
name: 'path',
label: 'Path',

Loading…
Cancel
Save