Skip to content

Commit

Permalink
Users, Access users tables integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
jivebreaddev committed Oct 5, 2021
1 parent b4e8b4a commit c23637f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 24 deletions.
12 changes: 6 additions & 6 deletions WEB/web-admin/src/AccessUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export const AccessUserList = props => (
<List filters={postFilters} {...props} >
<Datagrid>
<TextField label="순번" source="id" />
<ImageField label="사진" />
<TextField label="출입시간"/>
<TextField label="장소"/>
<TextField label="계급" />
<ImageField label="사진"source="photourl" />
<TextField label="출입시간"source="place"/>
<TextField label="장소"source="time"/>
<TextField label="계급" source="rank"/>
<TextField label="이름" source="name" />
<TextField label="군번" />
<TextField label="소속" />
<TextField label="군번" source="altid"/>
<TextField label="소속" source="company"/>
</Datagrid>
</List>
</div>
Expand Down
4 changes: 2 additions & 2 deletions WEB/web-admin/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const App = () => (

<Resource
name="users"
list={UserList}
list={UserList} create={UserCreate} edit={UserEdit} show={UserShow} icon={UserIcon}
options={{ label: "사용자" }}
/>
<Resource
name="access"
name="accessusers"
list={AccessUserList}
icon={AccessUserIcon}
options={{ label: "출입한 사용자" }}
Expand Down
40 changes: 24 additions & 16 deletions WEB/web-admin/src/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,22 @@ import {
SelectInput,
TextInput,
Show,
SimpleShowLayout,
SimpleShowLayout
} from "react-admin";

const userFilters = [
<TextInput label="Search" source="q" alwaysOn />
];

export const UserList = (props) => (
<List {...props}>
<Datagrid>
<List filters={userFilters} {...props}>
<Datagrid rowClick="show">
<TextField label="순번" source="id" />
<ImageField label="사진" source="photourl" />
<TextField label="계급" source="rank" />
<TextField label="이름" source="name" />
<TextField label="군번" source="altid" />
<TextField label="소속" source="company" />
<EditButton />
</Datagrid>
</List>
);
Expand All @@ -27,11 +35,11 @@ export const UserEdit = (props) => (
<Edit {...props}>
<SimpleForm>
<TextInput label="순번" source="id" />
<ImageField label="사진" source="address.suite" />
<TextInput label="계급" source="address.street" />
<ImageField label="사진" source="photourl" />
<TextInput label="계급" source="rank" />
<TextInput label="이름" source="name" />
<TextInput label="군번" source="phone" />
<TextInput label="소속" source="company.name" />
<TextInput label="군번" source="altid" />
<TextInput label="소속" source="company" />
</SimpleForm>
</Edit>
);
Expand All @@ -40,11 +48,11 @@ export const UserCreate = (props) => (
<Create {...props}>
<SimpleForm>
<TextInput label="순번" source="id" />
<ImageField label="사진" source="address.suite" />
<TextInput label="계급" source="address.street" />
<ImageField label="사진" source="photourl" />
<TextInput label="계급" source="rank" />
<TextInput label="이름" source="name" />
<TextInput label="군번" source="phone" />
<TextInput label="소속" source="company.name" />
<TextInput label="군번" source="altid" />
<TextInput label="소속" source="company" />
</SimpleForm>
</Create>
);
Expand All @@ -53,11 +61,11 @@ export const UserShow = (props) => (
<Show {...props}>
<SimpleShowLayout>
<TextField label="순번" source="id" />
<ImageField label="사진" source="address.suite" />
<TextField label="계급" source="address.street" />
<ImageField label="사진" source="photourl" />
<TextField label="계급" source="rank" />
<TextField label="이름" source="name" />
<TextField label="군번" source="phone" />
<TextField label="소속" source="company.name" />
<TextField label="군번" source="altid" />
<TextField label="소속" source="company" />
</SimpleShowLayout>
</Show>
);

0 comments on commit c23637f

Please sign in to comment.