fix: 홈 로또 카드 가격/플랜명 수정, 관리자 구독자 통계/구독 현황 추가

- 홈 카드: 월 4,900원 → 900원~, 플랜명 골드/플래티넘/다이아로 수정
- 관리자 대시보드: 활성 구독자 수 카드 추가
- 관리자 회원 목록: 구독 현황(플랜명, 만료일) 컬럼 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 03:51:18 +09:00
parent 16fa4f4c98
commit b250d4b50c
5 changed files with 43 additions and 9 deletions

View File

@@ -9,8 +9,15 @@ interface Member {
created_at: string;
orderCount: number;
totalPaid: number;
activeSub: { product_id: string; status: string; expires_at: string } | null;
}
const PLAN_LABELS: Record<string, string> = {
lotto_gold: '🥇 골드',
lotto_platinum: '💎 플래티넘',
lotto_diamond: '👑 다이아',
};
export default function AdminMembersPage() {
const [members, setMembers] = useState<Member[]>([]);
const [loading, setLoading] = useState(true);
@@ -65,6 +72,7 @@ export default function AdminMembersPage() {
<th className="text-left px-5 py-3 text-slate-400 font-medium"></th>
<th className="text-left px-5 py-3 text-slate-400 font-medium"></th>
<th className="text-left px-5 py-3 text-slate-400 font-medium"></th>
<th className="text-left px-5 py-3 text-slate-400 font-medium"></th>
<th className="text-right px-5 py-3 text-slate-400 font-medium"> </th>
<th className="text-right px-5 py-3 text-slate-400 font-medium"> </th>
</tr>
@@ -72,7 +80,7 @@ export default function AdminMembersPage() {
<tbody>
{filtered.length === 0 ? (
<tr>
<td colSpan={5} className="text-center py-12 text-slate-500">
<td colSpan={6} className="text-center py-12 text-slate-500">
</td>
</tr>
@@ -84,6 +92,16 @@ export default function AdminMembersPage() {
<td className="px-5 py-3 text-slate-400">
{new Date(m.created_at).toLocaleDateString('ko-KR')}
</td>
<td className="px-5 py-3">
{m.activeSub ? (
<div>
<span className="text-xs font-semibold text-amber-400">{PLAN_LABELS[m.activeSub.product_id] ?? m.activeSub.product_id}</span>
<div className="text-xs text-slate-500">{new Date(m.activeSub.expires_at).toLocaleDateString('ko-KR')} </div>
</div>
) : (
<span className="text-xs text-slate-600">-</span>
)}
</td>
<td className="px-5 py-3 text-right">
<span className={`px-2 py-0.5 rounded-full text-xs ${m.orderCount > 0 ? 'bg-green-900/40 text-green-400' : 'bg-slate-700 text-slate-500'}`}>
{m.orderCount}