Skip to content

Commit

Permalink
Merge pull request #74 from HGU-WALAB/#65/hotfix
Browse files Browse the repository at this point in the history
HOTFIX : 보고서 작성 시 유저 정보가 포함되지 않는 버그 수정
  • Loading branch information
ohinhyuk authored Sep 18, 2023
2 parents 58bef7c + 099f296 commit 36353ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions histudy-front/src/components/Post/PostMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function PostMember({ control, setValue, getValues }) {
let { value, checked } = event.target;

// value = value.slice(value.length - 8, value.length);

if (checked) {
setValue("participants", [...getValues("participants"), value]);
} else {
Expand All @@ -30,7 +29,7 @@ export default function PostMember({ control, setValue, getValues }) {
<FormGroup>
{teamMember?.map((tm, index) => (
<FormControlLabel
key={tm.sid}
key={tm.id}
control={
<Controller
name="participants"
Expand All @@ -39,8 +38,8 @@ export default function PostMember({ control, setValue, getValues }) {
render={({ field }) => (
<Checkbox
{...field}
value={tm.sid}
checked={field.value.includes(tm.sid)}
value={tm.id + ""}
checked={field.value.includes(tm.id + "")}
onChange={handleCheckboxChange}
/>
)}
Expand Down
2 changes: 2 additions & 0 deletions histudy-front/src/pages/Manager/ManageGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const SizedBox = styled(Box)({
});

export default function ManageGroup() {


const [groupData, setGroupData] = useState();
const [ungroupData, setUngroupData] = useState();
const setGroupAutoCompleteState = useSetRecoilState(groupAutoCompleteState);
Expand Down
2 changes: 1 addition & 1 deletion histudy-front/src/pages/Post/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function Post({ children }) {
defaultValues: {
title: state ? state.title : "",
content: state ? state.content : "",
participants: state ? state.participants.map((p) => p.sid) : [],
participants: state ? state.participants.map((p) => p.id + "") : [],
totalMinutes: state ? state.totalMinutes : "",
images: state ? [...state.images.map((image) => image.url)] : [],
courses: state ? state.courses.map((c) => c.id.toString()) : [],
Expand Down

0 comments on commit 36353ed

Please sign in to comment.