diff --git a/src/components/application/ApplicationForm.tsx b/src/components/application/ApplicationForm.tsx index 45adbc3..28abefa 100644 --- a/src/components/application/ApplicationForm.tsx +++ b/src/components/application/ApplicationForm.tsx @@ -4,7 +4,6 @@ import { useNavigate } from 'react-router-dom'; import { useState, useEffect } from 'react'; import * as z from 'zod'; import * as A from './ApplicationStyle'; - import { applicationSchema } from '../application/ApplicationSchema'; import ApplicationModal from './modal/ApplicationModal'; import SelectedOption from './SelectedOption'; @@ -170,7 +169,6 @@ const ApplicationForm = () => { if (userData) { setValue('email', userData.email); trigger('email'); - setUniversityId(userData.universityId); } if (hackathonResponse.data.length === 0) { diff --git a/src/components/application/ApplicationModify.tsx b/src/components/application/ApplicationModify.tsx index ae57f7b..6f0c7bb 100644 --- a/src/components/application/ApplicationModify.tsx +++ b/src/components/application/ApplicationModify.tsx @@ -178,9 +178,7 @@ const ApplicationForm = () => { ); setValue( 'reasonForNotOffline', - hackathonData.reasonForNotOffline === '' - ? '' - : hackathonData.reasonForNotOffline!, + hackathonData.reasonForNotOffline === '기본값' ? '기본값' : '', ); } }, [hackathonData]); diff --git a/src/pages/admin/components/hackathon/components/TableBottom.tsx b/src/pages/admin/components/hackathon/components/TableBottom.tsx index 8da323a..eebb092 100644 --- a/src/pages/admin/components/hackathon/components/TableBottom.tsx +++ b/src/pages/admin/components/hackathon/components/TableBottom.tsx @@ -8,7 +8,7 @@ interface ExcelType { universityName: string; phone: string; offlineParticipation: boolean | string; - hackathonParts: string[] | string; + hackathonParts: any; email: string; teamName: string; } @@ -24,13 +24,34 @@ const HackathonTableBottom = () => { const workbook = XLSX.utils.book_new(); const body: ExcelType[] = []; + // users.map(el => { + // body.push({ + // name: el.name, + // universityName: el.universityName!, + // phone: el.phone!, + // offlineParticipation: el.offlineParticipation!, + // hackathonParts: el.hackathonParts![0], + // email: el.email, + // teamName: el.teamName!, + // }); + // }); users.map(el => { body.push({ name: el.name, universityName: el.universityName!, phone: el.phone!, - offlineParticipation: el.offlineParticipation!, - hackathonParts: el.hackathonParts![0], + offlineParticipation: el.offlineParticipation! + ? '참여' + : '불참', + hackathonParts: + el.hackathonParts![0] + + (el.hackathonParts![1] + ? ', ' + el.hackathonParts![1] + : '') + + (el.hackathonParts![2] + ? ', ' + el.hackathonParts![2] + : '') + + (el.hackathonParts![3] ? ', ' + el.hackathonParts![3] : ''), email: el.email, teamName: el.teamName!, }); @@ -62,7 +83,7 @@ const HackathonTableBottom = () => { { wpx: 180 }, { wpx: 200 }, { wpx: 100 }, - { wpx: 130 }, + { wpx: 230 }, { wpx: 200 }, { wpx: 200 }, ]; diff --git a/src/pages/admin/components/hackathon/components/TableHackathonList.tsx b/src/pages/admin/components/hackathon/components/TableHackathonList.tsx index d60328a..f921833 100644 --- a/src/pages/admin/components/hackathon/components/TableHackathonList.tsx +++ b/src/pages/admin/components/hackathon/components/TableHackathonList.tsx @@ -48,7 +48,9 @@ const TableHackathonList: React.FC = props => { )} - {props!.hackathonParts!.map(el => el)} + {props!.hackathonParts!.map(el => ( +
{el}
+ ))}
{props.email}
{props.teamName}