From ff61183e89b1cff0755602bdeafe33c923839b54 Mon Sep 17 00:00:00 2001 From: yoouyeon Date: Sat, 6 Apr 2024 14:15:12 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[Feat]=20=EC=84=9C=EB=A5=98=20=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=20=EB=93=B1=EB=A1=9D=20=EB=AA=A8=EB=8B=AC=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recruitmentsuser/NotificationResults.tsx | 55 ++++++++++++++++++- components/modal/modalType/AdminModal.tsx | 3 + types/modalTypes.ts | 14 ++++- 3 files changed, 68 insertions(+), 4 deletions(-) diff --git a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx index 05b2b4142..e4413fccf 100644 --- a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx +++ b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx @@ -58,6 +58,27 @@ function NotificationResults({ recruitId }: { recruitId: number }) { }); }; + const handleApplicationResultModal = ( + applicationId: number, + status: 'PROGRESS_INTERVIEW' | 'FAIL', + interviewDate: Date | null + ) => { + setModal({ + modalName: 'ADMIN-RECRUIT_APPLICATION_RESULT', + applicationResult: { + applicationId, + status, + interviewDate, + }, + }); + }; + + const handleInterviewResultModal = () => { + setModal({ + modalName: 'ADMIN-RECRUIT_INTERVIEW_RESULT', + }); + }; + const handleAlignment = ( event: React.MouseEvent, newAlignment: string | null, @@ -105,7 +126,11 @@ function NotificationResults({ recruitId }: { recruitId: number }) { ); } - const renderTableCell = (recruit: Inotication, columnName: string) => { + const renderTableCell = ( + recruitId: number, + recruit: Inotication, + columnName: string + ) => { if (columnName === 'interview') { return (
@@ -114,7 +139,31 @@ function NotificationResults({ recruitId }: { recruitId: number }) { onChange={(date) => setStartDate(date)} />   - + + {' '} + {/* 임시 버튼 */}
); } @@ -162,7 +211,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { {tableFormat['notificationList'].columns.map( (columnName: string, index: number) => ( - {renderTableCell(recruit, columnName)} + {renderTableCell(recruitId, recruit, columnName)} ) )} diff --git a/components/modal/modalType/AdminModal.tsx b/components/modal/modalType/AdminModal.tsx index c8b1e4a83..e13fdacae 100644 --- a/components/modal/modalType/AdminModal.tsx +++ b/components/modal/modalType/AdminModal.tsx @@ -92,6 +92,9 @@ export default function AdminModal() { ) : null, 'ADMIN-RECRUIT_MESSAGE_TEMPLATE': , + // 임시 결과 등록 모달 + 'ADMIN-RECRUIT_APPLICATION_RESULT': , + 'ADMIN-RECRUIT_INTERVIEW_RESULT': , }; return content[modalName]; diff --git a/types/modalTypes.ts b/types/modalTypes.ts index 9f25ebb74..e407c5b6d 100644 --- a/types/modalTypes.ts +++ b/types/modalTypes.ts @@ -53,7 +53,9 @@ type AdminModal = | 'CHECK_SEND_NOTI' | 'TOURNAMENT_BRAKET_EDIT' | 'TOURNAMENT_PARTICIPANT_EDIT' - | 'RECRUIT_MESSAGE_TEMPLATE'; + | 'RECRUIT_MESSAGE_TEMPLATE' + | 'RECRUIT_APPLICATION_RESULT' + | 'RECRUIT_INTERVIEW_RESULT'; type ModalName = | null @@ -142,4 +144,14 @@ export interface Modal { tournamentInfo?: TournamentInfo; tournament?: ITournament; tournamentId?: number; + // recruit result + applicationResult?: { + applicationId: number; + status: 'PROGRESS_INTERVIEW' | 'FAIL'; + interviewDate: Date | null; + }; + interviewResult?: { + applicationId: number; + result: string; + }; } From ceeb0e47b1562dc631b1490a0347946b62f13770 Mon Sep 17 00:00:00 2001 From: yoouyeon Date: Sat, 6 Apr 2024 14:18:10 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[Refact]=20=EA=B2=B0=EA=B3=BC=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EB=AA=A8=EB=8B=AC=20=ED=95=98=EB=82=98=EB=A1=9C=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recruitmentsuser/NotificationResults.tsx | 6 +++--- components/modal/modalType/AdminModal.tsx | 3 +-- types/modalTypes.ts | 9 ++------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx index e4413fccf..60fd716aa 100644 --- a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx +++ b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx @@ -64,8 +64,8 @@ function NotificationResults({ recruitId }: { recruitId: number }) { interviewDate: Date | null ) => { setModal({ - modalName: 'ADMIN-RECRUIT_APPLICATION_RESULT', - applicationResult: { + modalName: 'ADMIN-RECRUIT_RESULT', + recruitResult: { applicationId, status, interviewDate, @@ -75,7 +75,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { const handleInterviewResultModal = () => { setModal({ - modalName: 'ADMIN-RECRUIT_INTERVIEW_RESULT', + modalName: 'ADMIN-RECRUIT_RESULT', }); }; diff --git a/components/modal/modalType/AdminModal.tsx b/components/modal/modalType/AdminModal.tsx index e13fdacae..d1785dbe0 100644 --- a/components/modal/modalType/AdminModal.tsx +++ b/components/modal/modalType/AdminModal.tsx @@ -93,8 +93,7 @@ export default function AdminModal() { ) : null, 'ADMIN-RECRUIT_MESSAGE_TEMPLATE': , // 임시 결과 등록 모달 - 'ADMIN-RECRUIT_APPLICATION_RESULT': , - 'ADMIN-RECRUIT_INTERVIEW_RESULT': , + 'ADMIN-RECRUIT_RESULT': , }; return content[modalName]; diff --git a/types/modalTypes.ts b/types/modalTypes.ts index e407c5b6d..547124d82 100644 --- a/types/modalTypes.ts +++ b/types/modalTypes.ts @@ -54,8 +54,7 @@ type AdminModal = | 'TOURNAMENT_BRAKET_EDIT' | 'TOURNAMENT_PARTICIPANT_EDIT' | 'RECRUIT_MESSAGE_TEMPLATE' - | 'RECRUIT_APPLICATION_RESULT' - | 'RECRUIT_INTERVIEW_RESULT'; + | 'RECRUIT_RESULT'; type ModalName = | null @@ -145,13 +144,9 @@ export interface Modal { tournament?: ITournament; tournamentId?: number; // recruit result - applicationResult?: { + recruitResult?: { applicationId: number; status: 'PROGRESS_INTERVIEW' | 'FAIL'; interviewDate: Date | null; }; - interviewResult?: { - applicationId: number; - result: string; - }; } From 9e1696aa870d2421149957fff69588586135407f Mon Sep 17 00:00:00 2001 From: yoouyeon Date: Sat, 6 Apr 2024 14:26:14 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[Feat]=20=EC=B5=9C=EC=A2=85=20=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=20=EB=93=B1=EB=A1=9D=20=EB=AA=A8=EB=8B=AC=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recruitmentsuser/NotificationResults.tsx | 24 ++++++++++++++++--- types/modalTypes.ts | 3 ++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx index 60fd716aa..f30591721 100644 --- a/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx +++ b/components/admin/recruitments/recruitmentsuser/NotificationResults.tsx @@ -59,6 +59,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { }; const handleApplicationResultModal = ( + recruitId: number, applicationId: number, status: 'PROGRESS_INTERVIEW' | 'FAIL', interviewDate: Date | null @@ -66,6 +67,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { setModal({ modalName: 'ADMIN-RECRUIT_RESULT', recruitResult: { + recruitId, applicationId, status, interviewDate, @@ -73,9 +75,19 @@ function NotificationResults({ recruitId }: { recruitId: number }) { }); }; - const handleInterviewResultModal = () => { + const handleInterviewResultModal = ( + recruitId: number, + applicationId: number, + status: 'PASS' | 'FAIL' + ) => { setModal({ modalName: 'ADMIN-RECRUIT_RESULT', + recruitResult: { + recruitId, + applicationId, + status, + interviewDate: null, + }, }); }; @@ -143,6 +155,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { variant='outlined' onClick={() => { handleApplicationResultModal( + recruitId, recruit.applicationId, 'PROGRESS_INTERVIEW', startDate @@ -155,6 +168,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { variant='outlined' onClick={() => { handleApplicationResultModal( + recruitId, recruit.applicationId, 'FAIL', startDate @@ -162,7 +176,7 @@ function NotificationResults({ recruitId }: { recruitId: number }) { }} > 불합 - {' '} + {/* 임시 버튼 */} ); @@ -189,7 +203,11 @@ function NotificationResults({ recruitId }: { recruitId: number }) { + + ); + } + + if (status === 'PASS' || status === 'FAIL') { + return ( +
+ +
+ ); + } +} + +export default AdminRecruitResultModal; diff --git a/components/modal/modalType/AdminModal.tsx b/components/modal/modalType/AdminModal.tsx index d1785dbe0..f4de8d2cf 100644 --- a/components/modal/modalType/AdminModal.tsx +++ b/components/modal/modalType/AdminModal.tsx @@ -18,6 +18,7 @@ import AdminUserCoinModal from 'components/modal/admin/AdminUserCoinModal'; import DeletePenaltyModal from 'components/modal/admin/DeletePenaltyModal'; import DetailModal from 'components/modal/admin/DetailModal'; import AdminSeasonEdit from 'components/modal/admin/SeasonEdit'; +import AdminRecruitResultModal from '../admin/AdminRecruitResultModal'; export default function AdminModal() { const { @@ -35,6 +36,7 @@ export default function AdminModal() { coinPolicy, tournament, tournamentId, + recruitResult, } = useRecoilValue(modalState); if (!modalName) { @@ -93,7 +95,9 @@ export default function AdminModal() { ) : null, 'ADMIN-RECRUIT_MESSAGE_TEMPLATE': , // 임시 결과 등록 모달 - 'ADMIN-RECRUIT_RESULT': , + 'ADMIN-RECRUIT_RESULT': recruitResult ? ( + + ) : null, }; return content[modalName]; From 956151cce0a647aa737c32118e67423ec672e7d7 Mon Sep 17 00:00:00 2001 From: yoouyeon Date: Sat, 6 Apr 2024 14:41:17 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[Fix]=20=ED=83=80=EC=9E=85=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminRecruitResultModal.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/components/modal/admin/AdminRecruitResultModal.tsx b/components/modal/admin/AdminRecruitResultModal.tsx index c95878175..f6cd15c32 100644 --- a/components/modal/admin/AdminRecruitResultModal.tsx +++ b/components/modal/admin/AdminRecruitResultModal.tsx @@ -73,13 +73,11 @@ function AdminRecruitResultModal({ ); } - if (status === 'PASS' || status === 'FAIL') { - return ( -
- -
- ); - } + return ( +
+ +
+ ); } export default AdminRecruitResultModal;