Open source personal finance application
auto fix code eslint
Ilya Komicheve9bf0587c322
diff --git a/src/components/app/store/actions.js b/src/components/app/store/actions.jsindex 43230eef..144797be 100644--- a/src/components/app/store/actions.js+++ b/src/components/app/store/actions.js@@ -21,10 +21,12 @@ export default {await dispatch('initGroups')await dispatch('initBudgets')await dispatch('initDbLang')- } catch (e) {+ }+ catch (e) {console.error(e)}- } else {+ }+ else {commit('setAppStatus', 'login')}})diff --git a/src/components/budgets/BudgetForm.vue b/src/components/budgets/BudgetForm.vueindex 2889c610..ecc471bf 100644--- a/src/components/budgets/BudgetForm.vue+++ b/src/components/budgets/BudgetForm.vue@@ -75,7 +75,8 @@ export default {console.log(trnId)if (this.budgetTrnsIds.includes(trnId)) {this.budgetTrnsIds = this.budgetTrnsIds.filter(item => item !== trnId)- } else {+ }+ else {this.budgetTrnsIds.push(trnId)}}diff --git a/src/components/budgets/store/actions.js b/src/components/budgets/store/actions.jsindex 5dd8e7e0..84c10b53 100644--- a/src/components/budgets/store/actions.js+++ b/src/components/budgets/store/actions.js@@ -76,7 +76,8 @@ export default {if (trn.budgets && trn.budgets[budgetId]) {dispatch('removeTrnFromBudget', { budgetId, trnId })- } else {+ }+ else {dispatch('addTrnToBudget', { budgetId, trnId })}}diff --git a/src/components/budgets/store/getters.js b/src/components/budgets/store/getters.jsindex 02e97f5f..2e1a2ca3 100644--- a/src/components/budgets/store/getters.js+++ b/src/components/budgets/store/getters.js@@ -18,7 +18,7 @@ export default {const formatedBudgets = {}for (const key in budgets) {- let trnsInBudget = budgets[key].trnsIds || {}+ const trnsInBudget = budgets[key].trnsIds || {}const trnsIds = Object.keys(trnsInBudget)const total = rootGetters.getTotalOfTrnsIds(trnsIds)diff --git a/src/components/categories/form/CategoryForm.vue b/src/components/categories/form/CategoryForm.vueindex 9c56fa00..4ac73785 100644--- a/src/components/categories/form/CategoryForm.vue+++ b/src/components/categories/form/CategoryForm.vue@@ -146,7 +146,8 @@ export default {})return false}- } else {+ }+ else {this.$notify({group: 'main',title: '😮',diff --git a/src/components/categories/modal/CategoryModal.vue b/src/components/categories/modal/CategoryModal.vueindex 00ac0f25..56f16236 100644--- a/src/components/categories/modal/CategoryModal.vue+++ b/src/components/categories/modal/CategoryModal.vue@@ -39,7 +39,7 @@ export default {},trnsIds () {const trns = this.$store.state.trns.items- let trnsIds = []+ const trnsIds = []for (const trnId in trns) {if (trns[trnId].categoryId === this.categoryId) trnsIds.push(trnId)}diff --git a/src/components/categories/store/getters.js b/src/components/categories/store/getters.jsindex ab52cec8..2c965819 100644--- a/src/components/categories/store/getters.js+++ b/src/components/categories/store/getters.js@@ -83,7 +83,7 @@ export default {const trns = rootState.trns.itemsconst sortedTrnsIds = rootGetters.sortedTrnsIdsconst transferCategoryId = rootGetters.transferCategoryId- let lastCategoriesIds = []+ const lastCategoriesIds = []if (categories && rootGetters.hasTrns) {for (const trnId of sortedTrnsIds.slice(0, 50)) {diff --git a/src/components/categories/store/mutations.js b/src/components/categories/store/mutations.jsindex e7d751f9..4b94fdd3 100644--- a/src/components/categories/store/mutations.js+++ b/src/components/categories/store/mutations.js@@ -18,7 +18,8 @@ export default {setCategoryModalId (state, id) {if (state.modal.id === id) {state.modal.id = null- } else {+ }+ else {state.modal.id = id}},@@ -26,7 +27,8 @@ export default {setCategoryEditId (state, id) {if (state.editId === id) {state.editId = null- } else {+ }+ else {state.editId = id}}diff --git a/src/components/currencies/store/getters.js b/src/components/currencies/store/getters.jsindex 31713dff..35e31923 100644--- a/src/components/currencies/store/getters.js+++ b/src/components/currencies/store/getters.js@@ -1,6 +1,6 @@export default {getAmountInBaseCurrency: (state, getters, rootState) => ({ amount, currency }) => {- let fixed = rootState.currencies.base === 'RUB' ? 0 : 2+ const fixed = rootState.currencies.base === 'RUB' ? 0 : 2const baseValue = (amount / rootState.currencies.items[currency]).toFixed(fixed)return Number(baseValue)}diff --git a/src/components/filter/store/actions.js b/src/components/filter/store/actions.jsindex 32a7d2dd..f89838fd 100644--- a/src/components/filter/store/actions.js+++ b/src/components/filter/store/actions.js@@ -10,10 +10,12 @@ export default {if (filterCategory.parentId !== 0) {dispatch('setFilterCategoryId', null)dispatch('setFilterCategoryId', filterCategory.parentId)- } else {+ }+ else {dispatch('setFilterCategoryId', null)}- } else {+ }+ else {dispatch('setFilterCategoryId', categoryId)}},diff --git a/src/components/groups/BudgetForm.vue b/src/components/groups/BudgetForm.vueindex 16cef5f2..9ec7829e 100644--- a/src/components/groups/BudgetForm.vue+++ b/src/components/groups/BudgetForm.vue@@ -61,7 +61,8 @@ export default {console.log(trnId)if (this.budgetTrnsIds.includes(trnId)) {this.budgetTrnsIds = this.budgetTrnsIds.filter(item => item !== trnId)- } else {+ }+ else {this.budgetTrnsIds.push(trnId)}}diff --git a/src/components/groups/store/actions.js b/src/components/groups/store/actions.jsindex 9c46687d..0717fdd9 100644--- a/src/components/groups/store/actions.js+++ b/src/components/groups/store/actions.js@@ -74,7 +74,8 @@ export default {if (trn.groups && trn.groups[groupId]) {dispatch('removeTrnFromGroup', { groupId, trnId })- } else {+ }+ else {dispatch('addTrnToGroup', { groupId, trnId })}}diff --git a/src/components/layout/LayoutMobileMenu.vue b/src/components/layout/LayoutMobileMenu.vueindex 416c5a8c..b04fcc56 100644--- a/src/components/layout/LayoutMobileMenu.vue+++ b/src/components/layout/LayoutMobileMenu.vue@@ -38,13 +38,14 @@ export default {if (this.$store.state.ui.activeTab === 'stat') {if (tab === this.$store.state.ui.stat.activeTab) {return {- '_active': true+ _active: true}}- } else {+ }+ else {if (this.$store.state.ui.activeTab === tab) {return {- '_active': true+ _active: true}}}diff --git a/src/components/shared/date/Date.vue b/src/components/shared/date/Date.vueindex 30bfe196..dcd5a376 100644--- a/src/components/shared/date/Date.vue+++ b/src/components/shared/date/Date.vue@@ -13,7 +13,8 @@ export default {case 'day':if (today.isSame(filterDate, 'day')) {return this.$lang.dates.day.current- } else if (today.subtract(1, filterPeriod).isSame(filterDate, 'day')) {+ }+ else if (today.subtract(1, filterPeriod).isSame(filterDate, 'day')) {return 'Yesterday'}format = 'DD MMMM YYYY'@@ -22,7 +23,8 @@ export default {case 'week':if (today.isSame(filterDate, 'week')) {return this.$lang.dates.week.current- } else if (today.subtract(1, filterPeriod).isSame(filterDate, 'week')) {+ }+ else if (today.subtract(1, filterPeriod).isSame(filterDate, 'week')) {return 'Last week'}const date = moment(filterDate)@@ -33,7 +35,8 @@ export default {case 'month':if (today.isSame(filterDate, 'month')) {return this.$lang.dates.month.current- } else if (today.subtract(1, filterPeriod).isSame(filterDate, 'month')) {+ }+ else if (today.subtract(1, filterPeriod).isSame(filterDate, 'month')) {return 'Last month'}format = 'MMMM YYYY'diff --git a/src/components/stat/StatChartDonut.vue b/src/components/stat/StatChartDonut.vueindex 2ff160b6..a6b87e57 100644--- a/src/components/stat/StatChartDonut.vue+++ b/src/components/stat/StatChartDonut.vue@@ -74,7 +74,7 @@ export default {// diff periods from oldest trn and todayconst oldestTrnDate = moment(trns[this.$store.getters.firstCreatedTrnId].date).endOf(periodName)- let periodsToShow = moment().endOf(periodName).diff(oldestTrnDate, periodName) + 1+ const periodsToShow = moment().endOf(periodName).diff(oldestTrnDate, periodName) + 1// periodsToShow = 12// get balance for first period@@ -82,10 +82,10 @@ export default {const trnsIdsBeforeDate = allTrnsIds.filter(id => trns[id].date < dateStart)const totalStart = this.$store.getters.getTotalOfTrnsIds(trnsIdsBeforeDate, true)- let categories = []- let incomesData = []- let expensesData = []- let totalData = []+ const categories = []+ const incomesData = []+ const expensesData = []+ const totalData = []for (let index = 0; index < periodsToShow; index++) {// count balancediff --git a/src/components/stat/StatChartsLine.vue b/src/components/stat/StatChartsLine.vueindex 0d6c2153..f8683340 100644--- a/src/components/stat/StatChartsLine.vue+++ b/src/components/stat/StatChartsLine.vue@@ -1,11 +1,11 @@<script>import moment from 'moment'+import { dragscroll } from 'vue-dragscroll'import Amount from '@/components/amount/Amount'import ChartItem from '@/components/stat/chart/ChartItem'import ChartMenu from '@/components/stat/chart/ChartMenu'import ChartPopup from '@/components/stat/chart/ChartPopup'-import { dragscroll } from 'vue-dragscroll'export default {components: {@@ -33,16 +33,16 @@ export default {periodsValues () {const trns = this.$store.state.trns.itemsconst transferCategoryId = this.$store.getters.transferCategoryId- let trnsIds = this.$store.getters.selectedTrnsIds+ const trnsIds = this.$store.getters.selectedTrnsIdsconst filterPeriod = this.$store.state.filter.periodconst diff = this.getNumberShowedPeriods()const values = {}for (let period = 0; period < diff; period++) {- let periodStartDate = moment().subtract(period, filterPeriod).startOf(filterPeriod)- let periodEndDate = moment().subtract(period, filterPeriod).endOf(filterPeriod)+ const periodStartDate = moment().subtract(period, filterPeriod).startOf(filterPeriod)+ const periodEndDate = moment().subtract(period, filterPeriod).endOf(filterPeriod)const ids = trnsIds- .filter(trnId => {+ .filter((trnId) => {return trns[trnId].date >= periodStartDate &&trns[trnId].date <= periodEndDate &&trns[trnId].categoryId !== transferCategoryId@@ -63,8 +63,8 @@ export default {const groupedValues = {}for (const date in periodsValues) {- let periodStartDateValue = moment(parseInt(date)).startOf(groupedBy).valueOf()- let periodEndDateValue = moment(parseInt(date)).endOf(groupedBy).valueOf()+ const periodStartDateValue = moment(parseInt(date)).startOf(groupedBy).valueOf()+ const periodEndDateValue = moment(parseInt(date)).endOf(groupedBy).valueOf()if (date >= periodStartDateValue && date <= periodEndDateValue) {groupedValues[periodStartDateValue]@@ -82,8 +82,8 @@ export default {for (const date in periodsValues) {const incomes = periodsValues[date].incomesconst expenses = periodsValues[date].expenses- if (incomes > biggest) biggest = incomes- if (expenses > biggest) biggest = expenses+ if (incomes > biggest) { biggest = incomes }+ if (expenses > biggest) { biggest = expenses }}return biggest}@@ -100,12 +100,13 @@ export default {if (this.periods[filterPeriod].grouped) {diff = this.getGroupedPeriods()- } else {+ }+ else {this.activePeriodNumber > this.periods[filterPeriod].showedPeriods? diff = this.activePeriodNumber: diff = this.periods[filterPeriod].showedPeriods}- if (diff <= 0) diff = 1+ if (diff <= 0) { diff = 1 }this.$store.dispatch('setDiffPeriods', diff)return diff@@ -120,9 +121,9 @@ export default {// periods in current groupconst getPeriodsInCurrentGroup = () => {let currentGroupPeriods- if (filterPeriod === 'day') currentGroupPeriods = parseInt(moment().format('D'))- if (filterPeriod === 'week') currentGroupPeriods = moment().week() - moment().startOf('month').week() + 1- if (filterPeriod === 'month') currentGroupPeriods = parseInt(moment().format('MM'))+ if (filterPeriod === 'day') { currentGroupPeriods = parseInt(moment().format('D')) }+ if (filterPeriod === 'week') { currentGroupPeriods = moment().week() - moment().startOf('month').week() + 1 }+ if (filterPeriod === 'month') { currentGroupPeriods = parseInt(moment().format('MM')) }return currentGroupPeriods}diff --git a/src/components/stat/StatCustomizeMenuMobile.vue b/src/components/stat/StatCustomizeMenuMobile.vueindex 0bf369c2..7f071ea1 100644--- a/src/components/stat/StatCustomizeMenuMobile.vue+++ b/src/components/stat/StatCustomizeMenuMobile.vue@@ -34,7 +34,7 @@ export default {computed: {positionStyles () {- let styles = { ...this.position }+ const styles = { ...this.position }return styles}}diff --git a/src/components/stat/cats/PeriodCatsChartItem.vue b/src/components/stat/cats/PeriodCatsChartItem.vueindex 008391ce..ef0fc428 100644--- a/src/components/stat/cats/PeriodCatsChartItem.vue+++ b/src/components/stat/cats/PeriodCatsChartItem.vue@@ -37,9 +37,11 @@ export default {amount () {if (this.total >= 1000000) {return (this.total / 1000000).toFixed(2) + 'm'- } else if (this.total >= 10000) {+ }+ else if (this.total >= 10000) {return (this.total / 1000).toFixed() + 'k'- } else if (this.total > 999) {+ }+ else if (this.total > 999) {return (this.total / 1000).toFixed(1) + 'k'}diff --git a/src/components/stat/store/getters.js b/src/components/stat/store/getters.jsindex 05a32442..2ac19352 100644--- a/src/components/stat/store/getters.js+++ b/src/components/stat/store/getters.js@@ -46,7 +46,7 @@ export default {const trns = rootState.trns.itemsconst transferCategoryId = rootGetters.transferCategoryIdconst diff = rootState.stat.showedPeriods- let trnsIds = rootGetters.selectedTrnsIds+ const trnsIds = rootGetters.selectedTrnsIdsconst periodGroup = rootState.filter.period@@ -79,7 +79,8 @@ export default {if (moment(rootState.filter.date).isSame(moment(), rootState.filter.period)) {return true}- } else {+ }+ else {return true}},@@ -91,7 +92,8 @@ export default {if (moment(rootState.filter.date).isSame(firstCreatedTrnDate, rootState.filter.period)) {return true}- } else {+ }+ else {return true}},@@ -124,7 +126,7 @@ export default {const trns = rootState.trns.itemsconst transferCategoryId = rootGetters.transferCategoryId- let categoriesWithTrnsIds = {}+ const categoriesWithTrnsIds = {}for (const trnId of trnsIds) {if (trns[trnId]) {@@ -137,7 +139,8 @@ export default {if (categoryId !== transferCategoryId) {if (!categoriesWithTrnsIds[categoryId]) {categoriesWithTrnsIds[categoryId] = [trnId]- } else {+ }+ else {categoriesWithTrnsIds[categoryId].push(trnId)}}diff --git a/src/components/trnForm/TrnForm.vue b/src/components/trnForm/TrnForm.vueindex 647074bd..e7eb5c23 100644--- a/src/components/trnForm/TrnForm.vue+++ b/src/components/trnForm/TrnForm.vue@@ -68,7 +68,8 @@ export default {if (isFormValid) {if (this.$store.state.ui.mobile) {this.$store.commit('closeTrnForm')- } else {+ }+ else {setTimeout(() => {this.$notify({group: 'main',@@ -85,7 +86,8 @@ export default {: this.handleSubmitTrn()}, 100)}- } catch (e) {+ }+ catch (e) {console.log(e)}},diff --git a/src/components/trnForm/TrnFormAmount.vue b/src/components/trnForm/TrnFormAmount.vueindex 3ec5049b..890b473d 100644--- a/src/components/trnForm/TrnFormAmount.vue+++ b/src/components/trnForm/TrnFormAmount.vue@@ -96,7 +96,8 @@ export default {this.$store.commit('setTrnFormValues', {amount: Number(amountResult)})- } catch (e) {+ }+ catch (e) {this.$notify({group: 'main',title: '😮',diff --git a/src/components/trnForm/TrnFormCalculator.vue b/src/components/trnForm/TrnFormCalculator.vueindex edc37205..79724a4b 100644--- a/src/components/trnForm/TrnFormCalculator.vue+++ b/src/components/trnForm/TrnFormCalculator.vue@@ -40,7 +40,8 @@ export default {amount: Number(amountResult),amountArray: [amountSum]})- } catch (e) {+ }+ catch (e) {this.$notify({group: 'main',title: '😮',@@ -56,7 +57,7 @@ export default {let newAmountArray = amountArrayconst lastIndex = newAmountArray.length - 1let lastValue = String(amountArray[lastIndex]).replace(/\s/g, '')- let isLatValueNumber = Number.isInteger(Number(lastValue))+ const isLatValueNumber = Number.isInteger(Number(lastValue))if (isLatValueNumber) lastValue = Number(lastValue)if (lastValue === 0) {@@ -66,12 +67,14 @@ export default {if (eventType === 'remove' && newAmountArray.length > 1) {newAmountArray = newAmountArray.slice(0, lastIndex)}- } else {+ }+ else {switch (eventType) {case 'number':if (isLatValueNumber) {newAmountArray[lastIndex] = this.formatToAmountWithSpaces(`${lastValue}${value}`)- } else {+ }+ else {if (value !== 0) {newAmountArray.push(value)}@@ -81,7 +84,8 @@ export default {case 'action':if (isLatValueNumber && value !== 0) {newAmountArray.push(value)- } else {+ }+ else {newAmountArray[lastIndex] = value}break@@ -89,10 +93,12 @@ export default {case 'remove':if (newAmountArray.length <= 1) {newAmountArray = [this.formatToAmountWithSpaces(`${String(lastValue).substring(0, String(lastValue).length - 1)}`)]- } else {+ }+ else {if (isLatValueNumber && lastValue >= 10) {newAmountArray[lastIndex] = this.formatToAmountWithSpaces(`${String(lastValue).substring(0, String(lastValue).length - 1)}`)- } else {+ }+ else {newAmountArray = newAmountArray.slice(0, lastIndex)}}diff --git a/src/components/trnForm/TrnFormModal.vue b/src/components/trnForm/TrnFormModal.vueindex 79e1564d..d06e294f 100644--- a/src/components/trnForm/TrnFormModal.vue+++ b/src/components/trnForm/TrnFormModal.vue@@ -23,7 +23,8 @@ export default {return {height: `${this.$store.state.trnForm.height - this.headerHeight}px`}- } else {+ }+ else {return {height: `${this.$store.state.ui.height - this.headerHeight}px`}diff --git a/src/components/trnForm/TrnFormModalCats.vue b/src/components/trnForm/TrnFormModalCats.vueindex a01febac..5089b3ad 100644--- a/src/components/trnForm/TrnFormModalCats.vue+++ b/src/components/trnForm/TrnFormModalCats.vue@@ -17,7 +17,8 @@ export default {if (this.$store.getters.getChildCategoriesIds(categoryId).length > 0) {this.$store.commit('setTrnFormModalCategoryId', categoryId)this.$store.commit('showTrnFormModal', 'categoriesChild')- } else {+ }+ else {this.$store.commit('closeTrnFormModal', 'categories')this.$store.commit('closeTrnFormModal', 'categoriesChild')this.$store.commit('setTrnFormValues', { categoryId })diff --git a/src/components/trnForm/store/actions.js b/src/components/trnForm/store/actions.jsindex 710fd9da..5f8f4c64 100644--- a/src/components/trnForm/store/actions.js+++ b/src/components/trnForm/store/actions.js@@ -24,7 +24,8 @@ export default {trnId: null,walletId: lastTrn.accountId})- } else {+ }+ else {const categoriesIds = Object.keys(rootState.categories.items)const categoryId = categoriesIds[0]const walletsIds = Object.keys(rootState.wallets.items)diff --git a/src/components/trnForm/store/mutations.js b/src/components/trnForm/store/mutations.jsindex e8adfd52..dfa8d0b6 100644--- a/src/components/trnForm/store/mutations.js+++ b/src/components/trnForm/store/mutations.js@@ -33,7 +33,8 @@ export default {setTrnFormModalCategoryId (state, id) {if (state.showModalCategoryId === id) {state.showModalCategoryId = null- } else {+ }+ else {state.showModalCategoryId = id}},diff --git a/src/components/trns/list/TrnsList.vue b/src/components/trns/list/TrnsList.vueindex 80154f43..0f849223 100644--- a/src/components/trns/list/TrnsList.vue+++ b/src/components/trns/list/TrnsList.vue@@ -88,7 +88,8 @@ export default {if (!trnsList[dayDate]) {trnsList[dayDate] = [trnId]- } else {+ }+ else {trnsList[dayDate].push(trnId)}}diff --git a/src/components/trns/list/TrnsList2.vue b/src/components/trns/list/TrnsList2.vueindex 6f58e277..162104a0 100644--- a/src/components/trns/list/TrnsList2.vue+++ b/src/components/trns/list/TrnsList2.vue@@ -9,8 +9,8 @@ export default {computed: {trns () {- let trns = {}- let trnsIds = this.ids+ const trns = {}+ const trnsIds = this.idsfor (const trnId of trnsIds) {const trn = this.$store.state.trns.items[trnId]diff --git a/src/components/trns/store/getters.js b/src/components/trns/store/getters.jsindex f76c6125..bf3f2558 100644--- a/src/components/trns/store/getters.js+++ b/src/components/trns/store/getters.js@@ -37,7 +37,8 @@ export default {let amount = 0if (wallet.currency !== baseCurrency) {amount = Math.abs(trn.amount / currencies[wallet.currency])- } else {+ }+ else {amount = trn.amount}if (trn.type === 1) incomes = incomes + amount@@ -129,7 +130,8 @@ export default {if (trnCategoryId === categoryId) return true}})- } else {+ }+ else {trnsIds = trnsIds.filter(trnId => trns[trnId].categoryId === filterCategoryId)}}@@ -231,7 +233,8 @@ export default {if (trnCategoryId === categoryId) return true}})- } else {+ }+ else {trnsIds = trnsIds.filter(trnId => trns[trnId].categoryId === filterCategoryId)}}diff --git a/src/components/trns/store/mutations.js b/src/components/trns/store/mutations.jsindex f3a9d34d..201cfbaa 100644--- a/src/components/trns/store/mutations.js+++ b/src/components/trns/store/mutations.js@@ -18,7 +18,8 @@ export default {setTrnModalId (state, id) {if (state.modal.id === id) {state.modal.id = null- } else {+ }+ else {state.modal.id = id}}diff --git a/src/components/wallets/form/WalletForm.vue b/src/components/wallets/form/WalletForm.vueindex 0b359cb5..48e330be 100644--- a/src/components/wallets/form/WalletForm.vue+++ b/src/components/wallets/form/WalletForm.vue@@ -126,7 +126,8 @@ export default {})return false}- } else {+ }+ else {this.$notify({group: 'main',title: '😮',diff --git a/src/components/wallets/list/WalletsList.vue b/src/components/wallets/list/WalletsList.vueindex e830c80b..e5b2c245 100644--- a/src/components/wallets/list/WalletsList.vue+++ b/src/components/wallets/list/WalletsList.vue@@ -52,7 +52,8 @@ export default {toogleWallets () {if (this.stateLimit > 0) {this.stateLimit = 0- } else {+ }+ else {this.stateLimit = this.limit}}diff --git a/src/components/wallets/modal/WalletModal.vue b/src/components/wallets/modal/WalletModal.vueindex 042fce00..664f248c 100644--- a/src/components/wallets/modal/WalletModal.vue+++ b/src/components/wallets/modal/WalletModal.vue@@ -31,7 +31,7 @@ export default {},trnsIds () {const trns = this.$store.state.trns.items- let trnsIds = []+ const trnsIds = []for (const trnId in trns) {if (trns[trnId].accountId === this.walletId) trnsIds.push(trnId)}diff --git a/src/components/wallets/store/getters.js b/src/components/wallets/store/getters.jsindex 39d7280d..29c7f615 100644--- a/src/components/wallets/store/getters.js+++ b/src/components/wallets/store/getters.js@@ -21,7 +21,8 @@ export default {if (trns[trnId]) {if (trns[trnId].type === 0) {amount = amount - trns[trnId].amount- } else {+ }+ else {amount = amount + trns[trnId].amount}}@@ -41,7 +42,8 @@ export default {for (const trnId of trnsIds) {if (trns[trnId].type === 0) {amount = amount - trns[trnId].amount- } else {+ }+ else {amount = amount + trns[trnId].amount}}diff --git a/src/components/wallets/store/mutations.js b/src/components/wallets/store/mutations.jsindex b3e4fb4d..c7e8a597 100644--- a/src/components/wallets/store/mutations.js+++ b/src/components/wallets/store/mutations.js@@ -18,7 +18,8 @@ export default {setWalletModalId (state, id) {if (state.modal.id === id) {state.modal.id = null- } else {+ }+ else {state.modal.id = id}},@@ -26,7 +27,8 @@ export default {setWalletEditId (state, id) {if (state.editId === id) {state.editId = null- } else {+ }+ else {state.editId = id}}diff --git a/src/components/wallets/total/WalletsTotal.vue b/src/components/wallets/total/WalletsTotal.vueindex b4c2ceb0..e1a2e2ce 100644--- a/src/components/wallets/total/WalletsTotal.vue+++ b/src/components/wallets/total/WalletsTotal.vue@@ -9,7 +9,7 @@ export default {totalInWallets () {const walletsItems = this.$store.state.wallets.itemsconst walletsTotal = this.$store.getters.walletsTotal- let total = {+ const total = {counted: 0,all: 0}@@ -18,7 +18,8 @@ export default {let walletTotal = 0if (walletsItems[walletId].currency === this.$store.state.currencies.base) {walletTotal = walletsTotal[walletId].base- } else {+ }+ else {walletTotal = this.$store.getters.getAmountInBaseCurrency({amount: walletsTotal[walletId].base,currency: walletsItems[walletId].currency@@ -27,7 +28,8 @@ export default {if (walletsItems[walletId].countTotal) {total.counted = total.counted + walletTotal- } else {+ }+ else {total.all = total.all + walletTotal}}diff --git a/src/main.js b/src/main.jsindex a0102995..9b7101d0 100644--- a/src/main.js+++ b/src/main.js@@ -16,8 +16,8 @@ Vue.use(HighchartsVue)Vue.use(Notifications)const locales = {- 'en': require('@/lang/en.json'),- 'ru': require('@/lang/ru.json')+ en: require('@/lang/en.json'),+ ru: require('@/lang/ru.json')}Vue.use(Lang, { lang: 'en', locales })