Skip to content

Open source personal finance application

fix: close popover menu before navigating to edit page

Ilya Komicheve69cf4b7f83b
diff --git a/app/components/categories/StatPage.vue b/app/components/categories/StatPage.vue
index 807c30f5..e03876d1 100644
--- a/app/components/categories/StatPage.vue
+++ b/app/components/categories/StatPage.vue
@@ -94,11 +94,11 @@ useHead({ title: category.value?.name })
/>
</template>
- <template #popover>
+ <template #popover="{ close }">
<UiHeaderLink
v-if="categoryId !== 'transfer'"
icon="lucide:pencil"
- @click="router.push(`/categories/${categoryId}/edit`)"
+ @click="close(); router.push(`/categories/${categoryId}/edit`)"
>
{{ t('base.edit') }}
</UiHeaderLink>
diff --git a/app/components/wallets/page/id/Index.vue b/app/components/wallets/page/id/Index.vue
index 9a1e3685..d129d57c 100644
--- a/app/components/wallets/page/id/Index.vue
+++ b/app/components/wallets/page/id/Index.vue
@@ -67,7 +67,8 @@ onActivated(() => trnsFormStore.values.walletId = walletId.value)
const total = computed(() => walletsStore.itemsComputed[walletId.value]?.amount ?? 0)
const walletCreditLimit = computed(() => wallet.value?.type === 'credit' ? wallet.value.creditLimit : 0)
-function onClickEdit() {
+function onClickEdit(close: () => void) {
+ close()
router.push(`/wallets/${walletId.value}/edit`)
}
@@ -135,7 +136,7 @@ async function onDeleteConfirm() {
<template #popover="{ close }">
<UiHeaderLink
icon="lucide:pencil"
- @click="onClickEdit"
+ @click="onClickEdit(close)"
>
{{ t('base.edit') }}
</UiHeaderLink>
diff --git a/package.json b/package.json
index eed7022a..99ef94bd 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@ilkome/finapp",
"type": "module",
- "version": "7.0.0-beta.6",
+ "version": "7.0.0-beta.7",
"packageManager": "[email protected]",
"description": "Finapp helps you easily track and manage personal finances.",
"author": "Ilya Komichev @ilkome",