From 176cc4d7e6ea6858eaa57d737c119feb8a28d463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Fri, 19 Jun 2026 12:42:31 +0200 Subject: [PATCH] feat(connections): create a new account from the manage-accounts selector Replace the separate 'Create account' / 'Link to existing' buttons on the discovered-account card with a single selector. It lists 'Create new account' first, followed by the compatible existing manual accounts, so picking a destination (new or existing) is one control instead of two overflowing buttons. Also stack the 'Add accounts' header on mobile (title/description, then a full-width 'Load accounts' button) and keep it a row on sm+. Backend is unchanged: ConnectionAccountController@map already supported both 'create' and 'link' actions; this only re-routes the same calls through the selector. --- .../js/pages/open-banking/manage-accounts.tsx | 86 ++++++++----------- 1 file changed, 34 insertions(+), 52 deletions(-) diff --git a/resources/js/pages/open-banking/manage-accounts.tsx b/resources/js/pages/open-banking/manage-accounts.tsx index e193feb5..0eabe54b 100644 --- a/resources/js/pages/open-banking/manage-accounts.tsx +++ b/resources/js/pages/open-banking/manage-accounts.tsx @@ -28,6 +28,7 @@ import { Select, SelectContent, SelectItem, + SelectSeparator, SelectTrigger, SelectValue, } from '@/components/ui/select'; @@ -40,13 +41,7 @@ import { filterTransactionalAccounts } from '@/types/account'; import type { BankingConnection, DiscoveredBankAccount } from '@/types/banking'; import { __ } from '@/utils/i18n'; import { Head, Link, router, usePage } from '@inertiajs/react'; -import { - ArrowLeft, - MoreHorizontal, - Plus, - RefreshCw, - Unplug, -} from 'lucide-react'; +import { ArrowLeft, MoreHorizontal, RefreshCw, Unplug } from 'lucide-react'; import { useEffect, useState } from 'react'; import { toast } from 'sonner'; @@ -194,7 +189,7 @@ export default function ManageAccountsPage({
-
+

{__('Add accounts')} @@ -207,6 +202,7 @@ export default function ManageAccountsPage({

- )} - -
+ - {linking && targets.length > 0 && ( - - - - )} ); }