diff --git a/resources/js/pages/settings/account.tsx b/resources/js/pages/settings/account.tsx index c412be12..08bae3fb 100644 --- a/resources/js/pages/settings/account.tsx +++ b/resources/js/pages/settings/account.tsx @@ -23,7 +23,7 @@ import { useRef, useState } from 'react'; const breadcrumbs: BreadcrumbItem[] = [ { - title: 'Account settings', + title: 'Bank accounts', href: accountEdit().url, }, ]; @@ -57,7 +57,7 @@ export default function Account({ return ( - +
@@ -132,12 +132,12 @@ export default function Account({ {status === 'verification-link-sent' && ( -
- A new verification link has - been sent to your email - address. -
- )} +
+ A new verification link has + been sent to your email + address. +
+ )}
)} diff --git a/resources/js/pages/settings/accounts.tsx b/resources/js/pages/settings/accounts.tsx index 73f2143c..99614188 100644 --- a/resources/js/pages/settings/accounts.tsx +++ b/resources/js/pages/settings/accounts.tsx @@ -42,17 +42,24 @@ import { import AppLayout from '@/layouts/app-layout'; import SettingsLayout from '@/layouts/settings/layout'; import { db } from '@/lib/dexie-db'; +import { accountSyncService } from '@/services/account-sync'; import { type BreadcrumbItem } from '@/types'; import { type Account, formatAccountType } from '@/types/account'; const breadcrumbs: BreadcrumbItem[] = [ { - title: 'Accounts settings', + title: 'Bank accounts', href: accountsIndex.url(), }, ]; -function AccountActions({ account }: { account: Account }) { +function AccountActions({ + account, + onSuccess, +}: { + account: Account; + onSuccess?: () => void; +}) { const [editOpen, setEditOpen] = useState(false); const [deleteOpen, setDeleteOpen] = useState(false); @@ -83,13 +90,13 @@ function AccountActions({ account }: { account: Account }) { account={account} open={editOpen} onOpenChange={setEditOpen} - onSuccess={() => {}} + onSuccess={onSuccess} /> {}} + onSuccess={onSuccess} /> ); @@ -103,6 +110,10 @@ export default function Accounts() { {}, ); + const handleAccountCreated = async () => { + await accountSyncService.sync(); + }; + const columns: ColumnDef[] = [ { accessorKey: 'name', @@ -180,7 +191,7 @@ export default function Accounts() { cell: ({ row }) => ( ), }, @@ -205,12 +216,12 @@ export default function Accounts() { return ( - +
@@ -230,7 +241,7 @@ export default function Accounts() { } className="max-w-sm" /> - +
@@ -249,12 +260,12 @@ export default function Accounts() { {header.isPlaceholder ? null : flexRender( - header - .column - .columnDef - .header, - header.getContext(), - )} + header + .column + .columnDef + .header, + header.getContext(), + )} ); },