diff --git a/src/components/MenuBar.vue b/src/components/MenuBar.vue
index 57494d1..46ef725 100644
--- a/src/components/MenuBar.vue
+++ b/src/components/MenuBar.vue
@@ -12,7 +12,8 @@
-
+
@@ -30,9 +31,9 @@
-
-
-
+
+
+
@@ -53,7 +54,8 @@
-
@@ -102,16 +104,19 @@ watch(
selectedSpace,
(newValue, oldValue) => {
if (newValue) {
- items.value.push({
- label: 'Запись',
- icon: 'pi pi-plus',
- url:'',
- command: () => {
- drawerStore.setCategoryType('EXPENSE');
- drawerStore.setTransactionType('INSTANT');
- drawerStore.visible = true
- }
- })
+ const item = items.value.find((item) => item.label == 'Запись')
+ if (!item) {
+ items.value.push({
+ label: 'Запись',
+ icon: 'pi pi-plus',
+ url: '',
+ command: () => {
+ drawerStore.setCategoryType('EXPENSE');
+ drawerStore.setTransactionType('INSTANT');
+ drawerStore.visible = true
+ }
+ })
+ }
}
}
)