This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Waiting for marmelab/admin-on-rest#2
- Loading branch information
Showing
19 changed files
with
262 additions
and
193 deletions.
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
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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,10 @@ | ||
import React from 'react'; | ||
import { Create, DateInput, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
export default (props) => ( | ||
<Create title="Create an Order" {...props}> | ||
<DateInput label="date" source="date" /> | ||
<TextInput label="total" source="total" options={{ type: 'number' }} /> | ||
<TextInput label="status" source="status" /> | ||
</Create> | ||
); |
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,16 @@ | ||
import React, { PropTypes } from 'react'; | ||
import { Edit, DateInput, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
const Title = ({ record }) => <span>Order {record ? `"${record.reference}"` : ''}</span>; | ||
|
||
Title.propTypes = { | ||
record: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default (props) => ( | ||
<Edit title={Title} {...props}> | ||
<DateInput label="date" source="date" /> | ||
<TextInput label="total" source="total" options={{ type: 'number' }} /> | ||
<TextInput label="status" source="status" /> | ||
</Edit> | ||
); |
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,18 @@ | ||
import React from 'react'; | ||
import { Filter, List, DateField, TextField, EditButton, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
export const OrderFilter = (props) => ( | ||
<Filter {...props}> | ||
<TextInput label="Search" source="reference" alwaysOn /> | ||
</Filter> | ||
); | ||
|
||
export default (props) => ( | ||
<List {...props} filter={OrderFilter}> | ||
<DateField label="date" source="date" /> | ||
<TextField label="reference" source="reference" /> | ||
<TextField label="total" source="total" /> | ||
<TextField label="status" source="status" /> | ||
<EditButton basePath="/orders" /> | ||
</List> | ||
); |
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
import OrderIcon from 'material-ui/svg-icons/action/description'; | ||
import OrderList from './List'; | ||
import OrderEdit from './Edit'; | ||
import OrderCreate from './Create'; | ||
|
||
export default { | ||
OrderList, | ||
OrderEdit, | ||
OrderCreate, | ||
OrderIcon, | ||
}; |
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,12 @@ | ||
import React from 'react'; | ||
import { Create, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
export default (props) => ( | ||
<Create title="Create a Post" {...props}> | ||
<TextInput label="Reference" source="reference" /> | ||
<TextInput label="price" source="price" options={{ type: 'number' }} /> | ||
<TextInput label="width" source="width" options={{ type: 'number' }} /> | ||
<TextInput label="height" source="height" options={{ type: 'number' }} /> | ||
<TextInput label="stock" source="stock" options={{ type: 'number' }} /> | ||
</Create> | ||
); |
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,18 @@ | ||
import React, { PropTypes } from 'react'; | ||
import { Edit, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
const Title = ({ record }) => <span>{record ? record.reference : ''}</span>; | ||
|
||
Title.propTypes = { | ||
record: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default (props) => ( | ||
<Edit title={Title} {...props}> | ||
<TextInput label="Reference" source="reference" /> | ||
<TextInput label="price" source="price" options={{ type: 'number' }} /> | ||
<TextInput label="width" source="width" options={{ type: 'number' }} /> | ||
<TextInput label="height" source="height" options={{ type: 'number' }} /> | ||
<TextInput label="stock" source="stock" options={{ type: 'number' }} /> | ||
</Edit> | ||
); |
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,19 @@ | ||
import React from 'react'; | ||
import { Filter, List, TextField, EditButton, TextInput } from 'admin-on-rest/lib/mui'; | ||
|
||
export const ProductFilter = (props) => ( | ||
<Filter {...props}> | ||
<TextInput label="Search" source="reference" alwaysOn /> | ||
</Filter> | ||
); | ||
|
||
export default (props) => ( | ||
<List {...props} filter={ProductFilter}> | ||
<TextField label="reference" source="reference" /> | ||
<TextField label="price" source="price" /> | ||
<TextField label="width" source="width" /> | ||
<TextField label="height" source="height" /> | ||
<TextField label="stock" source="stock" /> | ||
<EditButton basePath="/products" /> | ||
</List> | ||
); |
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
import ProductIcon from 'material-ui/svg-icons/action/redeem'; | ||
import ProductList from './List'; | ||
import ProductEdit from './Edit'; | ||
import ProductCreate from './Create'; | ||
|
||
export default { | ||
ProductList, | ||
ProductEdit, | ||
ProductCreate, | ||
ProductIcon, | ||
}; |
Oops, something went wrong.