diff --git a/app/(dashboard)/import/page.tsx b/app/(dashboard)/import/page.tsx index 474f3911..6928df6a 100644 --- a/app/(dashboard)/import/page.tsx +++ b/app/(dashboard)/import/page.tsx @@ -1955,13 +1955,12 @@ const StripePanel = getSettingsPanel('stripe') type ImportMode = null | 'psd2' | 'stripe' | 'bank' | 'sie' | 'csv_data' | 'migration' export default function ImportPage() { - const { company } = useCompany() + const { isSandbox } = useCompany() const [mode, setMode] = useState(null) const [view, setView] = useState<'import' | 'export'>('import') const [sieDialogOpen, setSieDialogOpen] = useState(false) const [cloudOpen, setCloudOpen] = useState(false) const [userId, setUserId] = useState('') - const [isSandbox, setIsSandbox] = useState(false) const [exportPeriodId, setExportPeriodId] = useState(null) const [exportExcludeClosing, setExportExcludeClosing] = useState(true) const t = useTranslations('import') @@ -1969,21 +1968,11 @@ export default function ImportPage() { const hasCloudBackup = ENABLED_EXTENSION_IDS.has('cloud-backup') const hasBankSync = useCapability(CAPABILITY.bank_sync) - // Fetch authenticated user ID and sandbox status + // Fetch authenticated user ID (used by the migration wizard) useEffect(() => { const supabase = createClient() supabase.auth.getUser().then(({ data: { user } }) => { - if (!user) return - setUserId(user.id) - if (!company) return - supabase - .from('company_settings') - .select('is_sandbox') - .eq('company_id', company.id) - .single() - .then(({ data }) => { - if (data?.is_sandbox) setIsSandbox(true) - }) + if (user) setUserId(user.id) }) }, []) @@ -2039,10 +2028,8 @@ export default function ImportPage() { const hasBankingExtension = ENABLED_EXTENSION_IDS.has('enable-banking') const hasMigrationExtension = ENABLED_EXTENSION_IDS.has('arcim-migration') const hasStripeExtension = ENABLED_EXTENSION_IDS.has('stripe') - // Hosted: Stripe Connect has not launched, so the card is "coming soon". - // The panel carries the same gate internally for ?mode=stripe deep links. - const isSelfHosted = process.env.NEXT_PUBLIC_SELF_HOSTED === 'true' - const stripeDisabled = isSandbox || !isSelfHosted + // Stripe is enabled everywhere (hosted + self-hosted); only the sandbox blocks it. + const stripeDisabled = isSandbox return (
@@ -2109,13 +2096,7 @@ export default function ImportPage() { - {t('stripe_coming_soon')} - - ) : undefined - } + chips={} disabled={stripeDisabled} onClick={() => setMode('stripe')} /> diff --git a/extensions/general/stripe/components/StripeSettingsPanel.tsx b/extensions/general/stripe/components/StripeSettingsPanel.tsx index 87e71c99..808d1552 100644 --- a/extensions/general/stripe/components/StripeSettingsPanel.tsx +++ b/extensions/general/stripe/components/StripeSettingsPanel.tsx @@ -7,7 +7,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Switch } from '@/components/ui/switch' -import { EmptyState } from '@/components/ui/empty-state' import { Skeleton } from '@/components/ui/skeleton' import { useToast } from '@/components/ui/use-toast' import { useFormat } from '@/lib/hooks/use-format' @@ -217,25 +216,6 @@ export default function StripeSettingsPanel() { } } - // Hosted: Stripe Connect is not launched yet, so the settings surface is - // "coming soon" even where the platform credentials are configured (test - // mode): users must not be able to connect or toggle transaction sync until - // launch. Self-hosted admins run their own keys and keep the full panel. - const isSelfHosted = process.env.NEXT_PUBLIC_SELF_HOSTED === 'true' - if (!isSelfHosted) { - return ( - - - - - - ) - } - if (loading) { return ( diff --git a/public/icons/stripe.webp b/public/icons/stripe.webp new file mode 100644 index 00000000..ed9193cc Binary files /dev/null and b/public/icons/stripe.webp differ diff --git a/public/logos/stripe.svg b/public/logos/stripe.svg new file mode 100644 index 00000000..e1fd0e12 --- /dev/null +++ b/public/logos/stripe.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file