Skip to content

Commit

Permalink
Merge pull request #67 from HGU-WALAB/#65/hotfix
Browse files Browse the repository at this point in the history
HOTFIX : 미배정으로 설정 하였을 때 그룹 미배정으로 옮겨지게 설정
  • Loading branch information
ohinhyuk authored Sep 6, 2023
2 parents c8e1b21 + 5e800c4 commit f351089
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions histudy-front/src/components/Manager/GroupSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRecoilValue } from "recoil";
import { groupAutoCompleteState } from "../../store/atom";

const groupData = [
{ label: "미배정" },
{ label: "Group1" },
{ label: "Group2" },
{ label: "Group3" },
Expand Down Expand Up @@ -85,9 +86,11 @@ export default function GroupSelector({ team, setTeam }) {
<Autocomplete
onChange={(e, newValue) => {
// Autocomplete의 onChange는 (event, newValue)를 인자로 받습니다.
setTeam(newValue?.label?.slice(5));
if (newValue?.label === "미배정") {
setTeam(undefined);
} else setTeam(newValue?.label?.slice(5));
}}
value={"Group" + team + ""}
value={team ? "Group" + team + "" : "미배정"}
disablePortal
id="combo-box-demo"
options={groupData} // groupAutoComplete 값을 사용하도록 수정했습니다.
Expand Down
5 changes: 2 additions & 3 deletions histudy-front/src/components/Manager/GroupTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function GroupTables({
const [sid, setSid] = useState();

const setIsLoading = useSetRecoilState(isLoadingState);

console.log(data);
return (
<Box>
<Box
Expand Down Expand Up @@ -357,11 +357,10 @@ export default function GroupTables({
name: student.name,
id: student.id,
};

editUser(newData)
.then(() => {
alert("변경되었습니다!");
window.location.reload();
// window.location.reload();
})
.catch((error) => {
alert("변경에 실패했습니다.");
Expand Down

0 comments on commit f351089

Please sign in to comment.