From 64caf0f28b070e8ad6528a9c758814d9525d9be9 Mon Sep 17 00:00:00 2001 From: Alec Bakholdin <43560338+alecbakholdin@users.noreply.github.com> Date: Thu, 8 May 2025 11:42:27 -0400 Subject: [PATCH] Last reconciled date not visible mobile (#4922) * added last reconciled note to the reconciliation popup * release notes * Update packages/desktop-client/src/components/accounts/Reconcile.tsx Co-authored-by: Julian Dominguez-Schatz * bumped up padding * yarn lint --------- Co-authored-by: Julian Dominguez-Schatz Co-authored-by: Alec Bakholdin --- .../src/components/accounts/Reconcile.tsx | 15 ++++++++++++++- upcoming-release-notes/4922.md | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/4922.md diff --git a/packages/desktop-client/src/components/accounts/Reconcile.tsx b/packages/desktop-client/src/components/accounts/Reconcile.tsx index e20d1fe7a4..9610c83344 100644 --- a/packages/desktop-client/src/components/accounts/Reconcile.tsx +++ b/packages/desktop-client/src/components/accounts/Reconcile.tsx @@ -9,13 +9,15 @@ import { styles } from '@actual-app/components/styles'; import { Text } from '@actual-app/components/text'; import { theme } from '@actual-app/components/theme'; import { View } from '@actual-app/components/view'; +import { t } from 'i18next'; import * as queries from 'loot-core/client/queries'; import { type Query } from 'loot-core/shared/query'; -import { currencyToInteger } from 'loot-core/shared/util'; +import { currencyToInteger, tsToRelativeTime } from 'loot-core/shared/util'; import { type AccountEntity } from 'loot-core/types/models'; import { type TransObjectLiteral } from 'loot-core/types/util'; +import { useLocale } from '../../hooks/useLocale'; import { useFormat } from '../spreadsheet/useFormat'; import { useSheetValue } from '../spreadsheet/useSheetValue'; @@ -132,6 +134,7 @@ export function ReconcileMenu({ query: balanceQuery.query.filter({ cleared: true }), }); const format = useFormat(); + const locale = useLocale(); const [inputValue, setInputValue] = useState(null); function onSubmit() { @@ -164,6 +167,16 @@ export function ReconcileMenu({ /> )} + + {account?.last_reconciled + ? t('Reconciled {{ relativeTimeAgo }}', { + relativeTimeAgo: tsToRelativeTime( + account.last_reconciled, + locale, + ), + }) + : t('Not yet reconciled')} + diff --git a/upcoming-release-notes/4922.md b/upcoming-release-notes/4922.md new file mode 100644 index 0000000000..5d16a88ac1 --- /dev/null +++ b/upcoming-release-notes/4922.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [alecbakholdin] +--- + +Improved visibility for reconciliation popover