mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: separate renewal and purchase flows in multi-tariff mode
Renewal flow (per-subscription): - New /subscriptions/:id/renew page showing only period options for the specific tariff with balance display and renew button - PurchaseCTAButton links to /renew in multi-tariff mode Purchase flow (new tariffs only): - Hide already purchased tariffs (is_purchased flag from backend) - Fallback UI when all tariffs are owned - Types: added is_purchased, all_tariffs_purchased fields
This commit is contained in:
11
src/App.tsx
11
src/App.tsx
@@ -44,6 +44,7 @@ const Connection = lazy(() => import('./pages/Connection'));
|
||||
const ConnectionQR = lazy(() => import('./pages/ConnectionQR'));
|
||||
const QuickPurchase = lazy(() => import('./pages/QuickPurchase'));
|
||||
const PurchaseSuccess = lazy(() => import('./pages/PurchaseSuccess'));
|
||||
const RenewSubscription = lazy(() => import('./pages/RenewSubscription'));
|
||||
const AutoLogin = lazy(() => import('./pages/AutoLogin'));
|
||||
const TopUpMethodSelect = lazy(() => import('./pages/TopUpMethodSelect'));
|
||||
const TopUpAmount = lazy(() => import('./pages/TopUpAmount'));
|
||||
@@ -284,6 +285,16 @@ function App() {
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/subscriptions/:subscriptionId/renew"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<LazyPage>
|
||||
<RenewSubscription />
|
||||
</LazyPage>
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
{/* Legacy redirects for backward compatibility */}
|
||||
<Route path="/subscription/:subscriptionId" element={<LegacySubscriptionRedirect />} />
|
||||
<Route
|
||||
|
||||
Reference in New Issue
Block a user