diff --git a/backend/agent/handlers/agent_service.py b/backend/agent/handlers/agent_service.py index 977d8d19..578994ef 100644 --- a/backend/agent/handlers/agent_service.py +++ b/backend/agent/handlers/agent_service.py @@ -369,7 +369,7 @@ class AgentService: creator_name = None if template_data.get('creator_id'): try: - creator_result = await self.db.table('accounts').select('name, slug').eq('id', template_data['creator_id']).single().execute() + creator_result = await self.db.schema('basejump').from_('accounts').select('name, slug').eq('id', template_data['creator_id']).single().execute() if creator_result.data: creator_name = creator_result.data.get('name') or creator_result.data.get('slug') except Exception as e: diff --git a/frontend/src/components/billing/billing-modal.tsx b/frontend/src/components/billing/billing-modal.tsx index 0c6ec0bd..fd760c5a 100644 --- a/frontend/src/components/billing/billing-modal.tsx +++ b/frontend/src/components/billing/billing-modal.tsx @@ -238,7 +238,7 @@ export function BillingModal({ open, onOpenChange, returnUrl = typeof window !== <> - {/* Usage Limit Alert */} + {/* Usage Limit Alert {showUsageLimitAlert && (
@@ -255,7 +255,7 @@ export function BillingModal({ open, onOpenChange, returnUrl = typeof window !==
- )} + )} */} {/* Usage section - show loading state or actual data */} {isLoading || authLoading ? ( diff --git a/frontend/src/components/sidebar/nav-user-with-teams.tsx b/frontend/src/components/sidebar/nav-user-with-teams.tsx index 1f96937e..558c66a4 100644 --- a/frontend/src/components/sidebar/nav-user-with-teams.tsx +++ b/frontend/src/components/sidebar/nav-user-with-teams.tsx @@ -20,6 +20,7 @@ import { Moon, KeyRound, Plug, + Zap, } from 'lucide-react'; import { useAccounts } from '@/hooks/use-accounts'; import NewTeamForm from '@/components/basejump/new-team-form'; @@ -53,6 +54,7 @@ import { createClient } from '@/lib/supabase/client'; import { useTheme } from 'next-themes'; import { isLocalMode } from '@/lib/config'; import { clearUserLocalStorage } from '@/lib/utils/clear-local-storage'; +import { BillingModal } from '@/components/billing/billing-modal'; export function NavUserWithTeams({ user, @@ -67,6 +69,7 @@ export function NavUserWithTeams({ const { isMobile } = useSidebar(); const { data: accounts } = useAccounts(); const [showNewTeamDialog, setShowNewTeamDialog] = React.useState(false); + const [showBillingModal, setShowBillingModal] = React.useState(false); const { theme, setTheme } = useTheme(); // Prepare personal account and team accounts @@ -287,6 +290,10 @@ export function NavUserWithTeams({ {/* User Settings Section */} + setShowBillingModal(true)}> + + Upgrade + @@ -352,6 +359,13 @@ export function NavUserWithTeams({ + + {/* Billing Modal */} + ); }