Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nuyh99 committed Apr 23, 2022
2 parents 394c238 + 019450a commit ebbd657
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 118 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified frontend/.DS_Store
Binary file not shown.
236 changes: 118 additions & 118 deletions frontend/project/src/routers/PermissionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,124 +178,124 @@ function WorkerState(props) {
textAlign: 'center',
verticalAlign: 'middle',
}}>
{props.workerArray.map((a, i) => {
return (
<tr>
<td>{i + 1}</td>
<td>{a.name}</td>
<td>{a.id}</td>
<td>{a.permission}</td>
<td>
<DropdownButton
id="dropdown-basic-button"
title="권한 변경">
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'NOTHING'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
권한 없음
</Dropdown.Item>
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'WORKER'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
직원
</Dropdown.Item>
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'MASTER'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
관리자
</Dropdown.Item>
</DropdownButton>
</td>
</tr>
);
})}
{props.workerArray.map((a, i) => {
return (
<tr>
<td>{i + 1}</td>
<td>{a.name}</td>
<td>{a.id}</td>
<td>{a.permission}</td>
<td>
<DropdownButton
id="dropdown-basic-button"
title="권한 변경">
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'NOTHING'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
권한 없음
</Dropdown.Item>
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'WORKER'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
직원
</Dropdown.Item>
<Dropdown.Item
onClick={(
event
) => {
event.preventDefault();
axios
.post(
'/api/permission',
{
name: a.name,
id: a.id,
permission:
(a.permission =
'MASTER'),
}
)
.then(
() => {
alert(
'직원의 권한이 수정되었습니다.\n' +
'갱신하려면 "직원 관리" 버튼을 다시 누르세요.'
);
}
)
.catch(
() => {
alert(
'오류입니다.'
);
}
);
}}>
관리자
</Dropdown.Item>
</DropdownButton>
</td>
</tr>
);
})}
</tbody>
</Table>
</div>
Expand Down
Binary file modified src/.DS_Store
Binary file not shown.
Binary file modified src/main/.DS_Store
Binary file not shown.
Binary file modified src/main/resources/.DS_Store
Binary file not shown.

0 comments on commit ebbd657

Please sign in to comment.