Skip to content

Open source personal finance application

chore (groups): update

ilkomeee898422d8b3
diff --git a/components/trns/Modal.vue b/components/trns/Modal.vue
index f47b6ada..b4f4fe85 100644
--- a/components/trns/Modal.vue
+++ b/components/trns/Modal.vue
@@ -187,7 +187,7 @@ Portal(
to="modal"
)
ModalBottom(
- :title="$t('groups.name')"
+ :title="$t('groups.title')"
paddingless
@onClose="showModalGroups = false"
)
diff --git a/locales/en-US.js b/locales/en-US.js
index 183b10f3..574072de 100644
--- a/locales/en-US.js
+++ b/locales/en-US.js
@@ -325,7 +325,7 @@ export default {
groups: {
id: 'groups',
- name: 'Groups',
+ title: 'Groups',
show: 'Show groups',
form: {
title: 'Create new group',
diff --git a/locales/ru-RU.js b/locales/ru-RU.js
index d42058e7..d66bd327 100644
--- a/locales/ru-RU.js
+++ b/locales/ru-RU.js
@@ -327,7 +327,7 @@ export default {
groups: {
id: 'groups',
- name: 'Группы',
+ title: 'Группы',
show: 'Показать группы',
form: {
title: 'Create new group',
diff --git a/store/trnForm/actions.js b/store/trnForm/actions.js
index bdd339e7..b407ebcc 100644
--- a/store/trnForm/actions.js
+++ b/store/trnForm/actions.js
@@ -12,6 +12,7 @@ export default {
commit('openTrnForm')
switch (action) {
case 'create':
+ // get data from last trn
if (rootGetters['trns/hasTrns'] && rootState.trns.items[rootGetters['trns/lastCreatedTrnId']]) {
const lastTrn = rootState.trns.items[rootGetters['trns/lastCreatedTrnId']]
commit('setTrnFormValues', {
@@ -20,6 +21,7 @@ export default {
categoryId: lastTrn.categoryId,
date: dayjs().valueOf(),
description: null,
+ groups: null,
trnId: null,
walletId: lastTrn.walletId
})
@@ -36,6 +38,7 @@ export default {
categoryId,
date: dayjs().valueOf(),
description: null,
+ groups: null,
trnId: null,
walletId
})
@@ -57,9 +60,10 @@ export default {
categoryId: trn.categoryId,
date: trn.date,
description: trn.description || null,
+ groups: null,
trnId,
- walletId: trn.walletId,
walletFromId: trn.walletFromId,
+ walletId: trn.walletId,
walletToId: trn.walletToId
})
}
@@ -72,6 +76,7 @@ export default {
categoryId: trn.categoryId,
date: trn.date,
description: trn.description || null,
+ groups: trn.groups || null,
trnId,
walletId: trn.walletId
})
@@ -88,6 +93,7 @@ export default {
categoryId: trn.categoryId,
date: dayjs().valueOf(),
description: trn.description || null,
+ groups: null,
trnId: null,
walletId: trn.walletId
})