mirror of
https://github.com/Readarr/Readarr.git
synced 2026-03-05 13:20:32 -05:00
New: Last Searched column on Wanted screens
This commit is contained in:
@@ -45,6 +45,12 @@ export const defaultState = {
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'books.lastSearchTime',
|
||||
label: 'Last Searched',
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
columnLabel: 'Actions',
|
||||
@@ -108,6 +114,12 @@ export const defaultState = {
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'books.lastSearchTime',
|
||||
label: 'Last Searched',
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
columnLabel: 'Actions',
|
||||
|
||||
@@ -131,13 +131,15 @@ class CutoffUnmetConnector extends Component {
|
||||
onSearchSelectedPress = (selected) => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: selected
|
||||
bookIds: selected,
|
||||
commandFinished: this.repopulate
|
||||
});
|
||||
};
|
||||
|
||||
onSearchAllCutoffUnmetPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.CUTOFF_UNMET_BOOK_SEARCH
|
||||
name: commandNames.CUTOFF_UNMET_BOOK_SEARCH,
|
||||
commandFinished: this.repopulate
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ function CutoffUnmetRow(props) {
|
||||
releaseDate,
|
||||
titleSlug,
|
||||
title,
|
||||
lastSearchTime,
|
||||
disambiguation,
|
||||
isSelected,
|
||||
columns,
|
||||
@@ -68,6 +69,15 @@ function CutoffUnmetRow(props) {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'books.lastSearchTime') {
|
||||
return (
|
||||
<RelativeDateCellConnector
|
||||
key={name}
|
||||
date={lastSearchTime}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'releaseDate') {
|
||||
return (
|
||||
<RelativeDateCellConnector
|
||||
@@ -105,6 +115,7 @@ CutoffUnmetRow.propTypes = {
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
titleSlug: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
lastSearchTime: PropTypes.string,
|
||||
disambiguation: PropTypes.string,
|
||||
isSelected: PropTypes.bool,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
||||
@@ -121,13 +121,15 @@ class MissingConnector extends Component {
|
||||
onSearchSelectedPress = (selected) => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.BOOK_SEARCH,
|
||||
bookIds: selected
|
||||
bookIds: selected,
|
||||
commandFinished: this.repopulate
|
||||
});
|
||||
};
|
||||
|
||||
onSearchAllMissingPress = () => {
|
||||
this.props.executeCommand({
|
||||
name: commandNames.MISSING_BOOK_SEARCH
|
||||
name: commandNames.MISSING_BOOK_SEARCH,
|
||||
commandFinished: this.repopulate
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ function MissingRow(props) {
|
||||
releaseDate,
|
||||
titleSlug,
|
||||
title,
|
||||
lastSearchTime,
|
||||
disambiguation,
|
||||
isSelected,
|
||||
columns,
|
||||
@@ -77,6 +78,15 @@ function MissingRow(props) {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'books.lastSearchTime') {
|
||||
return (
|
||||
<RelativeDateCellConnector
|
||||
key={name}
|
||||
date={lastSearchTime}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'actions') {
|
||||
return (
|
||||
<BookSearchCellConnector
|
||||
@@ -104,6 +114,7 @@ MissingRow.propTypes = {
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
titleSlug: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
lastSearchTime: PropTypes.string,
|
||||
disambiguation: PropTypes.string,
|
||||
isSelected: PropTypes.bool,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
||||
Reference in New Issue
Block a user