New: Last Searched column on Wanted screens (#5084)

* Added lastSearchTime to API & Wanted Screens.
This commit is contained in:
ManiMatter 2024-10-02 21:52:27 +02:00 committed by GitHub
parent f705603211
commit 3381ffc311
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 47 additions and 5 deletions

View file

@ -131,13 +131,15 @@ class CutoffUnmetConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.ALBUM_SEARCH,
albumIds: selected
albumIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllCutoffUnmetPress = () => {
this.props.executeCommand({
name: commandNames.CUTOFF_UNMET_ALBUM_SEARCH
name: commandNames.CUTOFF_UNMET_ALBUM_SEARCH,
commandFinished: this.repopulate
});
};

View file

@ -20,6 +20,7 @@ function CutoffUnmetRow(props) {
foreignAlbumId,
albumType,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -89,6 +90,15 @@ function CutoffUnmetRow(props) {
);
}
if (name === 'albums.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'status') {
return (
<TableRowCell
@ -132,6 +142,7 @@ CutoffUnmetRow.propTypes = {
foreignAlbumId: PropTypes.string.isRequired,
albumType: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
lastSearchTime: PropTypes.string,
disambiguation: PropTypes.string,
isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,

View file

@ -121,13 +121,15 @@ class MissingConnector extends Component {
onSearchSelectedPress = (selected) => {
this.props.executeCommand({
name: commandNames.ALBUM_SEARCH,
albumIds: selected
albumIds: selected,
commandFinished: this.repopulate
});
};
onSearchAllMissingPress = () => {
this.props.executeCommand({
name: commandNames.MISSING_ALBUM_SEARCH
name: commandNames.MISSING_ALBUM_SEARCH,
commandFinished: this.repopulate
});
};

View file

@ -17,6 +17,7 @@ function MissingRow(props) {
albumType,
foreignAlbumId,
title,
lastSearchTime,
disambiguation,
isSelected,
columns,
@ -86,6 +87,15 @@ function MissingRow(props) {
);
}
if (name === 'albums.lastSearchTime') {
return (
<RelativeDateCellConnector
key={name}
date={lastSearchTime}
/>
);
}
if (name === 'actions') {
return (
<AlbumSearchCellConnector
@ -113,6 +123,7 @@ MissingRow.propTypes = {
foreignAlbumId: PropTypes.string.isRequired,
albumType: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
lastSearchTime: PropTypes.string,
disambiguation: PropTypes.string,
isSelected: PropTypes.bool,
columns: PropTypes.arrayOf(PropTypes.object).isRequired,