1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00

New: Release dates as columns for Missing/Cutoff Unmet

This commit is contained in:
Bogdan 2024-06-22 02:59:34 +03:00
parent 02be9cf825
commit f228841dc7
3 changed files with 110 additions and 0 deletions

View File

@ -40,6 +40,24 @@ export const defaultState = {
isSortable: true, isSortable: true,
isVisible: true isVisible: true
}, },
{
name: 'movieMetadata.inCinemas',
label: () => translate('InCinemas'),
isSortable: true,
isVisible: false
},
{
name: 'movieMetadata.digitalRelease',
label: () => translate('DigitalRelease'),
isSortable: true,
isVisible: false
},
{
name: 'movieMetadata.physicalRelease',
label: () => translate('PhysicalRelease'),
isSortable: true,
isVisible: false
},
{ {
name: 'status', name: 'status',
label: () => translate('Status'), label: () => translate('Status'),
@ -102,6 +120,24 @@ export const defaultState = {
isSortable: true, isSortable: true,
isVisible: true isVisible: true
}, },
{
name: 'movieMetadata.inCinemas',
label: () => translate('InCinemas'),
isSortable: true,
isVisible: false
},
{
name: 'movieMetadata.digitalRelease',
label: () => translate('DigitalRelease'),
isSortable: true,
isVisible: false
},
{
name: 'movieMetadata.physicalRelease',
label: () => translate('PhysicalRelease'),
isSortable: true,
isVisible: false
},
{ {
name: 'languages', name: 'languages',
label: () => translate('Languages'), label: () => translate('Languages'),

View File

@ -1,5 +1,6 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
import TableRow from 'Components/Table/TableRow'; import TableRow from 'Components/Table/TableRow';
@ -17,6 +18,9 @@ function CutoffUnmetRow(props) {
year, year,
title, title,
titleSlug, titleSlug,
inCinemas,
digitalRelease,
physicalRelease,
isSelected, isSelected,
columns, columns,
onSelectedChange onSelectedChange
@ -60,6 +64,36 @@ function CutoffUnmetRow(props) {
); );
} }
if (name === 'movieMetadata.inCinemas') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={inCinemas}
/>
);
}
if (name === 'movieMetadata.digitalRelease') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={digitalRelease}
/>
);
}
if (name === 'movieMetadata.physicalRelease') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={physicalRelease}
/>
);
}
if (name === 'languages') { if (name === 'languages') {
return ( return (
<TableRowCell <TableRowCell
@ -112,6 +146,9 @@ CutoffUnmetRow.propTypes = {
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
year: PropTypes.number.isRequired, year: PropTypes.number.isRequired,
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
inCinemas: PropTypes.string,
digitalRelease: PropTypes.string,
physicalRelease: PropTypes.string,
isSelected: PropTypes.bool, isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired,
onSelectedChange: PropTypes.func.isRequired onSelectedChange: PropTypes.func.isRequired

View File

@ -1,5 +1,6 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
import TableRow from 'Components/Table/TableRow'; import TableRow from 'Components/Table/TableRow';
@ -16,6 +17,9 @@ function MissingRow(props) {
year, year,
title, title,
titleSlug, titleSlug,
inCinemas,
digitalRelease,
physicalRelease,
isSelected, isSelected,
columns, columns,
onSelectedChange onSelectedChange
@ -63,6 +67,36 @@ function MissingRow(props) {
); );
} }
if (name === 'movieMetadata.inCinemas') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={inCinemas}
/>
);
}
if (name === 'movieMetadata.digitalRelease') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={digitalRelease}
/>
);
}
if (name === 'movieMetadata.physicalRelease') {
return (
<RelativeDateCellConnector
key={name}
className={styles[name]}
date={physicalRelease}
/>
);
}
if (name === 'status') { if (name === 'status') {
return ( return (
<TableRowCell <TableRowCell
@ -102,6 +136,9 @@ MissingRow.propTypes = {
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
year: PropTypes.number.isRequired, year: PropTypes.number.isRequired,
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
inCinemas: PropTypes.string,
digitalRelease: PropTypes.string,
physicalRelease: PropTypes.string,
isSelected: PropTypes.bool, isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired,
onSelectedChange: PropTypes.func.isRequired onSelectedChange: PropTypes.func.isRequired