From 9e0275a11a0915e24a1cadec3aa731fe10db2c57 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 10 May 2026 01:11:51 +0800 Subject: [PATCH] prompt the user for confirmation before updating the last reconciled time to the current time --- src/locales/de.json | 1 + src/locales/en.json | 1 + src/locales/es.json | 1 + src/locales/fr.json | 1 + src/locales/it.json | 1 + src/locales/ja.json | 1 + src/locales/kn.json | 1 + src/locales/ko.json | 1 + src/locales/nl.json | 1 + src/locales/pt_BR.json | 1 + src/locales/ru.json | 1 + src/locales/sl.json | 1 + src/locales/ta.json | 1 + src/locales/th.json | 1 + src/locales/tr.json | 1 + src/locales/uk.json | 1 + src/locales/vi.json | 1 + src/locales/zh_Hans.json | 1 + src/locales/zh_Hant.json | 1 + src/views/desktop/accounts/ListPage.vue | 26 ++++++++-------- src/views/mobile/accounts/ListPage.vue | 40 +++++++++++++------------ 21 files changed, 54 insertions(+), 31 deletions(-) diff --git a/src/locales/de.json b/src/locales/de.json index 05130f85..97495dfc 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Konto kann nicht hinzugefügt werden", "Unable to save account": "Konto kann nicht gespeichert werden", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Versteckte Konten anzeigen", diff --git a/src/locales/en.json b/src/locales/en.json index 6270566c..49bccd47 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Unable to add account", "Unable to save account": "Unable to save account", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Show Hidden Accounts", diff --git a/src/locales/es.json b/src/locales/es.json index da00b8ac..11328694 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -1946,6 +1946,7 @@ "Unable to add account": "No se puede agregar la cuenta", "Unable to save account": "No se puede guardar la cuenta", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Mostrar Cuentas Ocultas", diff --git a/src/locales/fr.json b/src/locales/fr.json index da802ad9..ff0e3457 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Impossible d'ajouter le compte", "Unable to save account": "Impossible d'enregistrer le compte", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Afficher les comptes masqués", diff --git a/src/locales/it.json b/src/locales/it.json index 7b37a900..4cf1e41d 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Impossibile aggiungere l'account", "Unable to save account": "Impossibile salvare l'account", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Mostra account nascosti", diff --git a/src/locales/ja.json b/src/locales/ja.json index 088d5b3b..e2ca4e9d 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1946,6 +1946,7 @@ "Unable to add account": "口座を追加できません", "Unable to save account": "口座を保存できません", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "非表示口座を表示します", diff --git a/src/locales/kn.json b/src/locales/kn.json index b700996f..948b6597 100644 --- a/src/locales/kn.json +++ b/src/locales/kn.json @@ -1946,6 +1946,7 @@ "Unable to add account": "ಖಾತೆ ಸೇರಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ", "Unable to save account": "ಖಾತೆ ಉಳಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "ಮರೆಮಾಡಿದ ಖಾತೆಗಳನ್ನು ತೋರಿಸಿ", diff --git a/src/locales/ko.json b/src/locales/ko.json index d380529e..29facf46 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1946,6 +1946,7 @@ "Unable to add account": "계좌를 추가할 수 없습니다.", "Unable to save account": "계좌를 저장할 수 없습니다.", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "숨겨진 계좌 표시", diff --git a/src/locales/nl.json b/src/locales/nl.json index be283792..fb23e139 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Kan rekening niet toevoegen", "Unable to save account": "Kan rekening niet opslaan", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Verborgen rekeningen tonen", diff --git a/src/locales/pt_BR.json b/src/locales/pt_BR.json index bc700573..0f283599 100644 --- a/src/locales/pt_BR.json +++ b/src/locales/pt_BR.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Não foi possível adicionar conta", "Unable to save account": "Não foi possível salvar conta", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Mostrar Contas Ocultas", diff --git a/src/locales/ru.json b/src/locales/ru.json index d08405ae..f0ea192f 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Не удалось добавить счет", "Unable to save account": "Не удалось сохранить счет", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Показать скрытые счета", diff --git a/src/locales/sl.json b/src/locales/sl.json index 68b115e1..0d03b363 100644 --- a/src/locales/sl.json +++ b/src/locales/sl.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Računa ni mogoče dodati", "Unable to save account": "Računa ni mogoče shraniti", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Prikaži skrite račune", diff --git a/src/locales/ta.json b/src/locales/ta.json index 7a54d145..6f23f088 100644 --- a/src/locales/ta.json +++ b/src/locales/ta.json @@ -1946,6 +1946,7 @@ "Unable to add account": "கணக்கு சேர்க்க முடியவில்லை", "Unable to save account": "கணக்கு சேமிக்க முடியவில்லை", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "மறைந்த கணக்குகளை காட்டு", diff --git a/src/locales/th.json b/src/locales/th.json index 312bacec..fe9af3ce 100644 --- a/src/locales/th.json +++ b/src/locales/th.json @@ -1946,6 +1946,7 @@ "Unable to add account": "ไม่สามารถเพิ่มบัญชีได้", "Unable to save account": "ไม่สามารถบันทึกบัญชีได้", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "แสดงบัญชีที่ซ่อนอยู่", diff --git a/src/locales/tr.json b/src/locales/tr.json index 317f5cca..1ce495f3 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Hesap eklenemedi", "Unable to save account": "Hesap kaydedilemedi", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Gizli Hesapları Göster", diff --git a/src/locales/uk.json b/src/locales/uk.json index 0fe85f03..0d6cde9b 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Не вдалося додати рахунок", "Unable to save account": "Не вдалося зберегти рахунок", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Показати приховані рахунки", diff --git a/src/locales/vi.json b/src/locales/vi.json index cd76ca3a..57785ddc 100644 --- a/src/locales/vi.json +++ b/src/locales/vi.json @@ -1946,6 +1946,7 @@ "Unable to add account": "Không thể thêm tài khoản", "Unable to save account": "Không thể lưu tài khoản", "Mark as Reconciled": "Mark as Reconciled", + "Are you sure you want to update the last reconciled time of this account to the current time?": "Are you sure you want to update the last reconciled time of this account to the current time?", "Last reconciled time have been updated": "Last reconciled time have been updated", "Unable to update last reconciled time": "Unable to update last reconciled time", "Show Hidden Accounts": "Hiển thị tài khoản ẩn", diff --git a/src/locales/zh_Hans.json b/src/locales/zh_Hans.json index e075fecc..c0c85134 100644 --- a/src/locales/zh_Hans.json +++ b/src/locales/zh_Hans.json @@ -1946,6 +1946,7 @@ "Unable to add account": "无法添加账户", "Unable to save account": "无法保存账户", "Mark as Reconciled": "标记为已对账", + "Are you sure you want to update the last reconciled time of this account to the current time?": "您确定要将该账户的最后对账时间更新为当前时间吗?", "Last reconciled time have been updated": "最后对账时间已更新", "Unable to update last reconciled time": "无法更新最后对账时间", "Show Hidden Accounts": "显示隐藏的账户", diff --git a/src/locales/zh_Hant.json b/src/locales/zh_Hant.json index 541f6119..6ae8d58a 100644 --- a/src/locales/zh_Hant.json +++ b/src/locales/zh_Hant.json @@ -1946,6 +1946,7 @@ "Unable to add account": "無法新增帳戶", "Unable to save account": "無法儲存帳戶", "Mark as Reconciled": "標記為已對帳", + "Are you sure you want to update the last reconciled time of this account to the current time?": "您確定要將此帳戶的最後對帳時間更新為目前時間吗?", "Last reconciled time have been updated": "最後對帳時間已更新", "Unable to update last reconciled time": "無法更新最後對帳時間", "Show Hidden Accounts": "顯示隱藏的帳戶", diff --git a/src/views/desktop/accounts/ListPage.vue b/src/views/desktop/accounts/ListPage.vue index 77d56abc..77adf1fc 100644 --- a/src/views/desktop/accounts/ListPage.vue +++ b/src/views/desktop/accounts/ListPage.vue @@ -568,22 +568,24 @@ function showReconciliationStatementCustomDateRangeDialog(account: Account, date } function updateLastReconciledTime(account: Account): void { - loading.value = true; + confirmDialog.value?.open('Are you sure you want to update the last reconciled time of this account to the current time?').then(() => { + loading.value = true; - accountsStore.updateAccountLastReconciledTime(account.id, getCurrentUnixTime()).then(() => { - loading.value = false; - snackbar.value?.showMessage('Last reconciled time have been updated'); + accountsStore.updateAccountLastReconciledTime(account.id, getCurrentUnixTime()).then(() => { + loading.value = false; + snackbar.value?.showMessage('Last reconciled time have been updated'); - if (accountsStore.accountListStateInvalid && !loading.value) { - reload(false); - } + if (accountsStore.accountListStateInvalid && !loading.value) { + reload(false); + } - }).catch(error => { - loading.value = false; + }).catch(error => { + loading.value = false; - if (error) { - snackbar.value?.showError(error); - } + if (error) { + snackbar.value?.showError(error); + } + }); }); } diff --git a/src/views/mobile/accounts/ListPage.vue b/src/views/mobile/accounts/ListPage.vue index 295aae0e..bd1693bc 100644 --- a/src/views/mobile/accounts/ListPage.vue +++ b/src/views/mobile/accounts/ListPage.vue @@ -245,7 +245,7 @@ const props = defineProps<{ }>(); const { tt, getCurrentLanguageTextDirection } = useI18n(); -const { showAlert, showToast, routeBackOnError } = useI18nUIComponents(); +const { showAlert, showConfirm, showToast, routeBackOnError } = useI18nUIComponents(); const { loading, @@ -381,28 +381,30 @@ function updateLastReconciledTime(account: Account | null): void { return; } - updatingLastReconciledTime.value = true; - showLoading(() => updatingLastReconciledTime.value); + showConfirm('Are you sure you want to update the last reconciled time of this account to the current time?', () => { + updatingLastReconciledTime.value = true; + showLoading(() => updatingLastReconciledTime.value); - accountsStore.updateAccountLastReconciledTime(account.id, getCurrentUnixTime()).then(() => { - updatingLastReconciledTime.value = false; - hideLoading(); - showToast('Last reconciled time have been updated'); + accountsStore.updateAccountLastReconciledTime(account.id, getCurrentUnixTime()).then(() => { + updatingLastReconciledTime.value = false; + hideLoading(); + showToast('Last reconciled time have been updated'); - if (accountsStore.accountListStateInvalid && !loading.value) { - reload(); - } - }).catch(error => { - updatingLastReconciledTime.value = false; - hideLoading(); + if (accountsStore.accountListStateInvalid && !loading.value) { + reload(); + } + }).catch(error => { + updatingLastReconciledTime.value = false; + hideLoading(); - if (!error.processed) { - showToast(error.message || error); - } + if (!error.processed) { + showToast(error.message || error); + } + }); + + showAccountMoreActionSheet.value = false; + accountForMoreActionSheet.value = null; }); - - showAccountMoreActionSheet.value = false; - accountForMoreActionSheet.value = null; } function moveAllTransactions(account: Account | null): void {