Add playCount and playDate columns to album songs list
This commit is contained in:
parent
c73f64ee3a
commit
1494be9aaa
1 changed files with 6 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ import {
|
||||||
QualityInfo,
|
QualityInfo,
|
||||||
useSelectedFields,
|
useSelectedFields,
|
||||||
useResourceRefresh,
|
useResourceRefresh,
|
||||||
|
DateField,
|
||||||
} from '../common'
|
} from '../common'
|
||||||
import { AddToPlaylistDialog } from '../dialogs'
|
import { AddToPlaylistDialog } from '../dialogs'
|
||||||
import config from '../config'
|
import config from '../config'
|
||||||
|
|
@ -118,6 +119,10 @@ const AlbumSongs = (props) => {
|
||||||
sortByOrder={'DESC'}
|
sortByOrder={'DESC'}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
playCount: isDesktop && (
|
||||||
|
<NumberField source="playCount" sortByOrder={'DESC'} />
|
||||||
|
),
|
||||||
|
playDate: <DateField source="playDate" sortByOrder={'DESC'} showTime />,
|
||||||
quality: isDesktop && <QualityInfo source="quality" sortable={false} />,
|
quality: isDesktop && <QualityInfo source="quality" sortable={false} />,
|
||||||
channels: isDesktop && <NumberField source="channels" sortable={true} />,
|
channels: isDesktop && <NumberField source="channels" sortable={true} />,
|
||||||
bpm: isDesktop && <NumberField source="bpm" sortable={false} />,
|
bpm: isDesktop && <NumberField source="bpm" sortable={false} />,
|
||||||
|
|
@ -136,7 +141,7 @@ const AlbumSongs = (props) => {
|
||||||
resource: 'albumSong',
|
resource: 'albumSong',
|
||||||
columns: toggleableFields,
|
columns: toggleableFields,
|
||||||
omittedColumns: ['title'],
|
omittedColumns: ['title'],
|
||||||
defaultOff: ['channels', 'bpm', 'year'],
|
defaultOff: ['channels', 'bpm', 'year', 'playCount', 'playDate'],
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue