diff --git a/src/app/(main)/events/[eventId]/draw/page.tsx b/src/app/(main)/events/[eventId]/draw/page.tsx index cf0dc62..4f10d86 100644 --- a/src/app/(main)/events/[eventId]/draw/page.tsx +++ b/src/app/(main)/events/[eventId]/draw/page.tsx @@ -29,8 +29,27 @@ import { Add, Remove, Info, + People, } from '@mui/icons-material'; +// 디자인 시스템 색상 +const colors = { + pink: '#F472B6', + purple: '#C084FC', + purpleLight: '#E9D5FF', + blue: '#60A5FA', + mint: '#34D399', + orange: '#FB923C', + yellow: '#FBBF24', + gray: { + 900: '#1A1A1A', + 700: '#4A4A4A', + 500: '#9E9E9E', + 300: '#D9D9D9', + 100: '#F5F5F5', + }, +}; + // Mock 데이터 const mockEventData = { name: '신규고객 유치 이벤트', @@ -163,55 +182,77 @@ export default function DrawPage() { }; return ( - - + + {/* Setup View (Before Drawing) */} {!showResults && ( <> - {/* Event Info */} - - - - - - 이벤트 정보 - - - - - 이벤트명 - - {mockEventData.name} - - - - 총 참여자 - - - {mockEventData.totalParticipants}명 - - - - - 추첨 상태 - - 추첨 전 - - - + {/* Page Header */} + + + 🎲 당첨자 추첨 + + + 참여자 중에서 공정하게 당첨자를 선정하세요 + + + + {/* Event Info Summary Cards */} + + + + + + + 이벤트명 + + + {mockEventData.name} + + + + + + + + + + 총 참여자 + + + {mockEventData.totalParticipants}명 + + + + + {/* Drawing Settings */} - - - - - + + + + + 추첨 설정 - - + + 당첨 인원 - + - + {winnerCount} - + @@ -255,21 +307,42 @@ export default function DrawPage() { setStoreBonus(e.target.checked)} + sx={{ + color: colors.purple, + '&.Mui-checked': { + color: colors.purple, + }, + }} /> } - label="매장 방문 고객 가산점 (가중치: 1.5배)" - sx={{ mb: 3 }} + label={ + + 매장 방문 고객 가산점 (가중치: 1.5배) + + } + sx={{ mb: 6 }} /> - - - - + + + + 추첨 방식 - • 난수 기반 무작위 추첨 - • 모든 추첨 과정은 자동 기록됩니다 + + • 난수 기반 무작위 추첨 + + + • 모든 추첨 과정은 자동 기록됩니다 + @@ -279,45 +352,75 @@ export default function DrawPage() { fullWidth variant="contained" size="large" - startIcon={} + startIcon={} onClick={handleStartDrawing} - sx={{ mb: 3, py: 1.5, borderRadius: 2, fontWeight: 700, fontSize: '1rem' }} + sx={{ + mb: 10, + py: 3, + borderRadius: 4, + fontWeight: 700, + fontSize: '1.25rem', + background: `linear-gradient(135deg, ${colors.pink} 0%, ${colors.purple} 100%)`, + boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)', + '&:hover': { + background: `linear-gradient(135deg, ${colors.pink} 0%, ${colors.purple} 100%)`, + boxShadow: '0 6px 16px rgba(0, 0, 0, 0.2)', + transform: 'translateY(-2px)', + }, + }} > 추첨 시작 {/* Drawing History */} - - 📜 추첨 이력 (최근 3건) + + 📜 추첨 이력 {mockDrawingHistory.length === 0 ? ( - - - + + + + 추첨 이력이 없습니다 ) : ( - + {mockDrawingHistory.slice(0, 3).map((history, index) => ( - - + + - + {history.date} {history.isRedraw && '(재추첨)'} - + 당첨자 {history.winnerCount}명 @@ -335,51 +438,59 @@ export default function DrawPage() { {showResults && ( <> {/* Results Header */} - - + + 🎉 추첨 완료! - + 총 {mockEventData.totalParticipants}명 중 {winnerCount}명 당첨 {/* Winner List */} - - + + 🏆 당첨자 목록 - + {winners.map((winner, index) => { const rank = index + 1; return ( - - - + + + {rank}위 - + 응모번호: #{winner.id} - + {winner.name} ({winner.phone}) - + 참여: {winner.channel}{' '} {winner.hasBonus && storeBonus && '🌟'} @@ -391,14 +502,18 @@ export default function DrawPage() { })} {storeBonus && ( - + 🌟 매장 방문 고객 가산점 적용 )} {/* Action Buttons */} - + @@ -418,7 +542,16 @@ export default function DrawPage() { size="large" startIcon={} onClick={() => setRedrawDialogOpen(true)} - sx={{ borderRadius: 2 }} + sx={{ + borderRadius: 3, + py: 3, + fontSize: '1rem', + fontWeight: 600, + borderWidth: 2, + '&:hover': { + borderWidth: 2, + }, + }} > 재추첨 @@ -431,7 +564,18 @@ export default function DrawPage() { size="large" startIcon={} onClick={() => setNotifyDialogOpen(true)} - sx={{ mb: 2, py: 1.5, borderRadius: 2, fontWeight: 700, fontSize: '1rem' }} + sx={{ + mb: 4, + py: 3, + borderRadius: 3, + fontWeight: 700, + fontSize: '1rem', + background: `linear-gradient(135deg, ${colors.purple} 0%, ${colors.pink} 100%)`, + '&:hover': { + background: `linear-gradient(135deg, ${colors.purple} 0%, ${colors.pink} 100%)`, + opacity: 0.9, + }, + }} > 당첨자에게 알림 전송 @@ -441,7 +585,12 @@ export default function DrawPage() { variant="text" size="large" onClick={handleBackToEvents} - sx={{ borderRadius: 2 }} + sx={{ + borderRadius: 3, + py: 3, + fontSize: '1rem', + fontWeight: 600, + }} > 이벤트 목록으로 @@ -457,14 +606,15 @@ export default function DrawPage() { sx: { bgcolor: 'rgba(0, 0, 0, 0.9)', color: 'white', + borderRadius: 4, }, }} > - + - + {animationText} - + {animationSubtext} {/* Confirm Dialog */} - setConfirmDialogOpen(false)} maxWidth="xs" fullWidth> - 추첨 확인 - - + setConfirmDialogOpen(false)} + maxWidth="xs" + fullWidth + PaperProps={{ sx: { borderRadius: 4 } }} + > + + 추첨 확인 + + + 총 {mockEventData.totalParticipants}명 중 {winnerCount}명을 추첨하시겠습니까? - - - + {/* Redraw Dialog */} - setRedrawDialogOpen(false)} maxWidth="xs" fullWidth> - 재추첨 확인 - - + setRedrawDialogOpen(false)} + maxWidth="xs" + fullWidth + PaperProps={{ sx: { borderRadius: 4 } }} + > + + 재추첨 확인 + + + 재추첨 시 현재 당첨자 정보가 변경됩니다. - + 계속하시겠습니까? - + 이전 추첨 이력은 보관됩니다 - - - + {/* Notify Dialog */} - setNotifyDialogOpen(false)} maxWidth="xs" fullWidth> - 알림 전송 - - + setNotifyDialogOpen(false)} + maxWidth="xs" + fullWidth + PaperProps={{ sx: { borderRadius: 4 } }} + > + + 알림 전송 + + + {winnerCount}명의 당첨자에게 SMS 알림을 전송하시겠습니까? - + 예상 비용: {winnerCount * 100}원 (100원/건) - - - + {/* History Detail Dialog */} - setHistoryDetailOpen(false)} maxWidth="xs" fullWidth> - 추첨 이력 상세 - + setHistoryDetailOpen(false)} + maxWidth="xs" + fullWidth + PaperProps={{ sx: { borderRadius: 4 } }} + > + + 추첨 이력 상세 + + {selectedHistory && ( - - + + 추첨 일시: {selectedHistory.date} - + 당첨 인원: {selectedHistory.winnerCount}명 - + 재추첨 여부: {selectedHistory.isRedraw ? '예' : '아니오'} - + ※ 당첨자 정보는 개인정보 보호를 위해 마스킹 처리됩니다 )} - - diff --git a/src/app/(main)/events/[eventId]/participants/page.tsx b/src/app/(main)/events/[eventId]/participants/page.tsx index 3caf968..c2236cf 100644 --- a/src/app/(main)/events/[eventId]/participants/page.tsx +++ b/src/app/(main)/events/[eventId]/participants/page.tsx @@ -21,14 +21,37 @@ import { DialogTitle, DialogContent, DialogActions, + Grid, } from '@mui/material'; import { Search, FilterList, Casino, Download, + People, + TrendingUp, + Person, + AccessTime, } from '@mui/icons-material'; +// 디자인 시스템 색상 +const colors = { + pink: '#F472B6', + purple: '#C084FC', + purpleLight: '#E9D5FF', + blue: '#60A5FA', + mint: '#34D399', + orange: '#FB923C', + yellow: '#FBBF24', + gray: { + 900: '#1A1A1A', + 700: '#4A4A4A', + 500: '#9E9E9E', + 300: '#D9D9D9', + 100: '#F5F5F5', + }, +}; + // Mock 데이터 const mockParticipants = [ { @@ -150,11 +173,117 @@ export default function ParticipantsPage() { alert('엑셀 다운로드 기능은 추후 구현됩니다'); }; + // 통계 계산 + const stats = { + total: mockParticipants.length, + waiting: mockParticipants.filter((p) => p.status === 'waiting').length, + winner: mockParticipants.filter((p) => p.status === 'winner').length, + channelDistribution: { + uriTV: mockParticipants.filter((p) => p.channelType === 'uriTV').length, + ringoBiz: mockParticipants.filter((p) => p.channelType === 'ringoBiz').length, + sns: mockParticipants.filter((p) => p.channelType === 'sns').length, + }, + }; + return ( - + + {/* Page Header */} + + + 👥 참여자 목록 + + + 이벤트에 참여한 사용자들의 정보를 확인하고 관리하세요 + + + + {/* Statistics Cards */} + + + + + + + 전체 참여자 + + + {stats.total}명 + + + + + + + + + + 대기중 + + + {stats.waiting}명 + + + + + + + + + + 당첨자 + + + {stats.winner}명 + + + + + + + + + + 당첨률 + + + {stats.total > 0 ? Math.round((stats.winner / stats.total) * 100) : 0}% + + + + + + {/* Search Section */} - + {/* Filters */} - - - - + + + + 참여 경로 - + 상태