Skip to content

Commit

Permalink
proposal git commit report UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
saigonbitmaster committed Oct 21, 2022
1 parent 2cbfb87 commit 3486abc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -9,6 +9,6 @@ test.ts
test.js
#cms/src/components
#cms/src/kpi
cms/src/commit
#cms/src/commit
api/src/proposal
#api/src/flatworks
8 changes: 8 additions & 0 deletions cms/src/commit/index.ts
@@ -0,0 +1,8 @@
import Icon from "@mui/icons-material/CurrencyExchange";
import ListScreen from "./list";
const index = {
list: ListScreen,
icon: Icon,
};

export default index;
38 changes: 38 additions & 0 deletions cms/src/commit/list.tsx
@@ -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;

0 comments on commit 3486abc

Please sign in to comment.