feat: 멤버십(무료/유료) 게이팅 — 프론트
CI / build (push) Failing after 15m5s

- auth 스토어 isPremium/isAdmin 추가 (plan===PREMIUM 또는 관리자)
- 사이드바: 통계·고정지출·예산·태그 메뉴에 무료 회원 잠금 배지(🔒)
- 라우트 가드: 유료 전용 화면(requiresPremium) → 무료 회원은 /upgrade
- UpgradeView: 무료/유료 기능 비교 + 업그레이드 안내
- http 인터셉터: 403 PREMIUM_REQUIRED → premium:required 이벤트 → 업그레이드 화면
- 무료 화면의 유료 API 호출 차단(홈 예산·내역 태그·OCR·카드알림 게이팅)
- 회원관리: 멤버십 컬럼 + 무료/유료 토글(관리자)
- 설정: 데이터 백업/복구 유료 게이팅, 계정정보에 멤버십 표시

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 11:02:44 +09:00
parent 2755d118c2
commit 9861ba90ae
12 changed files with 309 additions and 32 deletions
+31 -1
View File
@@ -79,6 +79,17 @@ async function changeRole(m, role) {
}
}
async function changePlan(m, plan) {
if (plan === m.plan) return
try {
const updated = await adminApi.updateMemberPlan(m.id, plan)
Object.assign(m, updated)
} catch (e) {
alert(e.response?.data?.message || '멤버십 변경 실패')
await load()
}
}
async function changeStatus(m, status) {
if (status === m.status) return
try {
@@ -114,7 +125,7 @@ onMounted(() => {
<IconBtn icon="refresh" title="새로고침" size="sm" :disabled="loading" @click="load" />
</div>
</header>
<p class="hint">가입한 회원의 역할·상태를 관리합니다. (관리자 전용)</p>
<p class="hint">가입한 회원의 역할·멤버십·상태를 관리합니다. (관리자 전용)</p>
<!-- 회원가입 허용 토글 -->
<div class="signup-toggle" :class="{ off: !signupEnabled }">
@@ -139,6 +150,7 @@ onMounted(() => {
<th>아이디 / 이름</th>
<th class="c-email">이메일</th>
<th class="c-role">역할</th>
<th class="c-plan">멤버십</th>
<th class="c-status">상태</th>
<th class="c-date">가입일</th>
<th class="c-act"></th>
@@ -158,6 +170,16 @@ onMounted(() => {
<option value="ADMIN">ADMIN</option>
</select>
</td>
<td class="c-plan">
<select
:value="m.plan || 'FREE'"
class="plan-sel" :class="(m.plan || 'FREE').toLowerCase()"
@change="changePlan(m, $event.target.value)"
>
<option value="FREE">무료</option>
<option value="PREMIUM">유료</option>
</select>
</td>
<td class="c-status">
<select
:value="m.status" :disabled="m.id === myId"
@@ -289,6 +311,7 @@ h1 {
width: 48px;
}
.c-role,
.c-plan,
.c-status {
width: 90px;
}
@@ -347,6 +370,13 @@ h1 {
.status-sel.withdrawn {
color: #c0392b;
}
.plan-sel.premium {
color: #b8860b;
font-weight: 600;
}
.plan-sel.free {
color: var(--color-text);
}
.msg {
margin: 1rem 0;
}