Skip to content

Commit

Permalink
Fix: managerStudent 페이지 이메일 추가 + 엑셀 다운로드 시 이메일 추가(#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinhyuk committed Oct 23, 2023
1 parent 86b6a3b commit 8c81bb7
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 197 deletions.
170 changes: 65 additions & 105 deletions histudy-front/src/components/Manager/CreateGroupTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ export default function CreateGroupTable({
};
const TableHead = {
all: [
"이름",
"이메일",
"학번",
"학생 정보",
"희망 1과목",
"희망 2과목",
"희망 3과목",
"함께하고 싶은 친구",
"삭제",
],
};

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

borderColor: "primary.main",
Expand All @@ -63,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>
Expand All @@ -78,79 +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>
<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.email}
</Box>
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
// width: "50px",
marginLeft: "20px",
textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
py: "20px",
borderColor: "primary.border",
}}
>
{row.sid}
</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,
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 : ""}
>
Expand All @@ -160,56 +126,50 @@ export default function CreateGroupTable({
</MenuItem>
))}
</Select> */}
{row.courses.map((subject, index) => (
<Typography
sx={{
minWidth: "80px",
}}
>
{subject.name} ({subject.prof})
</Typography>
))}
{fillThree(row.courses.length).map((subject, index) => (
<Typography
sx={{
minWidth: "80px",
}}
>
{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",
ml: "10px",
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>
Expand Down
Loading

0 comments on commit 8c81bb7

Please sign in to comment.