From 4dec8113fed51ec48e2b92bfb26325c357ec0bbf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:43:56 +0000 Subject: [PATCH] Implement mobile UI improvements with status indicators and responsive layout Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com> --- frontend/src/components/AccountsOverview.tsx | 67 ++++++++++++++++++-- 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/AccountsOverview.tsx b/frontend/src/components/AccountsOverview.tsx index a12c058..cbb2e79 100644 --- a/frontend/src/components/AccountsOverview.tsx +++ b/frontend/src/components/AccountsOverview.tsx @@ -16,6 +16,40 @@ import { formatCurrency, formatDate } from "../lib/utils"; import LoadingSpinner from "./LoadingSpinner"; import type { Account, Balance } from "../types/api"; +// Helper function to get status indicator color and styles +const getStatusIndicator = (status: string) => { + const statusLower = status.toLowerCase(); + + switch (statusLower) { + case 'ready': + return { + color: 'bg-green-500', + tooltip: 'Ready', + }; + case 'pending': + return { + color: 'bg-yellow-500', + tooltip: 'Pending', + }; + case 'error': + case 'failed': + return { + color: 'bg-red-500', + tooltip: 'Error', + }; + case 'inactive': + return { + color: 'bg-gray-500', + tooltip: 'Inactive', + }; + default: + return { + color: 'bg-blue-500', + tooltip: status, + }; + } +}; + export default function AccountsOverview() { const { data: accounts, @@ -247,7 +281,7 @@ export default function AccountsOverview() {
- {account.institution_id} • {account.status} + {account.institution_id}
) : ( @@ -265,7 +299,7 @@ export default function AccountsOverview() {- {account.institution_id} • {account.status} + {account.institution_id}
{account.iban && (@@ -279,7 +313,30 @@ export default function AccountsOverview() { {/* Balance and date section */}
+ Updated{" "} + {formatDate(account.last_accessed || account.created)} +
+- Updated{" "} - {formatDate(account.last_accessed || account.created)} -