Add owner_id to playlist

This commit is contained in:
Deluan
2021-10-29 22:55:28 -04:00
committed by Deluan Quintão
parent 84bbcdbfc2
commit 133fed344f
38 changed files with 173 additions and 100 deletions
+3 -6
View File
@@ -58,7 +58,7 @@ const TogglePublicInput = ({ resource, source }) => {
<Switch
checked={record[source]}
onClick={handleClick}
disabled={!isWritable(record.owner) || isSmartPlaylist(record)}
disabled={!isWritable(record.ownerId) || isSmartPlaylist(record)}
/>
)
}
@@ -70,7 +70,7 @@ const PlaylistList = (props) => {
const toggleableFields = useMemo(() => {
return {
owner: <TextField source="owner" />,
ownerName: <TextField source="ownerName" />,
songCount: isDesktop && <NumberField source="songCount" />,
duration: isDesktop && <DurationField source="duration" />,
updatedAt: isDesktop && (
@@ -94,10 +94,7 @@ const PlaylistList = (props) => {
filters={<PlaylistFilter />}
actions={<PlaylistListActions />}
>
<Datagrid
rowClick="show"
isRowSelectable={(r) => isWritable(r && r.owner)}
>
<Datagrid rowClick="show" isRowSelectable={(r) => isWritable(r?.ownerId)}>
<TextField source="name" />
{columns}
<Writable>