Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cbfb87
commit 3486abc
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Icon from "@mui/icons-material/CurrencyExchange"; | ||
import ListScreen from "./list"; | ||
const index = { | ||
list: ListScreen, | ||
icon: Icon, | ||
}; | ||
|
||
export default index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import * as React from "react"; | ||
import { | ||
List, | ||
Datagrid, | ||
TextField, | ||
DateField, | ||
ReferenceInput, | ||
SelectInput, | ||
UrlField, | ||
} from "react-admin"; | ||
|
||
const ListScreen = () => { | ||
const Filters = [ | ||
<ReferenceInput source="proposalId" reference="proposals" required alwaysOn> | ||
<SelectInput optionText="name" fullWidth /> | ||
</ReferenceInput>, | ||
]; | ||
|
||
return ( | ||
<List | ||
perPage={25} | ||
sort={{ field: "date", order: "desc" }} | ||
hasCreate={false} | ||
filters={Filters} | ||
> | ||
<Datagrid bulkActionButtons={false}> | ||
<TextField source="sha" /> | ||
<TextField source="rate" /> | ||
<TextField source="message" /> | ||
<TextField source="author" /> | ||
<DateField source="date" /> | ||
<UrlField source="url" /> | ||
</Datagrid> | ||
</List> | ||
); | ||
}; | ||
|
||
export default ListScreen; |