Skip to content

Commit

Permalink
Fix: 면접 신청 실패 시 alert 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
mingd1023 committed Aug 22, 2021
1 parent 4b28f99 commit 7ad7209
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/containers/apply/InterviewContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,25 @@ const InterviewContainer = () => {
}, []);

const handleSelectInterviewTime = ({ slotId }) => {
interviewAPI.createInterviewApplication({ slotId }).then((res) => {
if (res.status === SUCCESS.OK) {
setData(res.data.data);
setMySlotId(slotId);
alert('성공적으로 신청되었습니다.');
} else if (res.status === CLIENT_ERROR.CONFLICT) {
alert('[신청 실패] 면접 인원이 가득 찼습니다.');
window.location.reload();
} else {
interviewAPI
.createInterviewApplication({ slotId })
.then((res) => {
if (res.status === SUCCESS.OK) {
setData(res.data.data);
setMySlotId(slotId);
alert('성공적으로 신청되었습니다.');
} else if (res.status === CLIENT_ERROR.CONFLICT) {
alert('[신청 실패] 면접 인원이 가득 찼습니다.');
window.location.reload();
} else {
alert('면접 신청에 실패하였습니다.');
window.location.reload();
}
})
.catch((e) => {
alert('면접 신청에 실패하였습니다.');
window.location.reload();
}
});
});
};

const handleCancelInterviewTime = ({ loginId }) => {
Expand Down

0 comments on commit 7ad7209

Please sign in to comment.