Skip to content

Commit 471155e

Browse files
authored
[EC-84] feat: 과정 관리자 학습자 관리 UI 구현 (#78)
1 parent 2565dd9 commit 471155e

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

client/src/components/listItem/baseListItem/BaseListItem.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ import React from 'react'
22
import styles from "./BaseListItem.module.css"
33
import Tag from '../../tag/Tag';
44

5-
export default function BaseListItem({ content, tagTitle }) {
5+
export default function BaseListItem({ content, phone, email, tagTitle }) {
66
return (
7+
<>
78
<div className={styles.baseListItem}>
9+
<div>
810
<div>{content}</div>
9-
11+
<p>{phone}</p>
12+
<p>{email}</p>
13+
</div>
1014
<Tag title={tagTitle}></Tag>
1115
</div>
16+
</>
1217
);
1318
}

client/src/components/listItem/baseListItem/BaseListItem.module.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88
border-radius: var(--border-radius-20);
99
box-sizing: border-box;
1010
}
11+
12+
.baseListItem p {
13+
font-size: var(--font-size-12);
14+
color: var(--text-200);
15+
text-align: left;
16+
}
17+

client/src/components/tag/Tag.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ export default function Tag({ title }) {
88
const isClickable = getIsClickable(title);
99

1010
// TODO : 관리자 페이지의 학습자 관리 tag에만 사용
11-
// const [isOpen, setIsOpen] = useState(false);
11+
const [isOpen, setIsOpen] = useState(false);
1212

13-
// const handleOpenDropBox = () => {
14-
// setIsOpen(true);
15-
// };
13+
const handleOpenDropBox = () => {
14+
setIsOpen(true);
15+
};
1616

17-
// const handleCloseDropBox = () => {
18-
// setIsOpen(false);
19-
// };
17+
const handleCloseDropBox = () => {
18+
setIsOpen(false);
19+
};
2020

21-
// const dropBoxButtonList = tagList.map((item, index) => {
22-
// return <DropBoxButton key={index} title={item}></DropBoxButton>;
23-
// });
21+
const dropBoxButtonList = tagList.map((item, index) => {
22+
return <DropBoxButton key={index} title={item}></DropBoxButton>;
23+
});
2424

2525
return (
2626
<div className={styles.tagBox}>
@@ -34,14 +34,14 @@ export default function Tag({ title }) {
3434
</button>
3535

3636
{/* TODO : 관리자 페이지의 학습자 관리 tag에만 사용 */}
37-
{/* <div
37+
<div
3838
style={
3939
isClickable ? (isOpen ? { display: 'block' } : { display: 'none' }) : { display: 'none' }
4040
}
4141
className={styles.dropBox}
4242
>
4343
{dropBoxButtonList}
44-
</div> */}
44+
</div>
4545
</div>
4646
);
4747
}
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
import React from 'react'
22
import styles from "./StaffStudentManage.module.css"
3+
import MainButton from "../../components/buttons/mainButton/MainButton"
4+
import BaseListItem from '../../components/listItem/baseListItem/BaseListItem'
35

46
export default function StaffStudentManage() {
57
return (
6-
<div>StaffStudentManage</div>
8+
<>
9+
<div>
10+
<MainButton title="학습자 등록"></MainButton>
11+
</div>
12+
<div>
13+
<BaseListItem content="홍길동" phone="010-1234-1234" email="educheck@educheck.com" tagTitle="수강중"></BaseListItem>
14+
<BaseListItem content="홍길동" phone="010-1234-1234" email="educheck@educheck.com" tagTitle="결석"></BaseListItem>
15+
<BaseListItem content="홍길동" phone="010-1234-1234" email="educheck@educheck.com" tagTitle="수강중"></BaseListItem>
16+
<BaseListItem content="홍길동" phone="010-1234-1234" email="educheck@educheck.com" tagTitle="수료"></BaseListItem>
17+
<BaseListItem content="홍길동" phone="010-1234-1234" email="educheck@educheck.com" tagTitle="수강중"></BaseListItem>
18+
</div>
19+
</>
720
)
821
}

0 commit comments

Comments
 (0)