Skip to content

Commit

Permalink
Changing owner fields when in responsive mode
Browse files Browse the repository at this point in the history
Related to issue #4

Signed-off-by: João Paulo Ferreira <[email protected]>
  • Loading branch information
iamferreirajp committed Apr 22, 2017
1 parent 9d60c64 commit 2e7a9fb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Categories/Owners.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { List, Responsive, SimpleList, Edit, Create, Datagrid, TextField, Filter, EditButton, DeleteButton, ReferenceInput, SelectInput, SimpleForm, TextInput } from 'admin-on-rest/lib/mui';
import { List, Responsive, SimpleList, Edit, Create, Datagrid, TextField, Filter, EditButton,
DeleteButton, ReferenceInput, SelectInput, SimpleForm, TextInput } from 'admin-on-rest/lib/mui';

const OwnerFilter = props => (
<Filter {...props}>
Expand All @@ -15,15 +16,16 @@ export const OwnerList = props => (
<Responsive
small={
<SimpleList
primaryText={record => record.title}
secondaryText={record => `${record.views} views`}
tertiaryText={record => new Date(record.published_at).toLocaleDateString()}
primaryText={owner => `Nome: ${owner.ownerName}`}
secondaryText={owner => `Sobrenome: ${owner.lastName}`}
tertiaryText={owner => `Telefone: ${owner.phoneNumber}`}
/>
}
medium={
<Datagrid>
<TextField source="id" label="ID" />
<TextField source="ownerName" label="Nome Completo" />
<TextField source="ownerName" label="Nome" />
<TextField source="ownerLastName" label="Sobrenome" />
<TextField source="ownerPhoneNumber" label="Telefone" />
<EditButton />
<DeleteButton />
Expand Down

0 comments on commit 2e7a9fb

Please sign in to comment.