Skip to content

Commit

Permalink
Fix: 그룹 매칭 관리 그룹 미배정 학생 이메일 정보 추가(#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinhyuk committed Oct 23, 2023
1 parent e5cc206 commit b44f15f
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 113 deletions.
23 changes: 20 additions & 3 deletions histudy-front/src/components/Manager/CreateGroupTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function CreateGroupTable({
const TableHead = {
all: [
"이름",
"이메일",
"학번",
"희망 1과목",
"희망 2과목",
Expand Down Expand Up @@ -105,7 +106,6 @@ export default function CreateGroupTable({
>
{row.name}
</Box>

<Box
sx={{
color: "text.secondary",
Expand All @@ -119,6 +119,22 @@ export default function CreateGroupTable({
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>
Expand Down Expand Up @@ -147,7 +163,7 @@ export default function CreateGroupTable({
{row.courses.map((subject, index) => (
<Typography
sx={{
minWidth: "150px",
minWidth: "80px",
}}
>
{subject.name} ({subject.prof})
Expand All @@ -156,7 +172,7 @@ export default function CreateGroupTable({
{fillThree(row.courses.length).map((subject, index) => (
<Typography
sx={{
minWidth: "150px",
minWidth: "80px",
}}
>
{subject}
Expand All @@ -170,6 +186,7 @@ export default function CreateGroupTable({
display: "flex",
flexGrow: 1,
py: "20px",
ml: "10px",
borderColor: "primary.border",
}}
>
Expand Down
199 changes: 89 additions & 110 deletions histudy-front/src/components/Manager/UnGroupTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ export default function UnGroupTable({
const TableHead = {
group: [
"그룹",
"이름",
"학생 정보",
"희망 1과목",
"희망 2과목",
"희망 3과목",
"함께하고 싶은 친구",
"수정",
],
};

Expand Down Expand Up @@ -78,6 +79,7 @@ export default function UnGroupTable({
sx={{
color: "text.secondary",
display: "flex",
justifyContent: "space-between",
py: "20px",
borderBottom: 1,
borderColor: "primary.main",
Expand All @@ -87,11 +89,13 @@ export default function UnGroupTable({
{TableHead[type].map((headElement, index) => (
<Typography
key={index}
sx={{
// flexGrow: 1,
// width: longWidthColumnNum === index + 1 && "50%",
minWidth: "150px",
}}
sx={
{
// flexGrow: 1,
// width: longWidthColumnNum === index + 1 && "50%",
// minWidth: "150px",
}
}
>
{headElement}
</Typography>
Expand All @@ -104,108 +108,98 @@ export default function UnGroupTable({
key={index}
sx={{
display: "flex",
px: "50px",
justifyContent: "space-between",
borderTop: index !== 0 && 1,
// py: "20px",
alignItems: "center",
borderColor: "primary.border",
}}
>
<Box
sx={{
display: "flex",
alignItems: "center",
flexGrow: 1,
color: "text.secondary",
borderColor: "primary.border",
}}
>
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
minWidth: "100px",
marginLeft: "50px",
textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
// py: "20px",
borderColor: "primary.border",
}}
>
미배정
</Box>

<Box
sx={{
color: "text.secondary",
display: "flex",
// flexGrow: 1,
width: "150px",
textOverflow: "ellipsis",
// overflowX: "auto",
whiteSpace: "nowrap",
py: "20px",
borderColor: "primary.border",
// justifyContent: "center",
}}
>
{row.name},{row.sid}
</Box>
미배정
</Box>

<Box
<Select
sx={{
minWidth: "100px",
color: "text.secondary",
display: "flex",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
borderColor: "primary.border",
}}
defaultValue={10}
>
<MenuItem value={10}>{row.name}</MenuItem>
<MenuItem value={20}>{row.sid}</MenuItem>
<MenuItem value={30}>{row.email}</MenuItem>
</Select>
{/* <Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
marginLeft: "20px",
py: "20px",
borderColor: "primary.border",
gap: "20px",
// gap: "20px",
}}
> */}
{row.courses.map((subject, index) => (
<Box
sx={
{
// minWidth: "150px",
}
}
>
{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>
))}
{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",
}}
sx={
{
// 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>
))}
{/* </Box> */}

{/* <Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
py: "20px",
borderColor: "primary.border",
}}
> */}
<Select
sx={{ color: "text.secondary", width: "150px" }}
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> */}

<Box sx={{ marginRight: "20px", py: "25px" }}>
<Box sx={{ py: "25px" }}>
<IconButton
onClick={() => {
handleEdit(index);
Expand Down Expand Up @@ -233,52 +227,37 @@ export default function UnGroupTable({
display: "flex",
alignItems: "center",
flexGrow: 1,
px: "20px",
}}
>
<Box
sx={{
color: "text.secondary",
display: "flex",
flexGrow: 1,
marginLeft: "20px",
textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
borderColor: "primary.border",
mr: "10px",
}}
>
<GroupSelector setTeam={setTeam} />
</Box>

<Box
<Select
sx={{
minWidth: "100px",
color: "text.secondary",
display: "flex",
flexGrow: 1,
width: "120px",
marginLeft: "50px",

textOverflow: "ellipsis",
overflowX: "auto",
whiteSpace: "nowrap",
// py: "20px",

borderColor: "primary.border",
}}
defaultValue={10}
>
{row.name},
<TextField
sx={{
width: "100px",
"& input": {
height: "10px",
},
}}
defaultValue={row.sid}
onChange={(e) => {
setSid(e.target.value);
}}
></TextField>
</Box>
<MenuItem value={10}>{row.name}</MenuItem>
<MenuItem value={20}>{row.sid}</MenuItem>
<MenuItem value={30}>{row.email}</MenuItem>
</Select>

<Box
sx={{
Expand Down

0 comments on commit b44f15f

Please sign in to comment.