Skip to content

Commit

Permalink
fix: interform fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HiHoi committed Feb 14, 2024
1 parent 3ba13ba commit 31402f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/recruit/[id]/panel/form/CheckQuestionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CheckQuestionForm = ({
control={control}
key={index}
variant={'Body1'}
value={value?.includes(label) ? label : undefined}
value={value?.includes(index.toString()) ? 'true' : undefined}
/>
)
})}
Expand Down
7 changes: 4 additions & 3 deletions src/app/teams/[id]/setting/panel/InterviewAnswerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ const InterviewAnswerForm = ({
index: number
}) => {
const { control } = useForm()

return (
<>
{interview.type === EInterviewType.OPEN && (
<Typography>{interview.answer}</Typography>
)}
{interview.type === EInterviewType.CLOSE && (
<CloseQuestionForm
optionList={interview?.optionList as CloseQuestionList}
optionList={interview?.option as CloseQuestionList}
control={control}
idx={index}
value={interview.answer}
Expand All @@ -35,7 +36,7 @@ const InterviewAnswerForm = ({
)}
{interview.type === EInterviewType.RATIO && (
<RatioQuestionForm
optionList={interview?.optionList as RatioQuestionList}
optionList={interview?.option as RatioQuestionList}
control={control}
idx={index}
value={interview.answer}
Expand All @@ -44,7 +45,7 @@ const InterviewAnswerForm = ({
)}
{interview.type === EInterviewType.CHECK && (
<CheckQuestionForm
optionList={interview?.optionList as CheckQuestionList}
optionList={interview?.option as CheckQuestionList}
control={control}
idx={index}
disabled={true}
Expand Down
4 changes: 2 additions & 2 deletions src/app/teams/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface ITeam {
}

export enum EInterviewType {
CLOSE = 'close',
CLOSE = 'CLOSE',
OPEN = 'OPEN',
RATIO = 'RATIO',
CHECK = 'CHECK',
Expand All @@ -70,7 +70,7 @@ export interface IInterview {
question: string
answer: string
type: EInterviewType
optionList: CloseQuestionList | RatioQuestionList | CheckQuestionList | null
option: CloseQuestionList | RatioQuestionList | CheckQuestionList | null
}

export interface IApply {
Expand Down

0 comments on commit 31402f5

Please sign in to comment.