diff --git a/admin-spa/src/routes/Settings/Payments.tsx b/admin-spa/src/routes/Settings/Payments.tsx index 55ded37..c0a8ba5 100644 --- a/admin-spa/src/routes/Settings/Payments.tsx +++ b/admin-spa/src/routes/Settings/Payments.tsx @@ -113,8 +113,8 @@ export default function PaymentsPage() { // Categorize gateways const manualGateways = gateways.filter((g: PaymentGateway) => g.type === 'manual'); - const providerGateways = gateways.filter((g: PaymentGateway) => g.type === 'provider'); - const otherGateways = gateways.filter((g: PaymentGateway) => g.type === 'other'); + // Combine provider and other into single "3rd party" category + const thirdPartyGateways = gateways.filter((g: PaymentGateway) => g.type === 'provider' || g.type === 'other'); if (isLoading) { return ( @@ -128,9 +128,10 @@ export default function PaymentsPage() { return ( <> - - {/* Refresh button */} -
+ Refresh -
+ } + > {/* Manual Payment Methods - First priority */} - {/* Payment Providers - Second priority */} - - {providerGateways.length === 0 ? ( -

- No payment providers installed.{' '} - - Browse payment gateways - - -

- ) : ( + {/* 3rd Party Payment Methods - All online payment gateways */} + {thirdPartyGateways.length > 0 && ( +
- {providerGateways.map((gateway: PaymentGateway) => ( + {thirdPartyGateways.map((gateway: PaymentGateway) => (
○ Disabled )}
-

- {gateway.description} -

+ {gateway.method_description && ( +

+ {gateway.method_description} +

+ )} {!gateway.requirements.met && ( @@ -270,57 +261,6 @@ export default function PaymentsPage() {
))} - )} -
- - {/* 3rd Party Gateways */} - {otherGateways.length > 0 && ( - -
- {otherGateways.map((gateway: PaymentGateway) => ( -
-
-
-
- -
-
-

{gateway.method_title || gateway.title}

- {gateway.method_description && ( -

- {gateway.method_description} -

- )} -
-
-
- {gateway.enabled && ( - - )} - handleToggle(gateway.id, checked)} - disabled={togglingGateway === gateway.id} - /> -
-
-
- ))} -
)}
@@ -332,7 +272,7 @@ export default function PaymentsPage() { {selectedGateway.title} Settings -
+
{/* Footer outside scrollable area */} -
+
-
+
diff --git a/admin-spa/src/routes/Settings/components/SettingsLayout.tsx b/admin-spa/src/routes/Settings/components/SettingsLayout.tsx index 556e4b0..3208703 100644 --- a/admin-spa/src/routes/Settings/components/SettingsLayout.tsx +++ b/admin-spa/src/routes/Settings/components/SettingsLayout.tsx @@ -9,6 +9,7 @@ interface SettingsLayoutProps { onSave?: () => Promise; saveLabel?: string; isLoading?: boolean; + action?: React.ReactNode; } export function SettingsLayout({ @@ -18,6 +19,7 @@ export function SettingsLayout({ onSave, saveLabel = 'Save changes', isLoading = false, + action, }: SettingsLayoutProps) { const [isSaving, setIsSaving] = useState(false); @@ -62,10 +64,15 @@ export function SettingsLayout({
{!onSave && (
-

{title}

- {description && ( -

{description}

- )} +
+
+

{title}

+ {description && ( +

{description}

+ )} +
+ {action &&
{action}
} +
)}