Skip to content

Commit 56738b5

Browse files
committed
feat: MBTI 팀매칭 UI를 6인 고정 기준으로 정리
1 parent 86bab28 commit 56738b5

1 file changed

Lines changed: 18 additions & 27 deletions

File tree

src/app/dashboard/mbti/page.tsx

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ type TeamMatchingResponse = {
5757
matchedCount: number
5858
unmatchedCount: number
5959
teamSize: number
60-
teamCount: number
61-
teams: Array<{
62-
teamNumber: number
63-
members: Array<{
64-
name: string
65-
studentId: string
66-
mbtiType: string
60+
teamCount: number
61+
teams: Array<{
62+
teamNumber: number
63+
members: Array<{
64+
name: string
65+
studentId: string
66+
mbtiType: string | null
67+
hasMbtiResult: boolean
68+
}>
6769
}>
68-
}>
6970
unmatchedCandidates: Array<{
7071
name: string
7172
studentId: string
@@ -160,7 +161,7 @@ export default function DashboardMbtiPage() {
160161

161162
const [typeCounts, setTypeCounts] = useState<Array<{ mbtiType: string; count: number }>>([])
162163

163-
const [teamSize, setTeamSize] = useState(4)
164+
const teamSize = 6
164165
const [csvCandidates, setCsvCandidates] = useState<CsvCandidate[]>([])
165166
const [csvFileName, setCsvFileName] = useState('')
166167
const [matchingLoading, setMatchingLoading] = useState(false)
@@ -444,21 +445,9 @@ export default function DashboardMbtiPage() {
444445
{csvFileName || 'CSV 파일 선택'}
445446
</label>
446447

447-
<label className="flex items-center gap-2 typo-pc-c2">
448-
팀 인원
449-
<input
450-
type="number"
451-
min={2}
452-
max={10}
453-
value={teamSize}
454-
onChange={(event) => {
455-
const value = Number(event.target.value)
456-
if (Number.isNaN(value)) return
457-
setTeamSize(Math.min(10, Math.max(2, value)))
458-
}}
459-
className="h-11 w-20 rounded-lg border border-gray-300 bg-gray-100 px-3 text-white outline-none focus:border-white"
460-
/>
461-
</label>
448+
<div className="flex h-11 items-center rounded-lg border border-white/10 bg-gray-100/30 px-4 typo-pc-c2 text-gray-700">
449+
팀 인원 6명 고정
450+
</div>
462451

463452
<button
464453
type="button"
@@ -471,6 +460,8 @@ export default function DashboardMbtiPage() {
471460

472461
<div className="mt-3 rounded-lg border border-white/10 bg-gray-100/30 p-3 typo-pc-c2 text-gray-700">
473462
CSV 후보 인원: {csvCandidates.length}
463+
<br />
464+
MBTI 참여자와 미참여자가 팀마다 최대한 고르게 섞이도록 6명씩 편성합니다.
474465
</div>
475466

476467
{matchingError ? (
@@ -491,11 +482,11 @@ export default function DashboardMbtiPage() {
491482
<p className="typo-pc-h4 text-white">{matchingResult.uniqueCandidates}</p>
492483
</div>
493484
<div className="rounded-lg border border-white/10 bg-gray-100/30 p-3">
494-
<p className="typo-pc-c2 text-gray-700">매칭 성공</p>
485+
<p className="typo-pc-c2 text-gray-700">팀 편성 인원</p>
495486
<p className="typo-pc-h4 text-white">{matchingResult.matchedCount}</p>
496487
</div>
497488
<div className="rounded-lg border border-white/10 bg-gray-100/30 p-3">
498-
<p className="typo-pc-c2 text-gray-700">결과 없음</p>
489+
<p className="typo-pc-c2 text-gray-700">편성 제외</p>
499490
<p className="typo-pc-h4 text-white">{matchingResult.unmatchedCount}</p>
500491
</div>
501492
</div>
@@ -514,7 +505,7 @@ export default function DashboardMbtiPage() {
514505
{member.name} ({member.studentId})
515506
</span>
516507
<span className="rounded-full border border-white/20 px-2 py-1 typo-pc-c2">
517-
{member.mbtiType}
508+
{member.hasMbtiResult ? member.mbtiType : 'MBTI 미참여'}
518509
</span>
519510
</li>
520511
))}

0 commit comments

Comments
 (0)