Skip to content

Commit

Permalink
Merge pull request #1372 from 42organization/fix/1371-지원서-보기수정-페이지-ap…
Browse files Browse the repository at this point in the history
…i-응답-형식에-맞게-수정
  • Loading branch information
PHJoon authored Apr 8, 2024
2 parents 5689ef3 + 3c94925 commit 1ed3d1b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ function MultiCheckForm(props: IitemProps) {
value={check.id}
control={
<Checkbox
defaultChecked={answer?.checkedList?.includes(check.id)}
defaultChecked={answer?.checkedList
?.map((check) => check.checkListId)
.includes(check.id)}
/>
}
label={check.contents}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function SingleCheckForm(props: IitemProps) {
};

useEffect(() => {
if (answer && answer.checkedList) setSingleCheck(answer?.checkedList);
if (answer && answer.checkedList)
setSingleCheck(answer?.checkedList.map((check) => check.checkListId));
}, [answer]);

return (
Expand Down
7 changes: 4 additions & 3 deletions types/recruit/recruitments.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ export interface IRecruitmentDetail {
export interface IApplicantAnswer {
questionId: number;
inputType: recruitmentQuestionTypes;
checkedList?: number[];
answer?: string;
checkedList: { checkListId: number; content: string }[];
answer: string | null;
}

export type ApplicationFormType = 'APPLY' | 'VIEW' | 'EDIT';

export interface IUserApplicationInfo {
applicationId: number;
endDate: string;
endTime: string;
title: string;
content: string;
}
Expand Down

0 comments on commit 1ed3d1b

Please sign in to comment.