Skip to content

Commit

Permalink
Add link to db.json with bathGrooming.js
Browse files Browse the repository at this point in the history
Related to issue #14

Signed-off-by: varleysilva <[email protected]>
Signed-off-by: gustavo2795 <[email protected]>
  • Loading branch information
varleysilva committed Apr 9, 2017
1 parent 2949273 commit d07bd00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 47 deletions.
20 changes: 4 additions & 16 deletions src/Categories/BathAndGrooming.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { List, Responsive, SimpleList, Edit, Create, Datagrid, ReferenceField, TextField, EditButton, DeleteButton, DisabledInput, LongTextInput, ReferenceInput, SelectInput, SimpleForm, TextInput } from 'admin-on-rest/lib/mui';
import { List, Responsive, SimpleList, Edit, Create, Datagrid, TextField, EditButton, DeleteButton, DisabledInput, LongTextInput, SimpleForm } from 'admin-on-rest/lib/mui';


export const BathAndGroomingList = props => (
Expand All @@ -15,11 +15,7 @@ export const BathAndGroomingList = props => (
medium={
<Datagrid>
<TextField source="id" label="ID" />
<ReferenceField label="Usuário" source="id" reference="user">
<TextField source="userFullName" />
</ReferenceField>
<TextField source="title" label="Título" />
<TextField source="body" label="Corpo" />
<TextField source="service" label="Serviço" />
<EditButton />
<DeleteButton />
</Datagrid>
Expand All @@ -37,23 +33,15 @@ export const BathAndGroomingEdit = props => (
<Edit title={<BathAndGroomingTitle />} {...props}>
<SimpleForm>
<DisabledInput source="id" />
<ReferenceInput label="Usuário" source="user" reference="user">
<SelectInput optionText="userFullName" />
</ReferenceInput>
<TextInput source="title" />
<LongTextInput source="body" />
<LongTextInput source="service" />
</SimpleForm>
</Edit>
);

export const BathAndGroomingCreate = props => (
<Create {...props}>
<SimpleForm>
<ReferenceInput label="Usuário" source="id" reference="user" allowEmpty>
<SelectInput optionText="userFullName" />
</ReferenceInput>
<TextInput source="title" label="Título" />
<LongTextInput source="body" label="Corpo" />
<LongTextInput source="service" label="Serviço" />
</SimpleForm>
</Create>
);
35 changes: 4 additions & 31 deletions src/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,39 +78,12 @@
],
"bathAndGrooming": [
{
"id": 2,
"title": "qui est esse",
"body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
},
{
"id": 3,
"title": "ea molestias quasi exercitationem repellat qui ipsa sit aut",
"body": "et iusto sed quo iure\nvoluptatem occaecati omnis eligendi aut ad\nvoluptatem doloribus vel accusantium quis pariatur\nmolestiae porro eius odio et labore et velit aut"
},
{
"id": 4,
"title": "eum et est occaecati",
"body": "ullam et saepe reiciendis voluptatem adipisci\nsit amet autem assumenda provident rerum culpa\nquis hic commodi nesciunt rem tenetur doloremque ipsam iure\nquis sunt voluptatem rerum illo velit"
},
{
"id": 5,
"title": "Jogando jogos",
"body": "Antes era KOF agora é SFV"
},
{
"id": 6,
"title": "dolorem eum magni eos aperiam quia",
"body": "ut aspernatur corporis harum nihil quis provident sequi\nmollitia nobis aliquid molestiae\nperspiciatis et ea nemo ab reprehenderit accusantium quas\nvoluptate dolores velit et doloremque molestiae"
"id": 1,
"service": "O dog do Mr. M foi com tal e talz"
},
{
"id": 7,
"title": "magnam facilis autem",
"body": "dolore placeat quibusdam ea quo vitae\nmagni quis enim qui quis quo nemo aut saepe\nquidem repellat excepturi ut quia\nsunt ut sequi eos ea sed quas"
},
{
"id": "1",
"title": "Teste",
"body": "teste"
"service": "BANHO E BANHO",
"id": 2
}
]
}

0 comments on commit d07bd00

Please sign in to comment.