added search to pending and approved scenes

This commit is contained in:
Robin K Wilson 2021-08-02 12:36:30 -07:00
Родитель 04cdd6be65
Коммит 25e4837493
2 изменённых файлов: 19 добавлений и 4 удалений

Просмотреть файл

@ -12,11 +12,19 @@ import {
NumberInput,
Datagrid,
TextField,
ReferenceField
ReferenceField,
Filter
} from "react-admin";
const SceneFilter = props => (
<Filter {...props}>
<TextInput label="Search Name" source="name" alwaysOn />
<TextInput label="Search SID" source="scene_sid" alwaysOn />
</Filter>
);
export const FeaturedSceneListingList = props => (
<List {...props} sort={{ field: "order", order: "ASC" }}>
<List {...props} filters={<SceneFilter />} sort={{ field: "order", order: "ASC" }}>
<Datagrid>
<OwnedFileImage source="screenshot_owned_file_id" />
<OwnedFileSizeField label="Model size" source="model_owned_file_id" />

11
admin/src/react-components/pending-scenes.js поставляемый
Просмотреть файл

@ -3,10 +3,17 @@ import { SceneLink, OwnedFileImage, OwnedFileSizeField, ConditionalReferenceFiel
import { ApproveSceneButton } from "./approve-buttons";
import { DenySceneButton } from "./deny-buttons";
import { List, Datagrid, TextField, DateField } from "react-admin";
import { List, TextInput, Datagrid, TextField, DateField, Filter } from "react-admin";
const SceneFilter = props => (
<Filter {...props}>
<TextInput label="Search Name" source="name" alwaysOn />
<TextInput label="Search SID" source="scene_sid" alwaysOn />
</Filter>
);
export const PendingSceneList = props => (
<List {...props}>
<List {...props} filters={<SceneFilter />}>
<Datagrid>
<OwnedFileImage source="screenshot_owned_file_id" />
<OwnedFileSizeField label="Model size" source="model_owned_file_id" />