Add "Last Played" column to SongList

This commit is contained in:
Deluan
2021-06-16 11:57:02 -04:00
parent 86271f0412
commit e0fd1c6ad8
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@
"duration": "Time",
"trackNumber": "#",
"playCount": "Plays",
"playDate": "Last Played",
"title": "Title",
"artist": "Artist",
"album": "Album",
+3 -1
View File
@@ -1,5 +1,6 @@
import React from 'react'
import {
DateField,
Filter,
FunctionField,
NumberField,
@@ -94,6 +95,7 @@ const SongList = (props) => {
playCount: isDesktop && (
<NumberField source="playCount" sortByOrder={'DESC'} />
),
playDate: <DateField source="playDate" sortByOrder={'DESC'} showTime />,
year: isDesktop && (
<FunctionField
source="year"
@@ -118,7 +120,7 @@ const SongList = (props) => {
const columns = useSelectedFields({
resource: 'song',
columns: toggleableFields,
defaultOff: ['bpm'],
defaultOff: ['bpm', 'playDate'],
})
return (