feat: add Tier Limits Matrix Editor (Admin UI)
Phase 3 Frontend - First Component: Matrix Editor New page: AdminTierLimitsPage - Displays Tier x Feature matrix (editable table) - Inline editing for all limit values - Visual feedback for changes (highlighted cells) - Batch save with validation - Category grouping (data, ai, export, integration) - Legend: ∞ = unlimited (NULL), ❌ = disabled (0), 1-999 = limit - Responsive table with sticky column headers Features: - GET /api/tier-limits - Load matrix - PUT /api/tier-limits/batch - Save all changes - Change tracking (shows unsaved count) - Reset button to discard changes - Success/error messages API helpers added (api.js): - v9c subscription endpoints (user + admin) - listFeatures, listTiers, getTierLimitsMatrix - updateTierLimit, updateTierLimitsBatch - listCoupons, redeemCoupon - User restrictions, access grants Navigation: - Link in AdminPanel (Settings Page) - Route: /admin/tier-limits Ready for testing on Dev! Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
91c8a5332f
commit
9438b5d617
4 files changed
+336
-1
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Plus, Trash2, Pencil, Check, X, Shield, Key } from 'lucide-react'
|
||||
import { Plus, Trash2, Pencil, Check, X, Shield, Key, Settings } from 'lucide-react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
import { api } from '../utils/api'
|
||||
|
||||
@@ -397,6 +398,21 @@ export default function AdminPanel() {
|
||||
|
||||
{/* Email Settings */}
|
||||
<EmailSettings/>
|
||||
|
||||
{/* v9c Subscription Management */}
|
||||
<div className="card section-gap" style={{marginTop:16}}>
|
||||
<div style={{fontWeight:700,fontSize:14,marginBottom:12,display:'flex',alignItems:'center',gap:6}}>
|
||||
<Settings size={16} color="var(--accent)"/> Subscription-System (v9c)
|
||||
</div>
|
||||
<div style={{fontSize:12,color:'var(--text3)',marginBottom:12,lineHeight:1.5}}>
|
||||
Verwalte Tiers, Features und Limits für das neue Freemium-System.
|
||||
</div>
|
||||
<Link to="/admin/tier-limits">
|
||||
<button className="btn btn-secondary btn-full">
|
||||
📊 Tier Limits Matrix bearbeiten
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user