Skip to content

Commit a743e3f

Browse files
committed
refactor: merge VAT into the Payouts settings section
1 parent 08a5e87 commit a743e3f

4 files changed

Lines changed: 15 additions & 42 deletions

File tree

frontend/src/components/routes/organizer/Payments/Vat/VatSettings.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export const VatSettings = ({organizerId, stripeCountry}: VatSettingsProps) => {
1616
const vatInfo = getVatInfo(stripeCountry);
1717

1818
if (!vatInfo.isEU) {
19-
return (
20-
<Text size="sm" c="dimmed">
21-
{t`VAT does not apply because your Stripe account is outside the EU.`}
22-
</Text>
23-
);
19+
return null;
2420
}
2521

2622
const existingSettings = vatSettingQuery.data;

frontend/src/components/routes/organizer/Settings/Sections/PayoutsSettings/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ import {OrganizerStripeConnectAccount, ReusableStripeConnection} from "../../../
4040
import {showError, showSuccess} from "../../../../../../utilites/notifications";
4141
import {CapabilityList} from "../../../Payments/CapabilityList";
4242
import {RequirementsList} from "../../../Payments/RequirementsList";
43+
import {VatSettings as VatSettingsBody} from "../../../Payments/Vat/VatSettings";
44+
import {getVatInfo} from "../../../Payments/Vat/VatNotice";
4345
import classes from "../../../Payments/Payments.module.scss";
4446

4547
const summarizeActiveCapabilities = (capabilities: Record<string, string>): number => {
@@ -384,6 +386,17 @@ export const PayoutsSettings = () => {
384386
<RequirementsList items={account.requirements.eventually_due} severity="eventually"/>
385387
</Alert>
386388
)}
389+
390+
{organizerId && getVatInfo(account.country).isEU && (
391+
<Box mt="xl">
392+
<Divider mb="md"/>
393+
<Title order={4} mb={4}>{t`VAT`}</Title>
394+
<Text c="dimmed" size="sm" mb="md">
395+
{t`How VAT is applied to the platform fees we charge you.`}
396+
</Text>
397+
<VatSettingsBody organizerId={organizerId} stripeCountry={account.country}/>
398+
</Box>
399+
)}
387400
</>
388401
);
389402
};

frontend/src/components/routes/organizer/Settings/Sections/VatSettings/index.tsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

frontend/src/components/routes/organizer/Settings/index.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import { AddressSettings } from "./Sections/AddressSettings";
55
import EmailTemplateSettings from "./Sections/EmailTemplateSettings";
66
import { EventDefaults } from "./Sections/EventDefaults";
77
import { PayoutsSettings } from "./Sections/PayoutsSettings";
8-
import { VatSettings } from "./Sections/VatSettings";
98
import { PlatformFeesSettings } from "./Sections/PlatformFeesSettings";
109
import { DangerZoneSettings } from "./Sections/DangerZoneSettings";
1110
import { TrackingPixelSettings } from "./Sections/TrackingPixelSettings";
1211
import { PageBody } from "../../../common/PageBody";
1312
import { PageTitle } from "../../../common/PageTitle";
1413
import { t } from "@lingui/macro";
1514
import { Box, Group, NavLink as MantineNavLink, Stack } from "@mantine/core";
16-
import { IconAlertTriangle, IconBrandGoogleAnalytics, IconBrandStripe, IconInfoCircle, IconMapPin, IconReceipt, IconShare, IconMail, IconCalendarEvent, IconPercentage, IconChartBar } from "@tabler/icons-react";
15+
import { IconAlertTriangle, IconBrandGoogleAnalytics, IconBrandStripe, IconInfoCircle, IconMapPin, IconShare, IconMail, IconCalendarEvent, IconPercentage, IconChartBar } from "@tabler/icons-react";
1716
import { useMediaQuery } from "@mantine/hooks";
1817
import { useEffect, useMemo, useState } from "react";
1918
import { Card } from "../../../common/Card";
@@ -92,12 +91,6 @@ const Settings = () => {
9291
icon: IconBrandStripe,
9392
component: PayoutsSettings,
9493
},
95-
{
96-
id: 'vat',
97-
label: t`VAT`,
98-
icon: IconReceipt,
99-
component: VatSettings,
100-
},
10194
{
10295
id: 'platform-fees',
10396
label: t`Platform Fees`,

0 commit comments

Comments
 (0)