Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] FEATURE : 관리자는 신청자 목록에서 학생들 이메일 주소를 관람할 수 있다. #78 #85

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 65 additions & 88 deletions histudy-front/src/components/Manager/CreateGroupTable.js
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@ export default function CreateGroupTable({
};
const TableHead = {
all: [
"이름",
"학번",
"학생 정보",
"희망 1과목",
"희망 2과목",
"희망 3과목",
"함께하고 싶은 친구",
"삭제",
],
};

@@ -53,6 +53,7 @@ export default function CreateGroupTable({
sx={{
color: "text.secondary",
display: "flex",
justifyContent: "space-between",
py: "20px",

borderColor: "primary.main",
@@ -62,11 +63,13 @@ export default function CreateGroupTable({
{TableHead[type].map((headElement, index) => (
<Typography
key={index}
sx={{
flexGrow: 1,
width: longWidthColumnNum === index + 1 && "50%",
minWidth: longWidthColumnNum !== index + 1 && "150px",
}}
sx={
{
// flexGrow: 1,
// width: longWidthColumnNum === index + 1 && "50%",
// minWidth: longWidthColumnNum !== index + 1 && "150px",
}
}
>
{headElement}
</Typography>
@@ -77,64 +80,43 @@ export default function CreateGroupTable({
key={index}
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
px: "50px",
borderTop: index !== 0 && 1,
// py: "20px",
borderColor: "primary.border",
}}
>
<Box
{/* <Box
sx={{
display: "flex",
alignItems: "center",
flexGrow: 1,
}}
> */}
<Select
sx={{
minWidth: "100px",
color: "text.secondary",
display: "flex",
borderColor: "primary.border",
}}
defaultValue={10}
>
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
width: "50px",
textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
py: "20px",
borderColor: "primary.border",
marginLeft: "55px",
}}
>
{row.name}
</Box>
<MenuItem value={10}>{row.name}</MenuItem>
<MenuItem value={20}>{row.sid}</MenuItem>
<MenuItem value={30}>{row.email}</MenuItem>
</Select>

<Box
{/* <Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
// width: "50px",
marginLeft: "70px",
textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
py: "20px",
borderColor: "primary.border",
}}
>
{row.sid}
</Box>

<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
marginLeft: "20px",
py: "20px",
borderColor: "primary.border",
gap: "30px",
}}
>
{/* <Select
> */}
{/* <Select
sx={{ width: "170px", color: "text.secondary" }}
value={row.courses.length > 0 ? row.courses[0].name : ""}
>
@@ -144,55 +126,50 @@ export default function CreateGroupTable({
</MenuItem>
))}
</Select> */}
{row.courses.map((subject, index) => (
<Typography
sx={{
minWidth: "150px",
}}
>
{subject.name} ({subject.prof})
</Typography>
))}
{fillThree(row.courses.length).map((subject, index) => (
<Typography
sx={{
minWidth: "150px",
}}
>
{subject}
</Typography>
))}
{row.courses.map((subject, index) => (
<Box
sx={{
minWidth: "80px",
}}
>
{subject.name} ({subject.prof})
</Box>

))}
{fillThree(row.courses.length).map((subject, index) => (
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
py: "20px",
borderColor: "primary.border",
minWidth: "80px",
}}
>
<Select
sx={{ width: "170px", color: "text.secondary" }}
value={row.friends.length > 0 ? row.friends[0].name : ""}
>
{row.friends.map((friend, index) => (
<MenuItem key={index} value={friend.name}>
<Typography>
{friend.name}, {friend.sid}
</Typography>
</MenuItem>
))}
</Select>
{subject}
</Box>
</Box>
<IconButton
onClick={() => handleDeleteRow(row.sid)}
))}
{/* </Box> */}

<Box
sx={{
marginRight: "1rem",
color: "text.secondary",
display: "flex",
py: "20px",
ml: "10px",
borderColor: "primary.border",
}}
>
<Select
sx={{ width: "150px", color: "text.secondary" }}
value={row.friends.length > 0 ? row.friends[0].name : ""}
>
{row.friends.map((friend, index) => (
<MenuItem key={index} value={friend.name}>
<Typography>
{friend.name}, {friend.sid}
</Typography>
</MenuItem>
))}
</Select>
</Box>
{/* </Box> */}
<IconButton onClick={() => handleDeleteRow(row.sid)}>
<Cancel />
</IconButton>
</Box>
82 changes: 24 additions & 58 deletions histudy-front/src/components/Manager/GroupTables.js
Original file line number Diff line number Diff line change
@@ -44,11 +44,12 @@ export default function GroupTables({
const TableHead = {
group: [
"그룹",
"멤버",
"학생 정보",
"희망 1과목",
"희망 2과목",
"희망 3과목",
"함께하고 싶은 친구",
"수정",
],
};
const [edit, setEdit] = useState([false]);
@@ -79,9 +80,10 @@ export default function GroupTables({
<Box>
<Box
sx={{
minWidth: "1000px",
maxHeight: "60vh",
overflow: "scroll",
py: "5px",
py: "30px",
border: 1,
backgroundColor: "primary.default",
borderColor: "primary.main",
@@ -93,19 +95,14 @@ export default function GroupTables({
sx={{
color: "text.secondary",
display: "flex",
py: "20px",
justifyContent: "space-between",
py: "0px",
borderColor: "primary.border",
px: "30px",
px: "50px",
}}
>
{TableHead[type].map((headElement, index) => (
<Typography
key={index}
sx={{
flexGrow: 1,
minWidth: "150px",
}}
>
<Typography key={index} sx={{}}>
{headElement}
</Typography>
))}
@@ -138,82 +135,54 @@ export default function GroupTables({
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 4,
alignItems: "center",
justifyContent: "space-between",
gap: "10px",
px: "10px",
borderBottom: 1,
borderColor: "primary.border",
}}
>
<Box
key="Group"
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
width: "150px",
borderBottom: 1,
marginTop: "20px",
width: "50px",
py: "20px",
borderColor: "primary.border",
}}
>
<Typography>Group{row.tag}</Typography>
</Box>
<Box
<Select
sx={{
minWidth: "100px",
color: "text.secondary",
display: "flex",
flexGrow: 1,
borderBottom: 1,
py: "20px",
marginTop: "20px",
width: "150px",
borderColor: "primary.border",
}}
defaultValue={10}
>
{index > 0 && ", "}
<Typography>{student.name},</Typography>
<Typography>{student.sid}</Typography>
</Box>
<MenuItem value={10}>{student.name}</MenuItem>
<MenuItem value={20}>{student.sid}</MenuItem>
<MenuItem value={30}>{student.email}</MenuItem>
</Select>
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
py: "20px",
borderBottom: 1,
borderColor: "primary.border",
alignItems: "center",
gap: "20px",
}}
>
{/* <Select
sx={{ width: "170px", color: "text.secondary" }}
value={
student.courses.length > 0
? student.courses[0].name
: ""
}
>
{student.courses.map((subject, index) => (
<MenuItem key={index} value={subject.name}>
<Typography>{subject.name}</Typography>
</MenuItem>
))}
</Select> */}
{student.courses.map((subject, index) => (
<Typography
sx={{
minWidth: "150px",
}}
>
<Typography sx={{ width: "120px" }}>
{subject.name} ({subject.prof})
</Typography>
))}
{fillThree(student.courses.length).map(
(subject, index) => (
<Typography
sx={{
minWidth: "150px",
}}
>
<Typography sx={{ minWidth: "120px" }}>
{subject}
</Typography>
)
@@ -223,9 +192,7 @@ export default function GroupTables({
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
py: "20px",
borderBottom: 1,
borderColor: "primary.border",
}}
>
@@ -251,7 +218,6 @@ export default function GroupTables({
color: "text.secondary",
display: "flex",
// flexGrow: 1,
borderBottom: 1,
borderColor: "primary.border",
}}
>
Loading
Oops, something went wrong.