Skip to content

Commit

Permalink
Fixing all style program on CI
Browse files Browse the repository at this point in the history
Related to issue #4
Related to issue #2

Signed-off-by: João Paulo Ferreira <[email protected]>
  • Loading branch information
iamferreirajp committed Apr 22, 2017
1 parent 0f323fa commit 6497167
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 102 deletions.
16 changes: 8 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { jsonServerRestClient, Admin, Resource } from 'admin-on-rest';
import { Delete } from 'admin-on-rest/lib/mui';
import { PostList, PostEdit, PostCreate } from './Categories/Example';
import { UserList, UserEdit, UserCreate } from './Categories/Users';
import { OwnerList, OwnerCreate, OwnerEdit} from './Categories/Owners';
import { OwnerList, OwnerCreate, OwnerEdit } from './Categories/Owners';
import { PatientList } from './Categories/Patients';
import { AttendenceList } from './Categories/Attendences';
import { HospitalizationList } from './Categories/Hospitalizations';
Expand All @@ -24,7 +24,7 @@ import { BathAndGroomingList } from './Categories/BathAndGrooming';
import { FinancialReportList } from './Categories/FinancialReports';
import Dashboard from './Dashboard';
import authClient from './authClient';
import CustomTheme from './CustomTheme';
import CustomTheme from './CustomTheme';

const App = () => (
<Admin
Expand All @@ -39,14 +39,14 @@ const App = () => (
create={PostCreate} remove={Delete} icon={PostIcon}
/>
<Resource name="user" options={{ label: 'Usuários' }} list={UserList} edit={UserEdit} create={UserCreate} remove={Delete} icon={UserIcon} />
<Resource
name="owners"
<Resource
name="owners"
options={{ label: 'Proprietários' }}
list={OwnerList}
edit={OwnerEdit}
create={OwnerCreate}
list={OwnerList}
edit={OwnerEdit}
create={OwnerCreate}
remove={Delete}
icon={OwnerIcon}
icon={OwnerIcon}
/>
<Resource name="patient" options={{ label: 'Pacientes' }} list={PatientList} icon={PatientIcon} />
<Resource name="attendence" options={{ label: 'Consultas' }} list={AttendenceList} icon={AttendenceIcon} />
Expand Down
187 changes: 94 additions & 93 deletions src/Categories/Owners.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React from 'react';
import { List, Responsive, SimpleList, Edit, Create, Datagrid, TextField, Filter, EditButton,
DeleteButton, ReferenceInput, SelectInput, SimpleForm, TextInput, TabbedForm, FormTab } 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}>
<TextInput
label="Pesquisar"
source="q"
alwaysOn
<TextInput
label="Pesquisar"
source="q"
alwaysOn
/>
<ReferenceInput label="Proprietário" source="id" reference="owner" allowEmpty>
<SelectInput
source="id"
optionText="ownerName"
<SelectInput
source="id"
optionText="ownerName"
/>
</ReferenceInput>
</Filter>
);

const TextInputValidation = (value, values) => {
if (!value) {
return ['Campo obrigatório'];
}
return [];
const TextInputValidation = (value) => {
if (!value) {
return ['Campo obrigatório'];
}
return [];
};

export const OwnerList = props => (
Expand All @@ -37,21 +37,21 @@ export const OwnerList = props => (
}
medium={
<Datagrid>
<TextField
source="id"
label="ID"
<TextField
source="id"
label="ID"
/>
<TextField
source="ownerName"
label="Nome"
<TextField
source="ownerName"
label="Nome"
/>
<TextField
source="ownerLastName"
label="Sobrenome"
<TextField
source="ownerLastName"
label="Sobrenome"
/>
<TextField
source="phoneNumber"
label="Telefone"
<TextField
source="phoneNumber"
label="Telefone"
/>
<EditButton />
<DeleteButton />
Expand All @@ -63,45 +63,45 @@ export const OwnerList = props => (
export const OwnerCreate = props => (
<Create {...props}>
<SimpleForm>
<TextInput
source="cpf"
label="CPF"
validation={TextInputValidation}
/>
<TextInput
source="ownerName"
label="Primeiro Nome"
validation={TextInputValidation}
/>
<TextInput
source="ownerLastName"
label="Sobrenome"
validation={TextInputValidation}
/>
<TextInput
source="phoneNumber"
label="Telefone"
validation={TextInputValidation}
/>
<TextInput
source="zipCode"
label="Código Postal"
validation={TextInputValidation}
/>
<TextInput
source="district"
label="Estado"
validation={TextInputValidation}
/>
<TextInput
source="publicPlace"
label="Endereço"
validation={TextInputValidation}
/>
<TextInput
source="addressNumber"
label="Número"
validation={TextInputValidation}
<TextInput
source="cpf"
label="CPF"
validation={TextInputValidation}
/>
<TextInput
source="ownerName"
label="Primeiro Nome"
validation={TextInputValidation}
/>
<TextInput
source="ownerLastName"
label="Sobrenome"
validation={TextInputValidation}
/>
<TextInput
source="phoneNumber"
label="Telefone"
validation={TextInputValidation}
/>
<TextInput
source="zipCode"
label="Código Postal"
validation={TextInputValidation}
/>
<TextInput
source="district"
label="Estado"
validation={TextInputValidation}
/>
<TextInput
source="publicPlace"
label="Endereço"
validation={TextInputValidation}
/>
<TextInput
source="addressNumber"
label="Número"
validation={TextInputValidation}
/>
</SimpleForm>
</Create>
Expand All @@ -114,42 +114,43 @@ const OwnerName = ({ owner }) => {
export const OwnerEdit = props => (
<Edit title={<OwnerName />} {...props}>
<SimpleForm>
<TextInput
source="ownerID"
label="ID"
<TextInput
source="ownerID"
label="ID"
/>
<TextInput
source="cpf"
label="CPF"
<TextInput
source="cpf"
label="CPF"
/>
<TextInput
source="ownerName"
label="Primeiro Nome"
<TextInput
source="ownerName"
label="Primeiro Nome"
/>
<TextInput
source="ownerLastName"
label="Sobrenome"
<TextInput
source="ownerLastName"
label="Sobrenome"
/>
<TextInput
source="phoneNumber"
label="Telefone"
<TextInput
source="phoneNumber"
label="Telefone"
/>
<TextInput
source="zipCode"
label="Código Postal"
<TextInput
source="zipCode"
label="Código Postal"
/>
<TextInput
source="district"
label="Estado"
<TextInput
source="district"
label="Estado"
/>
<TextInput
source="publicPlace"
label="Endereço"
<TextInput
source="publicPlace"
label="Endereço"
/>
<TextInput
source="addressNumber"
label="Número"
<TextInput
source="addressNumber"
label="Número"
/>
</SimpleForm>
</Edit>
);
);

2 changes: 1 addition & 1 deletion src/Rest/RestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ const httpClient = (url, options = {}) => {
const restClient = simpleRestClient('http://localhost:3000', httpClient);
export default restClient;
*/
*/

0 comments on commit 6497167

Please sign in to comment.