From 6cb8d115631d41d01f0dee025092decc4c31e01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Fri, 19 Jun 2026 12:49:03 +0200 Subject: [PATCH] feat(connections): create a new account from the manage-accounts selector (#560) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What In the per-connection **Manage accounts** screen, the discovered-account card now uses a single selector to choose where a newly detected bank account syncs. The selector lists **"Create new account"** first, followed by the compatible existing manual accounts — replacing the previous separate "Create account" / "Link to existing" buttons. The **"Add accounts"** header now stacks vertically on mobile (title/description, then a full-width "Load accounts" button) and stays a row on `sm+`. ## Why Consolidating *create* and *link* into the same control matches how users think about the action ("where should this account go?") and removes the two side-by-side buttons that overflowed horizontally on small screens. ## Notes - **Backend unchanged**: `ConnectionAccountController@map` already supported both `action: create` and `action: link`. This only re-routes the same calls through the selector (`existingAccountId === null` → create). Covered by existing tests in `tests/Feature/OpenBanking/ConnectionAccountTest.php` (9 passing). - **No new i18n keys**: reuses the existing `Create new account` and `Select an account` translations. ## Screens The "Manage accounts" link lives in the per-connection "…" menu and is gated behind the `ManageBankAccounts` feature flag (admin-only during rollout). --- .../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 && ( - - - - )} ); }