firefly-iii/public/v2/js/transactions/index.js.map
2021-07-11 09:31:10 +02:00

1 line
139 KiB
Plaintext
Executable File

{"version":3,"sources":["webpack:///./src/bootstrap.js","webpack:///./src/components/store/modules/transactions/create.js","webpack:///./src/components/store/modules/transactions/edit.js","webpack:///./src/components/store/modules/dashboard/index.js","webpack:///./src/components/store/modules/root.js","webpack:///./src/components/store/modules/accounts/index.js","webpack:///./src/components/store/index.js","webpack:///./src/i18n.js","webpack:///src/components/transactions/Index.vue","webpack:///./src/components/transactions/Index.vue?8003","webpack:///./src/components/transactions/Index.vue","webpack:///./src/components/transactions/Index.vue?9da7","webpack:///./src/pages/transactions/index.js","webpack:///./src/shared/forageStore.js","webpack:///./src/shared/transactions.js","webpack:///./src/components/dashboard/Calendar.vue?78b5","webpack:///./src/components/dashboard/Calendar.vue?4aa0","webpack:///src/components/dashboard/Calendar.vue","webpack:///./src/components/dashboard/Calendar.vue?6b2f","webpack:///./src/components/dashboard/Calendar.vue?baae","webpack:///./src/components/dashboard/Calendar.vue"],"names":["window","$","jQuery","require","axios","defaults","headers","common","token","document","head","querySelector","content","console","error","localeToken","localStorage","locale","vuei18n","VueI18n","uiv","Vue","lodashClonedeep","namespaced","state","transactionType","groupTitle","transactions","customDateFields","interest_date","book_date","process_date","due_date","payment_date","invoice_date","defaultTransaction","getDefaultTransaction","defaultErrors","getDefaultErrors","getters","accountToTransaction","sourceAllowedTypes","destinationAllowedTypes","allowedOpposingTypes","actions","mutations","addTransaction","newTransaction","errors","push","resetErrors","payload","index","resetTransactions","setGroupTitle","setCustomDateFields","deleteTransaction","splice","length","setTransactionType","setAllowedOpposingTypes","setAccountToTransaction","updateField","field","value","setTransactionError","setDestinationAllowedTypes","setSourceAllowedTypes","viewRange","start","end","defaultStart","defaultEnd","initialiseStore","context","dispatch","get","then","response","data","attributes","oldViewRange","commit","restoreViewRangeDates","viewRangeStart","Date","viewRangeEnd","viewRangeDefaultStart","viewRangeDefaultEnd","restoreViewRange","getItem","setDatesFromViewRange","today","startOfDay","endOfDay","startOfWeek","weekStartsOn","endOfWeek","startOfMonth","endOfMonth","startOfQuarter","endOfQuarter","getMonth","setMonth","setDate","setStart","setItem","setEnd","setDefaultStart","setDefaultEnd","setViewRange","range","listPageSize","timezone","cacheKey","age","object","JSON","parse","now","parseInt","refreshCacheKey","Array","N","join","Math","random","toString","slice","stringify","setCacheKey","setListPageSize","number","setTimezone","orderMode","activeFilter","setOrderMode","setActiveFilter","Vuex","modules","root","root_store","create","transactions_create","edit","transactions_edit","accounts","accounts_index","dashboard","dashboard_index","strict","process","plugins","currencyPreference","setCurrencyPreference","currencyCode","code","currencyId","id","updateCurrencyPreference","currencyResponse","name","symbol","decimal_places","err","module","exports","documentElement","lang","fallbackLocale","messages","transactionRows","type","downloaded","loading","ready","fields","currentPage","perPage","total","sortBy","sortDesc","api","sortableOptions","disabled","chosenClass","onEnd","sortable","ranges","urlStart","urlEnd","watch","storeReady","this","getTransactionList","filterAccountList","computed","cardTitle","$t","created","parts","params","updateFieldList","methods","newCacheKey","indexReady","downloadTransactionList","calculateDateRanges","currentDate","yearAgo","formatDate","createTransactionRows","transactionRow","transaction","description","group_title","split","collapsed","undefined","amount","source_name","source_id","destination_name","destination_id","splitTransactionRow","key","split_index","split_parent","getTransactionRow","currentTransaction","currency_code","date","date_formatted","category_id","category_name","toggleCollapse","tableSortCompare","aRow","bRow","a","b","localeCompare","compareLocale","compareOptions","Object","keys","String","_vm","_h","$createElement","_c","_self","_m","_v","staticClass","attrs","model","callback","$$v","expression","on","ref","$event","scopedSlots","_u","fn","proxy","item","_e","class","active","_s","Intl","NumberFormat","style","currency","format","_l","i18n","props","BTable","BPagination","store","render","createElement","Index","beforeCreate","$store","$mount","el","Calendar","configureAxios","localforage","memoryDriver","forageStore","driver","setup","baseURL","cache","maxAge","readHeaders","exclude","query","debug","source","destination","foreign_currency","foreign_amount","custom_dates","budget","category","bill","tags","piggy_bank","internal_reference","external_url","notes","location","transaction_journal_id","source_account_id","source_account_name","source_account_type","source_account_currency_id","source_account_currency_code","source_account_currency_symbol","destination_account_id","destination_account_name","destination_account_type","destination_account_currency_id","destination_account_currency_code","destination_account_currency_symbol","attachments","selectedAttachments","uploadTrigger","clearTrigger","source_account","name_with_balance","currency_id","currency_name","currency_decimal_places","destination_account","foreign_currency_id","budget_id","bill_id","piggy_bank_id","external_id","links","zoom_level","longitude","latitude","___CSS_LOADER_EXPORT___","defaultRange","periods","resetDate","customDate","generatePeriods","generateDaily","generateWeekly","title","generateMonthly","generateQuarterly","generateHalfYearly","setFullYear","getFullYear","half","generateYearly","getDate","datesReady","options","DateTimeFormat","year","month","day","inputValue","inputEvents","isDragging","togglePopover","placement","positionFixed","period","_g","domProps"],"mappings":"oIA0BAA,OAAOC,EAAID,OAAOE,OAASC,EAAQ,MAGnCH,OAAOI,MAAQD,EAAQ,MACvBH,OAAOI,MAAMC,SAASC,QAAQC,OAAO,oBAAsB,iBAG3D,IAAIC,EAAQC,SAASC,KAAKC,cAAc,2BAEpCH,EACAR,OAAOI,MAAMC,SAASC,QAAQC,OAAO,gBAAkBC,EAAMI,QAE7DC,QAAQC,MAAM,yEAIlB,IAAIC,EAAcN,SAASC,KAAKC,cAAc,uBAG1CK,aAAaC,OADbF,EACsBA,EAAYH,QAEZ,QAI1BT,EAAQ,MACRA,EAAQ,MAERA,EAAQ,MACRA,EAAQ,MAIRH,OAAOkB,QAAUC,IACjBnB,OAAOoB,IAAMA,EACbC,QAAQH,SACRG,QAAQD,GACRpB,OAAOqB,IAAMA,K,uFC3CPC,EAAkBnB,EAAQ,MA4HhC,SACIoB,YAAY,EACZC,MAzHU,iBAAO,CACbC,gBAAiB,MACjBC,WAAY,GACZC,aAAc,GACdC,iBAAkB,CACdC,eAAe,EACfC,WAAW,EACXC,cAAc,EACdC,UAAU,EACVC,cAAc,EACdC,cAAc,GAElBC,oBAAoBC,UACpBC,eAAeC,YA6GnBC,QAvGY,CACZZ,aAAc,SAAAH,GACV,OAAOA,EAAMG,cAEjBU,cA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Y,KAAK/G,EAAIM,GAAG,KAAKH,EAAG,QAAQH,EAAIqI,GAAG,CAAC/G,MAAM0G,EAAa,gBAAkB,gBAAgBxH,MAAM,CAAC,KAAO,UAAU8H,SAAS,CAAC,MAAQR,EAAWhT,QAAQiT,EAAYjT,QAAQkL,EAAIM,GAAG,KAAKH,EAAG,QAAQH,EAAIqI,GAAG,CAAC/G,MAAM0G,EAAa,gBAAkB,gBAAgBxH,MAAM,CAAC,KAAO,UAAU8H,SAAS,CAAC,MAAQR,EAAW/S,MAAMgT,EAAYhT,eAAe0L,MAAM,CAAChM,MAAOuL,EAAS,MAAEU,SAAS,SAAUC,GAAMX,EAAIxI,MAAMmJ,GAAKC,WAAW,YAAY,KAClhD,IIMpB,EACA,KACA,WACA,M","file":"/public/js/transactions/index.js","sourcesContent":["/*\n * bootstrap.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// // imports\nimport Vue from 'vue';\nimport VueI18n from 'vue-i18n'\nimport * as uiv from 'uiv';\n\n// export jquery for others scripts to use\nwindow.$ = window.jQuery = require('jquery');\n\n// axios\nwindow.axios = require('axios');\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n// CSRF\nlet token = document.head.querySelector('meta[name=\"csrf-token\"]');\n\nif (token) {\n window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;\n} else {\n console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');\n}\n\n// locale\nlet localeToken = document.head.querySelector('meta[name=\"locale\"]');\n\nif (localeToken) {\n localStorage.locale = localeToken.content;\n} else {\n localStorage.locale = 'en_US';\n}\n\n// admin stuff\nrequire('jquery-ui');\nrequire('bootstrap'); // bootstrap CSS?\n\nrequire('admin-lte/dist/js/adminlte');\nrequire('overlayscrollbars');\n\n\n// vue\nwindow.vuei18n = VueI18n;\nwindow.uiv = uiv;\nVue.use(vuei18n);\nVue.use(uiv);\nwindow.Vue = Vue;","/*\n * create.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nconst lodashClonedeep = require('lodash.clonedeep');\n\nimport {getDefaultTransaction, getDefaultErrors} from '../../../../shared/transactions';\n\n// initial state\nconst state = () => ({\n transactionType: 'any',\n groupTitle: '',\n transactions: [],\n customDateFields: {\n interest_date: false,\n book_date: false,\n process_date: false,\n due_date: false,\n payment_date: false,\n invoice_date: false,\n },\n defaultTransaction: getDefaultTransaction(),\n defaultErrors: getDefaultErrors()\n }\n)\n\n\n// getters\nconst getters = {\n transactions: state => {\n return state.transactions;\n },\n defaultErrors: state => {\n return state.defaultErrors;\n },\n groupTitle: state => {\n return state.groupTitle;\n },\n transactionType: state => {\n return state.transactionType;\n },\n accountToTransaction: state => {\n// See reference nr. 1\n // possible API point!!\n return state.accountToTransaction;\n },\n defaultTransaction: state => {\n return state.defaultTransaction;\n },\n sourceAllowedTypes: state => {\n return state.sourceAllowedTypes;\n },\n destinationAllowedTypes: state => {\n return state.destinationAllowedTypes;\n },\n allowedOpposingTypes: state => {\n return state.allowedOpposingTypes;\n },\n customDateFields: state => {\n return state.customDateFields;\n }\n // // `getters` is localized to this module's getters\n // // you can use rootGetters via 4th argument of getters\n // someGetter (state, getters, rootState, rootGetters) {\n // getters.someOtherGetter // -> 'foo/someOtherGetter'\n // rootGetters.someOtherGetter // -> 'someOtherGetter'\n // rootGetters['bar/someOtherGetter'] // -> 'bar/someOtherGetter'\n // },\n\n}\n\n// actions\nconst actions = {}\n\n// mutations\nconst mutations = {\n addTransaction(state) {\n let newTransaction = lodashClonedeep(state.defaultTransaction);\n newTransaction.errors = lodashClonedeep(state.defaultErrors);\n state.transactions.push(newTransaction);\n },\n resetErrors(state, payload) {\n //console.log('resetErrors for index ' + payload.index);\n state.transactions[payload.index].errors = lodashClonedeep(state.defaultErrors);\n },\n resetTransactions(state) {\n state.transactions = [];\n },\n setGroupTitle(state, payload) {\n state.groupTitle = payload.groupTitle;\n },\n setCustomDateFields(state, payload) {\n state.customDateFields = payload;\n },\n deleteTransaction(state, payload) {\n state.transactions.splice(payload.index, 1);\n // console.log('Deleted transaction ' + payload.index);\n // console.log(state.transactions);\n if (0 === state.transactions.length) {\n // console.log('array is empty!');\n }\n },\n setTransactionType(state, transactionType) {\n state.transactionType = transactionType;\n },\n setAllowedOpposingTypes(state, allowedOpposingTypes) {\n state.allowedOpposingTypes = allowedOpposingTypes;\n },\n setAccountToTransaction(state, payload) {\n state.accountToTransaction = payload;\n },\n updateField(state, payload) {\n state.transactions[payload.index][payload.field] = payload.value;\n },\n setTransactionError(state, payload) {\n //console.log('Will set transactions[' + payload.index + '][errors][' + payload.field + '] to ');\n //console.log(payload.errors);\n state.transactions[payload.index].errors[payload.field] = payload.errors;\n },\n setDestinationAllowedTypes(state, payload) {\n // console.log('Destination allowed types was changed!');\n state.destinationAllowedTypes = payload;\n },\n setSourceAllowedTypes(state, payload) {\n state.sourceAllowedTypes = payload;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * edit.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// initial state\nconst state = () => ({});\n\n\n// getters\nconst getters = {};\n\n// actions\nconst actions = {};\n\n// mutations\nconst mutations = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// initial state\nimport startOfDay from \"date-fns/startOfDay\";\nimport endOfDay from 'date-fns/endOfDay'\nimport startOfWeek from 'date-fns/startOfWeek'\nimport endOfWeek from 'date-fns/endOfWeek'\nimport startOfQuarter from 'date-fns/startOfQuarter';\nimport endOfQuarter from 'date-fns/endOfQuarter';\nimport endOfMonth from \"date-fns/endOfMonth\";\nimport startOfMonth from 'date-fns/startOfMonth';\n\nconst state = () => (\n {\n viewRange: 'default',\n start: null,\n end: null,\n defaultStart: null,\n defaultEnd: null,\n }\n)\n\n\n// getters\nconst getters = {\n start: state => {\n return state.start;\n },\n end: state => {\n return state.end;\n },\n defaultStart: state => {\n return state.defaultStart;\n },\n defaultEnd: state => {\n return state.defaultEnd;\n },\n viewRange: state => {\n return state.viewRange;\n }\n}\n\n// actions\nconst actions = {\n initialiseStore(context) {\n // console.log('initialiseStore for dashboard.');\n\n // restore from local storage:\n context.dispatch('restoreViewRange');\n\n axios.get('./api/v1/preferences/viewRange')\n .then(response => {\n let viewRange = response.data.data.attributes.data;\n let oldViewRange = context.getters.viewRange;\n context.commit('setViewRange', viewRange);\n if (viewRange !== oldViewRange) {\n // console.log('View range changed from \"' + oldViewRange + '\" to \"' + viewRange + '\"');\n context.dispatch('setDatesFromViewRange');\n }\n if (viewRange === oldViewRange) {\n // console.log('Restore view range dates');\n context.dispatch('restoreViewRangeDates');\n }\n }\n ).catch(() => {\n context.commit('setViewRange', '1M');\n context.dispatch('setDatesFromViewRange');\n });\n\n },\n restoreViewRangeDates: function (context) {\n // check local storage first?\n if (localStorage.viewRangeStart) {\n // console.log('view range start set from local storage.');\n context.commit('setStart', new Date(localStorage.viewRangeStart));\n }\n if (localStorage.viewRangeEnd) {\n // console.log('view range end set from local storage.');\n context.commit('setEnd', new Date(localStorage.viewRangeEnd));\n }\n // also set default:\n if (localStorage.viewRangeDefaultStart) {\n // console.log('view range default start set from local storage.');\n // console.log(localStorage.viewRangeDefaultStart);\n context.commit('setDefaultStart', new Date(localStorage.viewRangeDefaultStart));\n }\n if (localStorage.viewRangeDefaultEnd) {\n // console.log('view range default end set from local storage.');\n // console.log(localStorage.viewRangeDefaultEnd);\n context.commit('setDefaultEnd', new Date(localStorage.viewRangeDefaultEnd));\n }\n },\n restoreViewRange: function (context) {\n // console.log('restoreViewRange');\n let viewRange = localStorage.getItem('viewRange');\n if (null !== viewRange) {\n // console.log('restored restoreViewRange ' + viewRange );\n context.commit('setViewRange', viewRange);\n }\n },\n setDatesFromViewRange(context) {\n let start;\n let end;\n let viewRange = context.getters.viewRange;\n let today = new Date;\n // console.log('Will recreate view range on ' + viewRange);\n switch (viewRange) {\n case '1D':\n // today:\n start = startOfDay(today);\n end = endOfDay(today);\n break;\n case '1W':\n // this week:\n start = startOfDay(startOfWeek(today, {weekStartsOn: 1}));\n end = endOfDay(endOfWeek(today, {weekStartsOn: 1}));\n break;\n case '1M':\n // this month:\n start = startOfDay(startOfMonth(today));\n end = endOfDay(endOfMonth(today));\n break;\n case '3M':\n // this quarter\n start = startOfDay(startOfQuarter(today));\n end = endOfDay(endOfQuarter(today));\n break;\n case '6M':\n // this half-year\n if (today.getMonth() <= 5) {\n start = new Date(today);\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n end = new Date(today);\n end.setMonth(5);\n end.setDate(30);\n end = endOfDay(start);\n }\n if (today.getMonth() > 5) {\n start = new Date(today);\n start.setMonth(6);\n start.setDate(1);\n start = startOfDay(start);\n end = new Date(today);\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(start);\n }\n break;\n case '1Y':\n // this year\n start = new Date(today);\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n\n end = new Date(today);\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n break;\n }\n // console.log('Range is ' + viewRange);\n // console.log('Start is ' + start);\n // console.log('End is ' + end);\n context.commit('setStart', start);\n context.commit('setEnd', end);\n context.commit('setDefaultStart', start);\n context.commit('setDefaultEnd', end);\n }\n}\n\n// mutations\nconst mutations = {\n setStart(state, value) {\n state.start = value;\n window.localStorage.setItem('viewRangeStart', value);\n },\n setEnd(state, value) {\n state.end = value;\n window.localStorage.setItem('viewRangeEnd', value);\n },\n setDefaultStart(state, value) {\n state.defaultStart = value;\n window.localStorage.setItem('viewRangeDefaultStart', value);\n },\n setDefaultEnd(state, value) {\n state.defaultEnd = value;\n window.localStorage.setItem('viewRangeDefaultEnd', value);\n },\n setViewRange(state, range) {\n state.viewRange = range;\n window.localStorage.setItem('viewRange', range);\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * root.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// initial state\nconst state = () => (\n {\n listPageSize: 33,\n timezone: '',\n cacheKey: {\n age: 0,\n value: 'empty',\n },\n }\n)\n\n\n// getters\nconst getters = {\n listPageSize: state => {\n return state.listPageSize;\n },\n timezone: state => {\n // console.log('Wil return ' + state.listPageSize);\n return state.timezone;\n },\n cacheKey: state => {\n return state.cacheKey.value;\n },\n}\n\n// actions\nconst actions = {\n initialiseStore(context) {\n // cache key auto refreshes every day\n // console.log('Now in initialize store.')\n if (localStorage.cacheKey) {\n // console.log('Storage has cache key: ');\n // console.log(localStorage.cacheKey);\n let object = JSON.parse(localStorage.cacheKey);\n if (Date.now() - object.age > 86400000) {\n // console.log('Key is here but is old.');\n context.commit('refreshCacheKey');\n } else {\n // console.log('Cache key from local storage: ' + object.value);\n context.commit('setCacheKey', object);\n }\n } else {\n // console.log('No key need new one.');\n context.commit('refreshCacheKey');\n }\n if (localStorage.listPageSize) {\n state.listPageSize = localStorage.listPageSize;\n context.commit('setListPageSize', {length: localStorage.listPageSize});\n }\n if (!localStorage.listPageSize) {\n axios.get('./api/v1/preferences/listPageSize')\n .then(response => {\n // console.log('from API: listPageSize is ' + parseInt(response.data.data.attributes.data));\n context.commit('setListPageSize', {length: parseInt(response.data.data.attributes.data)});\n }\n );\n }\n if (localStorage.timezone) {\n state.timezone = localStorage.timezone;\n context.commit('setTimezone', {timezone: localStorage.timezone});\n }\n if (!localStorage.timezone) {\n axios.get('./api/v1/configuration/app.timezone')\n .then(response => {\n context.commit('setTimezone', {timezone: response.data.data.value});\n }\n );\n }\n }\n}\n\n// mutations\nconst mutations = {\n refreshCacheKey(state) {\n let age = Date.now();\n let N = 8;\n let cacheKey = Array(N+1).join((Math.random().toString(36)+'00000000000000000').slice(2, 18)).slice(0, N);\n let object = {age: age, value: cacheKey};\n // console.log('Store new key in string JSON');\n // console.log(JSON.stringify(object));\n localStorage.cacheKey = JSON.stringify(object);\n state.cacheKey = {age: age, value: cacheKey};\n // console.log('Refresh: cachekey is now ' + cacheKey);\n },\n setCacheKey(state, payload) {\n // console.log('Stored cache key in localstorage.');\n // console.log(payload);\n // console.log(JSON.stringify(payload));\n localStorage.cacheKey = JSON.stringify(payload);\n state.cacheKey = payload;\n },\n setListPageSize(state, payload) {\n // console.log('Got a payload in setListPageSize');\n // console.log(payload);\n let number = parseInt(payload.length);\n if (0 !== number) {\n state.listPageSize = number;\n localStorage.listPageSize = number;\n }\n },\n setTimezone(state, payload) {\n\n if ('' !== payload.timezone) {\n state.timezone = payload.timezone;\n localStorage.timezone = payload.timezone;\n }\n },\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// initial state\nconst state = () => (\n {\n orderMode: false,\n activeFilter: 1\n }\n)\n\n\n// getters\nconst getters = {\n orderMode: state => {\n return state.orderMode;\n },\n activeFilter: state => {\n return state.activeFilter;\n }\n}\n\n// actions\nconst actions = {}\n\n// mutations\nconst mutations = {\n setOrderMode(state, payload) {\n state.orderMode = payload;\n },\n setActiveFilter(state, payload) {\n state.activeFilter = payload;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport Vue from 'vue'\nimport Vuex, {createLogger} from 'vuex'\nimport transactions_create from './modules/transactions/create';\nimport transactions_edit from './modules/transactions/edit';\nimport dashboard_index from './modules/dashboard/index';\nimport root_store from './modules/root';\nimport accounts_index from './modules/accounts/index';\n\nVue.use(Vuex)\nconst debug = process.env.NODE_ENV !== 'production'\n\nexport default new Vuex.Store(\n {\n namespaced: true,\n modules: {\n root: root_store,\n transactions: {\n namespaced: true,\n modules: {\n create: transactions_create,\n edit: transactions_edit\n }\n },\n accounts: {\n namespaced: true,\n modules: {\n index: accounts_index\n },\n },\n dashboard: {\n namespaced: true,\n modules: {\n index: dashboard_index\n }\n }\n },\n strict: debug,\n plugins: debug ? [createLogger()] : [],\n state: {\n currencyPreference: {},\n locale: 'en-US',\n listPageSize: 50\n },\n mutations: {\n setCurrencyPreference(state, payload) {\n state.currencyPreference = payload.payload;\n },\n initialiseStore(state) {\n // console.log('Now in initialiseStore()')\n // if locale in local storage:\n if (localStorage.locale) {\n state.locale = localStorage.locale;\n return;\n }\n\n // set locale from HTML:\n let localeToken = document.head.querySelector('meta[name=\"locale\"]');\n if (localeToken) {\n state.locale = localeToken.content;\n localStorage.locale = localeToken.content;\n }\n }\n },\n getters: {\n currencyCode: state => {\n return state.currencyPreference.code;\n },\n currencyPreference: state => {\n return state.currencyPreference;\n },\n currencyId: state => {\n return state.currencyPreference.id;\n },\n locale: state => {\n return state.locale;\n }\n },\n actions: {\n\n updateCurrencyPreference(context) {\n // console.log('Now in updateCurrencyPreference');\n if (localStorage.currencyPreference) {\n context.commit('setCurrencyPreference', {payload: JSON.parse(localStorage.currencyPreference)});\n return;\n }\n axios.get('./api/v1/currencies/default')\n .then(response => {\n let currencyResponse = {\n id: parseInt(response.data.data.id),\n name: response.data.data.attributes.name,\n symbol: response.data.data.attributes.symbol,\n code: response.data.data.attributes.code,\n decimal_places: parseInt(response.data.data.attributes.decimal_places),\n };\n localStorage.currencyPreference = JSON.stringify(currencyResponse);\n //console.log('getCurrencyPreference from server')\n //console.log(JSON.stringify(currencyResponse));\n context.commit('setCurrencyPreference', {payload: currencyResponse});\n }).catch(err => {\n // console.log('Got error response.');\n console.error(err);\n context.commit('setCurrencyPreference', {\n payload: {\n id: 1,\n name: 'Euro',\n symbol: '€',\n code: 'EUR',\n decimal_places: 2\n }\n });\n });\n\n }\n }\n }\n);","/*\n * i18n.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n// Create VueI18n instance with options\nmodule.exports = new vuei18n({\n locale: document.documentElement.lang, // set locale\n fallbackLocale: 'en',\n messages: {\n 'bg': require('./locales/bg.json'),\n 'cs': require('./locales/cs.json'),\n 'de': require('./locales/de.json'),\n 'en': require('./locales/en.json'),\n 'en-us': require('./locales/en.json'),\n 'en-gb': require('./locales/en-gb.json'),\n 'es': require('./locales/es.json'),\n 'el': require('./locales/el.json'),\n 'fr': require('./locales/fr.json'),\n 'hu': require('./locales/hu.json'),\n //'id': require('./locales/id.json'),\n 'it': require('./locales/it.json'),\n 'nl': require('./locales/nl.json'),\n 'nb': require('./locales/nb.json'),\n 'pl': require('./locales/pl.json'),\n 'fi': require('./locales/fi.json'),\n 'pt-br': require('./locales/pt-br.json'),\n 'pt-pt': require('./locales/pt.json'),\n 'ro': require('./locales/ro.json'),\n 'ru': require('./locales/ru.json'),\n //'zh': require('./locales/zh.json'),\n 'zh-tw': require('./locales/zh-tw.json'),\n 'zh-cn': require('./locales/zh-cn.json'),\n 'sk': require('./locales/sk.json'),\n 'sv': require('./locales/sv.json'),\n 'vi': require('./locales/vi.json'),\n }\n});\n","<!--\n - Index.vue\n - Copyright (c) 2021 james@firefly-iii.org\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <https://www.gnu.org/licenses/>.\n -->\n\n<template>\n <div>\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"card\">\n <div class=\"card-body\">\n Treemap categories\n </div>\n </div>\n </div>\n <div class=\"col\">\n <div class=\"card\">\n <div class=\"card-body\">\n Treemap accounts\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-8 col-md-6 col-sm-12 col-xs-12\">\n <b-pagination\n v-model=\"currentPage\"\n :total-rows=\"total\"\n :per-page=\"perPage\"\n aria-controls=\"my-table\"\n ></b-pagination>\n </div>\n <div class=\"col-lg-4 col-md-6 col-sm-12 col-xs-12\">\n <button @click=\"newCacheKey\" class=\"btn btn-sm float-right btn-info\"><span class=\"fas fa-sync\"></span></button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"card\">\n <div class=\"card-body p-0\">\n <b-table id=\"my-table\" small striped hover responsive=\"md\" primary-key=\"key\" :no-local-sorting=\"false\"\n :items=\"transactionRows\"\n :fields=\"fields\"\n :per-page=\"perPage\"\n sort-icon-left\n ref=\"table\"\n :current-page=\"currentPage\"\n :busy.sync=\"loading\"\n :sort-desc.sync=\"sortDesc\"\n :sort-compare=\"tableSortCompare\"\n >\n <template #table-busy>\n <span class=\"fa fa-spinner\"></span>\n </template>\n <template #cell(type)=\"data\">\n <span v-if=\"! data.item.split || data.item.split_parent === null\">\n <span class=\"fas fa-long-arrow-alt-right\" v-if=\"'deposit' === data.item.type\"></span>\n <span class=\"fas fa-long-arrow-alt-left\" v-else-if=\"'withdrawal' === data.item.type\"></span>\n <span class=\"fas fa-long-arrows-alt-h\" v-else-if=\"'transfer' === data.item.type\"></span>\n </span>\n </template>\n <template #cell(description)=\"data\">\n <span class=\"fas fa-angle-right\" v-if=\"data.item.split && data.item.split_parent !== null\"></span>\n <a :class=\"false === data.item.active ? 'text-muted' : ''\" :href=\"'./transactions/show/' + data.item.id\" :title=\"data.value\">{{\n data.value\n }}</a>\n </template>\n <template #cell(amount)=\"data\">\n <span class=\"text-success\" v-if=\"'deposit' === data.item.type\">\n {{ Intl.NumberFormat(locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount) }}\n </span>\n\n <span class=\"text-danger\" v-else-if=\"'withdrawal' === data.item.type\">\n {{ Intl.NumberFormat(locale, {style: 'currency', currency: data.item.currency_code}).format(-data.item.amount) }}\n </span>\n\n <span class=\"text-muted\" v-else-if=\"'transfer' === data.item.type\">\n {{ Intl.NumberFormat(locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount) }}\n </span>\n </template>\n <template #cell(date)=\"data\">\n {{ data.item.date_formatted }}\n </template>\n <template #cell(source_account)=\"data\">\n <a :class=\"false === data.item.active ? 'text-muted' : ''\" :href=\"'./accounts/show/' + data.item.source_id\"\n :title=\"data.item.source_name\">{{ data.item.source_name }}</a>\n </template>\n <template #cell(destination_account)=\"data\">\n <a :class=\"false === data.item.active ? 'text-muted' : ''\" :href=\"'./accounts/show/' + data.item.destination_id\"\n :title=\"data.item.destination_name\">{{ data.item.destination_name }}</a>\n </template>\n <template #cell(menu)=\"data\">\n <div class=\"btn-group btn-group-sm\" v-if=\"! data.item.split || data.item.split_parent === null\">\n <div class=\"dropdown\">\n <button class=\"btn btn-light btn-sm dropdown-toggle\" type=\"button\" :id=\"'dropdownMenuButton' + data.item.id\" data-toggle=\"dropdown\"\n aria-haspopup=\"true\" aria-expanded=\"false\">\n {{ $t('firefly.actions') }}\n </button>\n <div class=\"dropdown-menu\" :aria-labelledby=\"'dropdownMenuButton' + data.item.id\">\n <a class=\"dropdown-item\" :href=\"'./transactions/edit/' + data.item.id\"><span class=\"fa fas fa-pencil-alt\"></span> {{ $t('firefly.edit') }}</a>\n <a class=\"dropdown-item\" :href=\"'./transactions/delete/' + data.item.id\"><span class=\"fa far fa-trash\"></span> {{ $t('firefly.delete') }}</a>\n </div>\n </div>\n </div>\n <div class=\"btn btn-light btn-sm\" v-if=\"data.item.split && data.item.split_parent === null && data.item.collapsed === true\"\n v-on:click=\"toggleCollapse(data.item)\">\n <span class=\"fa fa-caret-down\"></span>\n {{ $t('firefly.transaction_expand_split') }}\n </div>\n <div class=\"btn btn-light btn-sm\" v-else-if=\"data.item.split && data.item.split_parent === null && data.item.collapsed === false\"\n v-on:click=\"toggleCollapse(data.item)\">\n <span class=\"fa fa-caret-up\"></span>\n {{ $t('firefly.transaction_collapse_split') }}\n </div>\n </template>\n <template #cell(category)=\"data\">\n {{ data.item.category_name }}\n </template>\n </b-table>\n </div>\n <div class=\"card-footer\">\n <a :href=\"'./transactions/create/' + type\" class=\"btn btn-success\"\n :title=\"$t('firefly.create_new_transaction')\">{{ $t('firefly.create_new_transaction') }}</a>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-8 col-md-6 col-sm-12 col-xs-12\">\n <b-pagination\n v-model=\"currentPage\"\n :total-rows=\"total\"\n :per-page=\"perPage\"\n aria-controls=\"my-table\"\n ></b-pagination>\n </div>\n <div class=\"col-lg-4 col-md-6 col-sm-12 col-xs-12\">\n <button @click=\"newCacheKey\" class=\"btn btn-sm float-right btn-info\"><span class=\"fas fa-sync\"></span></button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xl-2 col-lg-4 col-sm-6 col-xs-12\" v-for=\"range in ranges\">\n <div class=\"card\">\n <div class=\"card-header\">\n <h3 class=\"card-title\">{{ formatDate(range.start, 'yyyy-LL') }}</h3>\n </div>\n <div class=\"card-body\">\n <a :href=\"'./transactions/' + type + '/' + formatDate(range.start,'yyyy-LL-dd') + '/' + formatDate(range.end, 'yyyy-LL-dd')\">Transactions</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\n\nimport {mapGetters, mapMutations} from \"vuex\";\nimport format from \"date-fns/format\";\nimport sub from \"date-fns/sub\";\nimport startOfMonth from \"date-fns/startOfMonth\";\nimport endOfMonth from \"date-fns/endOfMonth\";\nimport {configureAxios} from \"../../shared/forageStore\";\n\nexport default {\n name: \"Index\",\n data() {\n return {\n transactions: [],\n transactionRows: [],\n type: 'all',\n downloaded: false,\n loading: false,\n ready: false,\n fields: [],\n currentPage: 1,\n perPage: 5,\n total: 1,\n sortBy: 'order',\n sortDesc: false,\n api: null,\n sortableOptions: {\n disabled: false,\n chosenClass: 'is-selected',\n onEnd: null\n },\n sortable: null,\n locale: 'en-US',\n ranges: [],\n urlStart: null,\n urlEnd: null,\n }\n },\n watch: {\n storeReady: function () {\n this.getTransactionList();\n },\n start: function () {\n this.getTransactionList();\n },\n end: function () {\n this.getTransactionList();\n },\n activeFilter: function (value) {\n this.filterAccountList();\n }\n },\n computed: {\n ...mapGetters('root', ['listPageSize', 'cacheKey']),\n ...mapGetters('dashboard/index', ['start', 'end',]),\n 'indexReady': function () {\n return null !== this.start && null !== this.end && null !== this.listPageSize && this.ready;\n },\n cardTitle: function () {\n return this.$t('firefly.' + this.type + '_transactions');\n }\n },\n created() {\n this.locale = localStorage.locale ?? 'en-US';\n let pathName = window.location.pathname;\n let parts = pathName.split('/');\n this.type = parts[parts.length - 1];\n this.perPage = this.listPageSize ?? 51;\n if (5 === parts.length) {\n this.urlStart = new Date(parts[3]);\n this.urlEnd = new Date(parts[4]);\n this.type = parts[parts.length - 3];\n }\n\n let params = new URLSearchParams(window.location.search);\n this.currentPage = params.get('page') ? parseInt(params.get('page')) : 1;\n this.updateFieldList();\n this.ready = true;\n\n // make object thing:\n // let token = document.head.querySelector('meta[name=\"csrf-token\"]');\n // this.api = setup(\n // {\n // // `axios` options\n // //baseURL: './',\n // headers: {'X-CSRF-TOKEN': token.content, 'X-James': 'yes'},\n //\n // // `axios-cache-adapter` options\n // cache: {\n // maxAge: 15 * 60 * 1000,\n // readHeaders: false,\n // exclude: {\n // query: false,\n // },\n // debug: true\n // }\n // });\n },\n methods: {\n ...mapMutations('root', ['refreshCacheKey',]),\n updateFieldList: function () {\n this.fields = [\n {key: 'type', label: ' ', sortable: false},\n {key: 'description', label: this.$t('list.description'), sortable: true},\n {key: 'amount', label: this.$t('list.amount'), sortable: true},\n {key: 'date', label: this.$t('list.date'), sortable: true},\n {key: 'source_account', label: this.$t('list.source_account'), sortable: true},\n {key: 'destination_account', label: this.$t('list.destination_account'), sortable: true},\n {key: 'category_name', label: this.$t('list.category'), sortable: true},\n {key: 'menu', label: ' ', sortable: false},\n ];\n },\n newCacheKey: function () {\n this.refreshCacheKey();\n this.downloaded = false;\n this.accounts = [];\n this.getTransactionList();\n },\n getTransactionList: function () {\n // console.log('getTransactionList()');\n if (this.indexReady && !this.loading && !this.downloaded) {\n // console.log('Index ready, not loading and not already downloaded. Reset.');\n this.loading = true;\n this.perPage = this.listPageSize ?? 51;\n this.transactions = [];\n this.transactionRows = [];\n this.downloadTransactionList(1);\n this.calculateDateRanges();\n }\n },\n calculateDateRanges: function () {\n let yearAgo = sub(this.start, {years: 1});\n let currentDate = this.start;\n\n while (currentDate > yearAgo) {\n // start + end of month:\n let st = startOfMonth(currentDate);\n let en = endOfMonth(currentDate);\n\n this.ranges.push({start: st, end: en});\n\n currentDate = sub(currentDate, {months: 1});\n //console.log(currentDate);\n }\n },\n formatDate: function (date, frm) {\n return format(date, frm);\n },\n downloadTransactionList: function (page) {\n // console.log('downloadTransactionList(' + page + ')');\n configureAxios().then(async (api) => {\n let startStr = format(this.start, 'y-MM-dd');\n let endStr = format(this.end, 'y-MM-dd');\n console.log(this.urlEnd);\n console.log(this.urlStart);\n if(null !== this.urlEnd && null !== this.urlStart) {\n startStr = format(this.urlStart, 'y-MM-dd');\n endStr = format(this.urlEnd, 'y-MM-dd');\n }\n\n api.get('./api/v1/transactions?type=' + this.type + '&page=' + page + \"&start=\" + startStr + \"&end=\" + endStr + '&cache=' + this.cacheKey)\n .then(response => {\n\n //let currentPage = parseInt(response.data.meta.pagination.current_page);\n //let totalPages = parseInt(response.data.meta.pagination.total_pages);\n this.total = parseInt(response.data.meta.pagination.total);\n //console.log('total is ' + this.total);\n this.transactions.push(...response.data.data);\n // if (currentPage < totalPage) {\n // let nextPage = currentPage + 1;\n // this.downloadTransactionList(nextPage);\n // }\n // if (currentPage >= totalPage) {\n // console.log('Looks like all downloaded.');\n this.downloaded = true;\n this.createTransactionRows();\n // }\n\n }\n );\n });\n },\n createTransactionRows: function () {\n this.transactionRows = [];\n for (let i in this.transactions) {\n let transaction = this.transactions[i];\n let transactionRow = this.getTransactionRow(transaction, 0);\n this.transactionRows.push(transactionRow);\n\n if (transaction.attributes.transactions.length > 1) {\n transactionRow.description = transaction.attributes.group_title;\n transactionRow.split = true;\n transactionRow.collapsed = transaction.collapsed === true || transaction.collapsed === undefined;\n transactionRow.amount = transaction.attributes.transactions\n .map(transaction => Number(transaction.amount))\n .reduce((sum, n) => sum + n);\n transactionRow.source_name = '';\n transactionRow.source_id = '';\n transactionRow.destination_name = '';\n transactionRow.destination_id = '';\n\n if (!transactionRow.collapsed) {\n for (let i = 0; i < transaction.attributes.transactions.length; i++) {\n let splitTransactionRow = this.getTransactionRow(transaction, i);\n splitTransactionRow.key = splitTransactionRow.id + \".\" + i\n splitTransactionRow.split = true;\n splitTransactionRow.split_index = i + 1;\n splitTransactionRow.split_parent = transactionRow;\n this.transactionRows.push(splitTransactionRow);\n }\n }\n }\n }\n\n this.loading = false;\n },\n getTransactionRow(transaction, index) {\n let transactionRow = {};\n let currentTransaction = transaction.attributes.transactions[index];\n\n transactionRow.key = transaction.id;\n transactionRow.id = transaction.id;\n transactionRow.type = currentTransaction.type;\n transactionRow.description = currentTransaction.description;\n transactionRow.amount = currentTransaction.amount;\n transactionRow.currency_code = currentTransaction.currency_code;\n transactionRow.date = new Date(currentTransaction.date);\n transactionRow.date_formatted = format(transactionRow.date, this.$t('config.month_and_day_fns'));\n transactionRow.source_name = currentTransaction.source_name;\n transactionRow.source_id = currentTransaction.source_id;\n transactionRow.destination_name = currentTransaction.destination_name;\n transactionRow.destination_id = currentTransaction.destination_id;\n transactionRow.category_id = currentTransaction.category_id;\n transactionRow.category_name = currentTransaction.category_name;\n transactionRow.split = false;\n transactionRow.split_index = 0;\n transactionRow.split_parent = null;\n\n return transactionRow;\n },\n toggleCollapse: function (row) {\n let transaction = this.transactions.filter(transaction => transaction.id === row.id)[0];\n if (transaction.collapsed === undefined) {\n transaction.collapsed = false;\n } else {\n transaction.collapsed = !transaction.collapsed;\n }\n this.createTransactionRows();\n },\n tableSortCompare: function (aRow, bRow, key, sortDesc, formatter, compareOptions, compareLocale) {\n let a = aRow[key]\n let b = bRow[key]\n\n if (aRow.id === bRow.id) {\n // Order split transactions normally when compared to each other, except always put the header first\n if (aRow.split_parent === null) {\n return sortDesc ? 1 : -1;\n } else if (bRow.split_parent === null) {\n return sortDesc ? -1 : 1;\n }\n } else {\n // Sort split transactions based on their parent when compared to other transactions\n if (aRow.split && aRow.split_parent !== null) {\n a = aRow.split_parent[key]\n }\n if (bRow.split && bRow.split_parent !== null) {\n b = bRow.split_parent[key]\n }\n }\n\n if (\n (typeof a === 'number' && typeof b === 'number') ||\n (a instanceof Date && b instanceof Date)\n ) {\n // If both compared fields are native numbers or both are native dates\n return a < b ? -1 : a > b ? 1 : 0\n } else {\n // Otherwise stringify the field data and use String.prototype.localeCompare\n return toString(a).localeCompare(toString(b), compareLocale, compareOptions)\n }\n\n function toString(value) {\n if (value === null || typeof value === 'undefined') {\n return ''\n } else if (value instanceof Object) {\n return Object.keys(value)\n .sort()\n .map(key => toString(value[key]))\n .join(' ')\n } else {\n return String(value)\n }\n }\n },\n },\n}\n</script>","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Index.vue?vue&type=template&id=4db783fe&\"\nimport script from \"./Index.vue?vue&type=script&lang=js&\"\nexport * from \"./Index.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-lg-8 col-md-6 col-sm-12 col-xs-12\"},[_c('b-pagination',{attrs:{\"total-rows\":_vm.total,\"per-page\":_vm.perPage,\"aria-controls\":\"my-table\"},model:{value:(_vm.currentPage),callback:function ($$v) {_vm.currentPage=$$v},expression:\"currentPage\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"col-lg-4 col-md-6 col-sm-12 col-xs-12\"},[_c('button',{staticClass:\"btn btn-sm float-right btn-info\",on:{\"click\":_vm.newCacheKey}},[_c('span',{staticClass:\"fas fa-sync\"})])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body p-0\"},[_c('b-table',{ref:\"table\",attrs:{\"id\":\"my-table\",\"small\":\"\",\"striped\":\"\",\"hover\":\"\",\"responsive\":\"md\",\"primary-key\":\"key\",\"no-local-sorting\":false,\"items\":_vm.transactionRows,\"fields\":_vm.fields,\"per-page\":_vm.perPage,\"sort-icon-left\":\"\",\"current-page\":_vm.currentPage,\"busy\":_vm.loading,\"sort-desc\":_vm.sortDesc,\"sort-compare\":_vm.tableSortCompare},on:{\"update:busy\":function($event){_vm.loading=$event},\"update:sortDesc\":function($event){_vm.sortDesc=$event},\"update:sort-desc\":function($event){_vm.sortDesc=$event}},scopedSlots:_vm._u([{key:\"table-busy\",fn:function(){return [_c('span',{staticClass:\"fa fa-spinner\"})]},proxy:true},{key:\"cell(type)\",fn:function(data){return [(! data.item.split || data.item.split_parent === null)?_c('span',[('deposit' === data.item.type)?_c('span',{staticClass:\"fas fa-long-arrow-alt-right\"}):('withdrawal' === data.item.type)?_c('span',{staticClass:\"fas fa-long-arrow-alt-left\"}):('transfer' === data.item.type)?_c('span',{staticClass:\"fas fa-long-arrows-alt-h\"}):_vm._e()]):_vm._e()]}},{key:\"cell(description)\",fn:function(data){return [(data.item.split && data.item.split_parent !== null)?_c('span',{staticClass:\"fas fa-angle-right\"}):_vm._e(),_vm._v(\" \"),_c('a',{class:false === data.item.active ? 'text-muted' : '',attrs:{\"href\":'./transactions/show/' + data.item.id,\"title\":data.value}},[_vm._v(_vm._s(data.value))])]}},{key:\"cell(amount)\",fn:function(data){return [('deposit' === data.item.type)?_c('span',{staticClass:\"text-success\"},[_vm._v(\"\\n \"+_vm._s(Intl.NumberFormat(_vm.locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount))+\"\\n \")]):('withdrawal' === data.item.type)?_c('span',{staticClass:\"text-danger\"},[_vm._v(\"\\n \"+_vm._s(Intl.NumberFormat(_vm.locale, {style: 'currency', currency: data.item.currency_code}).format(-data.item.amount))+\"\\n \")]):('transfer' === data.item.type)?_c('span',{staticClass:\"text-muted\"},[_vm._v(\"\\n \"+_vm._s(Intl.NumberFormat(_vm.locale, {style: 'currency', currency: data.item.currency_code}).format(data.item.amount))+\"\\n \")]):_vm._e()]}},{key:\"cell(date)\",fn:function(data){return [_vm._v(\"\\n \"+_vm._s(data.item.date_formatted)+\"\\n \")]}},{key:\"cell(source_account)\",fn:function(data){return [_c('a',{class:false === data.item.active ? 'text-muted' : '',attrs:{\"href\":'./accounts/show/' + data.item.source_id,\"title\":data.item.source_name}},[_vm._v(_vm._s(data.item.source_name))])]}},{key:\"cell(destination_account)\",fn:function(data){return [_c('a',{class:false === data.item.active ? 'text-muted' : '',attrs:{\"href\":'./accounts/show/' + data.item.destination_id,\"title\":data.item.destination_name}},[_vm._v(_vm._s(data.item.destination_name))])]}},{key:\"cell(menu)\",fn:function(data){return [(! data.item.split || data.item.split_parent === null)?_c('div',{staticClass:\"btn-group btn-group-sm\"},[_c('div',{staticClass:\"dropdown\"},[_c('button',{staticClass:\"btn btn-light btn-sm dropdown-toggle\",attrs:{\"type\":\"button\",\"id\":'dropdownMenuButton' + data.item.id,\"data-toggle\":\"dropdown\",\"aria-haspopup\":\"true\",\"aria-expanded\":\"false\"}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.actions'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"dropdown-menu\",attrs:{\"aria-labelledby\":'dropdownMenuButton' + data.item.id}},[_c('a',{staticClass:\"dropdown-item\",attrs:{\"href\":'./transactions/edit/' + data.item.id}},[_c('span',{staticClass:\"fa fas fa-pencil-alt\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.edit')))]),_vm._v(\" \"),_c('a',{staticClass:\"dropdown-item\",attrs:{\"href\":'./transactions/delete/' + data.item.id}},[_c('span',{staticClass:\"fa far fa-trash\"}),_vm._v(\" \"+_vm._s(_vm.$t('firefly.delete')))])])])]):_vm._e(),_vm._v(\" \"),(data.item.split && data.item.split_parent === null && data.item.collapsed === true)?_c('div',{staticClass:\"btn btn-light btn-sm\",on:{\"click\":function($event){return _vm.toggleCollapse(data.item)}}},[_c('span',{staticClass:\"fa fa-caret-down\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.transaction_expand_split'))+\"\\n \")]):(data.item.split && data.item.split_parent === null && data.item.collapsed === false)?_c('div',{staticClass:\"btn btn-light btn-sm\",on:{\"click\":function($event){return _vm.toggleCollapse(data.item)}}},[_c('span',{staticClass:\"fa fa-caret-up\"}),_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.transaction_collapse_split'))+\"\\n \")]):_vm._e()]}},{key:\"cell(category)\",fn:function(data){return [_vm._v(\"\\n \"+_vm._s(data.item.category_name)+\"\\n \")]}}])})],1),_vm._v(\" \"),_c('div',{staticClass:\"card-footer\"},[_c('a',{staticClass:\"btn btn-success\",attrs:{\"href\":'./transactions/create/' + _vm.type,\"title\":_vm.$t('firefly.create_new_transaction')}},[_vm._v(_vm._s(_vm.$t('firefly.create_new_transaction')))])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-lg-8 col-md-6 col-sm-12 col-xs-12\"},[_c('b-pagination',{attrs:{\"total-rows\":_vm.total,\"per-page\":_vm.perPage,\"aria-controls\":\"my-table\"},model:{value:(_vm.currentPage),callback:function ($$v) {_vm.currentPage=$$v},expression:\"currentPage\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"col-lg-4 col-md-6 col-sm-12 col-xs-12\"},[_c('button',{staticClass:\"btn btn-sm float-right btn-info\",on:{\"click\":_vm.newCacheKey}},[_c('span',{staticClass:\"fas fa-sync\"})])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},_vm._l((_vm.ranges),function(range){return _c('div',{staticClass:\"col-xl-2 col-lg-4 col-sm-6 col-xs-12\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-header\"},[_c('h3',{staticClass:\"card-title\"},[_vm._v(_vm._s(_vm.formatDate(range.start, 'yyyy-LL')))])]),_vm._v(\" \"),_c('div',{staticClass:\"card-body\"},[_c('a',{attrs:{\"href\":'./transactions/' + _vm.type + '/' + _vm.formatDate(range.start,'yyyy-LL-dd') + '/' + _vm.formatDate(range.end, 'yyyy-LL-dd')}},[_vm._v(\"Transactions\")])])])])}),0)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_vm._v(\"\\n Treemap categories\\n \")])])]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-body\"},[_vm._v(\"\\n Treemap accounts\\n \")])])])])}]\n\nexport { render, staticRenderFns }","/*\n * index.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nrequire('../../bootstrap');\n\nimport Vue from \"vue\";\nimport store from \"../../components/store\";\nimport Index from \"../../components/transactions/Index\";\nimport {BPagination, BTable} from 'bootstrap-vue';\nimport Calendar from \"../../components/dashboard/Calendar\";\n\n// i18n\nlet i18n = require('../../i18n');\nlet props = {};\n\nVue.component('b-table', BTable);\nVue.component('b-pagination', BPagination);\n\nconst app = new Vue({\n i18n,\n store,\n render(createElement) {\n return createElement(Index, {props: props});\n },\n beforeCreate() {\n// See reference nr. 2\n this.$store.commit('initialiseStore');\n this.$store.dispatch('updateCurrencyPreference');\n\n // init the new root store (dont care about results)\n this.$store.dispatch('root/initialiseStore');\n\n // also init the dashboard store.\n this.$store.dispatch('dashboard/index/initialiseStore');\n },\n }).$mount('#transactions_index');\n\nconst calendar = new Vue({\n i18n,\n store,\n el: \"#calendar\",\n render: (createElement) => {\n return createElement(Calendar, {props: props});\n },\n });","/*\n * forageStore.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport localforage from 'localforage'\nimport memoryDriver from 'localforage-memoryStorageDriver'\nimport {setup} from 'axios-cache-adapter'\n\n// `async` wrapper to configure `localforage` and instantiate `axios` with `axios-cache-adapter`\nexport async function configureAxios() {\n // Register the custom `memoryDriver` to `localforage`\n await localforage.defineDriver(memoryDriver)\n\n // Create `localforage` instance\n const forageStore = localforage.createInstance({\n // List of drivers used\n driver: [\n localforage.INDEXEDDB,\n localforage.LOCALSTORAGE,\n memoryDriver._driver\n ],\n // Prefix all storage keys to prevent conflicts\n name: 'my-cache'\n })\n\n // Create `axios` instance with pre-configured `axios-cache-adapter` using a `localforage` store\n let token = document.head.querySelector('meta[name=\"csrf-token\"]');\n return setup({\n // `axios` options\n baseURL: './',\n headers: {'X-CSRF-TOKEN': token.content, 'X-James-Rocks': 'oh yes'},\n cache: {\n // `axios-cache-adapter` options\n maxAge: 24 * 60 * 60 * 1000, // one day.\n readHeaders: false,\n exclude: {\n query: false,\n },\n debug: true,\n store: forageStore,\n }\n }\n );\n\n}","/*\n * transactions.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nexport function getDefaultErrors() {\n return {\n description: [],\n amount: [],\n source: [],\n destination: [],\n currency: [],\n foreign_currency: [],\n foreign_amount: [],\n date: [],\n custom_dates: [],\n budget: [],\n category: [],\n bill: [],\n tags: [],\n piggy_bank: [],\n internal_reference: [],\n external_url: [],\n notes: [],\n location: []\n };\n}\n\nexport function getDefaultTransaction() {\n return {\n // basic\n description: '',\n transaction_journal_id: 0,\n // accounts:\n source_account_id: null,\n source_account_name: null,\n source_account_type: null,\n\n source_account_currency_id: null,\n source_account_currency_code: null,\n source_account_currency_symbol: null,\n\n destination_account_id: null,\n destination_account_name: null,\n destination_account_type: null,\n\n destination_account_currency_id: null,\n destination_account_currency_code: null,\n destination_account_currency_symbol: null,\n attachments: false,\n selectedAttachments: false,\n uploadTrigger: false,\n clearTrigger: false,\n\n source_account: {\n id: 0,\n name: \"\",\n name_with_balance: \"\",\n type: \"\",\n currency_id: 0,\n currency_name: '',\n currency_code: '',\n currency_decimal_places: 2\n },\n destination_account: {\n id: 0,\n name: \"\",\n type: \"\",\n currency_id: 0,\n currency_name: '',\n currency_code: '',\n currency_decimal_places: 2\n },\n\n // amount:\n amount: '',\n currency_id: 0,\n foreign_amount: '',\n foreign_currency_id: 0,\n\n // meta data\n category: null,\n budget_id: 0,\n bill_id: 0,\n piggy_bank_id: 0,\n tags: [],\n\n // optional date fields (6x):\n interest_date: null,\n book_date: null,\n process_date: null,\n due_date: null,\n payment_date: null,\n invoice_date: null,\n\n // optional other fields:\n internal_reference: null,\n external_url: null,\n external_id: null,\n notes: null,\n\n // transaction links:\n links: [],\n // location:\n zoom_level: null,\n longitude: null,\n latitude: null,\n\n // error handling\n errors: {},\n }\n}\n\nexport function toW3CString(date) {\n // https://gist.github.com/tristanlins/6585391\n let year = date.getFullYear();\n let month = date.getMonth();\n month++;\n if (month < 10) {\n month = '0' + month;\n }\n let day = date.getDate();\n if (day < 10) {\n day = '0' + day;\n }\n let hours = date.getHours();\n if (hours < 10) {\n hours = '0' + hours;\n }\n let minutes = date.getMinutes();\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n let seconds = date.getSeconds();\n if (seconds < 10) {\n seconds = '0' + seconds;\n }\n let offset = -date.getTimezoneOffset();\n let offsetHours = Math.abs(Math.floor(offset / 60));\n let offsetMinutes = Math.abs(offset) - offsetHours * 60;\n if (offsetHours < 10) {\n offsetHours = '0' + offsetHours;\n }\n if (offsetMinutes < 10) {\n offsetMinutes = '0' + offsetMinutes;\n }\n let offsetSign = '+';\n if (offset < 0) {\n offsetSign = '-';\n }\n return year + '-' + month + '-' + day +\n 'T' + hours + ':' + minutes + ':' + seconds +\n offsetSign + offsetHours + ':' + offsetMinutes;\n}","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".dropdown-item[data-v-1ce542a2],.dropdown-item[data-v-1ce542a2]:hover{color:#212529}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/dashboard/Calendar.vue\"],\"names\":[],\"mappings\":\"AAslBA,sEACA,aACA\",\"sourcesContent\":[\"<!--\\n - Calendar.vue\\n - Copyright (c) 2020 james@firefly-iii.org\\n -\\n - This file is part of Firefly III (https://github.com/firefly-iii).\\n -\\n - This program is free software: you can redistribute it and/or modify\\n - it under the terms of the GNU Affero General Public License as\\n - published by the Free Software Foundation, either version 3 of the\\n - License, or (at your option) any later version.\\n -\\n - This program is distributed in the hope that it will be useful,\\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n - GNU Affero General Public License for more details.\\n -\\n - You should have received a copy of the GNU Affero General Public License\\n - along with this program. If not, see <https://www.gnu.org/licenses/>.\\n -->\\n\\n<template>\\n <div>\\n <div class=\\\"row\\\">\\n <div class=\\\"col\\\">Start</div>\\n <div class=\\\"col-8\\\">{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(range.start) }}</div>\\n </div>\\n <div class=\\\"row\\\">\\n <div class=\\\"col\\\">End</div>\\n <div class=\\\"col-8\\\">{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(range.end) }}</div>\\n </div>\\n <date-picker\\n v-model=\\\"range\\\"\\n :rows=\\\"2\\\"\\n is-range\\n mode=\\\"date\\\"\\n >\\n <template v-slot=\\\"{ inputValue, inputEvents, isDragging, togglePopover }\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col\\\">\\n <div class=\\\"btn-group btn-group-sm d-flex\\\">\\n <button\\n :title=\\\"$t('firefly.custom_period')\\\" class=\\\"btn btn-secondary btn-sm\\\"\\n @click=\\\"togglePopover({ placement: 'auto-start', positionFixed: true })\\\"\\n ><span class=\\\"fas fa-calendar-alt\\\"></span></button>\\n <button :title=\\\"$t('firefly.reset_to_current')\\\"\\n class=\\\"btn btn-secondary\\\"\\n @click=\\\"resetDate\\\"\\n ><span class=\\\"fas fa-history\\\"></span></button>\\n <button id=\\\"dropdownMenuButton\\\" :title=\\\"$t('firefly.select_period')\\\" aria-expanded=\\\"false\\\" aria-haspopup=\\\"true\\\"\\n class=\\\"btn btn-secondary dropdown-toggle\\\"\\n data-toggle=\\\"dropdown\\\"\\n type=\\\"button\\\">\\n <span class=\\\"fas fa-list\\\"></span>\\n </button>\\n <div aria-labelledby=\\\"dropdownMenuButton\\\" class=\\\"dropdown-menu\\\">\\n <a v-for=\\\"period in periods\\\" class=\\\"dropdown-item\\\" href=\\\"#\\\" @click=\\\"customDate(period.start, period.end)\\\">{{ period.title }}</a>\\n </div>\\n\\n </div>\\n <input v-on=\\\"inputEvents.start\\\"\\n :class=\\\"isDragging ? 'text-gray-600' : 'text-gray-900'\\\"\\n :value=\\\"inputValue.start\\\"\\n type=\\\"hidden\\\"\\n />\\n <input v-on=\\\"inputEvents.end\\\"\\n :class=\\\"isDragging ? 'text-gray-600' : 'text-gray-900'\\\"\\n :value=\\\"inputValue.end\\\"\\n type=\\\"hidden\\\"\\n />\\n </div>\\n </div>\\n </template>\\n </date-picker>\\n </div>\\n</template>\\n\\n<script>\\n\\nimport {createNamespacedHelpers} from \\\"vuex\\\";\\nimport Vue from \\\"vue\\\";\\nimport DatePicker from \\\"v-calendar/lib/components/date-picker.umd\\\";\\nimport subDays from 'date-fns/subDays';\\nimport addDays from 'date-fns/addDays';\\nimport addMonths from 'date-fns/addMonths';\\nimport startOfDay from 'date-fns/startOfDay';\\nimport endOfDay from 'date-fns/endOfDay';\\nimport startOfWeek from 'date-fns/startOfWeek';\\nimport endOfWeek from 'date-fns/endOfWeek';\\nimport endOfMonth from 'date-fns/endOfMonth';\\nimport format from 'date-fns/format';\\nimport startOfQuarter from 'date-fns/startOfQuarter';\\nimport subMonths from 'date-fns/subMonths';\\nimport endOfQuarter from 'date-fns/endOfQuarter';\\nimport subQuarters from 'date-fns/subQuarters';\\nimport addQuarters from 'date-fns/addQuarters';\\nimport startOfMonth from 'date-fns/startOfMonth';\\n\\nconst {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('dashboard/index')\\n\\nVue.component('date-picker', DatePicker)\\n\\nexport default {\\n name: \\\"Calendar\\\",\\n created() {\\n // console.log('Now in calendar created');\\n this.ready = true;\\n this.locale = localStorage.locale ?? 'en-US';\\n },\\n data() {\\n return {\\n locale: 'en-US',\\n ready: false,\\n range: {\\n start: null,\\n end: null,\\n },\\n defaultRange: {\\n start: null,\\n end: null,\\n },\\n periods: []\\n };\\n },\\n methods: {\\n ...mapMutations(\\n [\\n 'setEnd',\\n 'setStart',\\n ],\\n ),\\n resetDate: function () {\\n // console.log('Reset date to');\\n // console.log(this.defaultStart);\\n // console.log(this.defaultEnd);\\n this.range.start = this.defaultStart;\\n this.range.end = this.defaultEnd;\\n this.setStart(this.defaultStart);\\n this.setEnd(this.defaultEnd);\\n },\\n customDate: function (startStr, endStr) {\\n let start = new Date(startStr);\\n let end = new Date(endStr);\\n this.setStart(start);\\n this.setEnd(end);\\n this.range.start = start;\\n this.range.end = end;\\n this.generatePeriods()\\n return false;\\n },\\n generateDaily: function () {\\n let today = new Date(this.range.start);\\n // yesterday\\n this.periods.push(\\n {\\n start: startOfDay(subDays(today, 1)).toDateString(),\\n end: endOfDay(subDays(today, 1)).toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(subDays(today, 1))\\n }\\n );\\n\\n // today\\n this.periods.push(\\n {\\n start: startOfDay(today).toDateString(),\\n end: endOfDay(today).toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(today)\\n }\\n );\\n\\n // tomorrow:\\n this.periods.push(\\n {\\n start: startOfDay(addDays(today, 1)).toDateString(),\\n end: endOfDay(addDays(today, 1)).toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(addDays(today, 1))\\n }\\n );\\n\\n // The Day After Tomorrow dun-dun-dun!\\n this.periods.push(\\n {\\n start: startOfDay(addDays(today, 2)).toDateString(),\\n end: endOfDay(addDays(today, 2)).toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(addDays(today, 2))\\n }\\n );\\n },\\n\\n generateWeekly: function () {\\n //console.log('weekly');\\n let today = new Date(this.range.start);\\n //console.log('Today is ' + today);\\n let start = startOfDay(startOfWeek(subDays(today, 7), {weekStartsOn: 1}));\\n let end = endOfDay(endOfWeek(subDays(today, 7), {weekStartsOn: 1}));\\n let dateFormat = this.$t('config.week_in_year_fns');\\n //console.log('Date format: \\\"'+dateFormat+'\\\"');\\n let title = format(start, dateFormat);\\n\\n // last week\\n // console.log('Last week');\\n // console.log(start);\\n // console.log(end);\\n // console.log(title);\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // this week\\n start = startOfDay(startOfWeek(today, {weekStartsOn: 1}));\\n end = endOfDay(endOfWeek(today, {weekStartsOn: 1}));\\n title = format(start, dateFormat);\\n // console.log('This week');\\n // console.log(start);\\n // console.log(end);\\n // console.log(title);\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // next week\\n start = startOfDay(startOfWeek(addDays(today, 7), {weekStartsOn: 1}));\\n end = endOfDay(endOfWeek(addDays(today, 7), {weekStartsOn: 1}));\\n title = format(start, dateFormat);\\n // console.log('Next week');\\n // console.log(start);\\n // console.log(end);\\n // console.log(title);\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n },\\n generateMonthly: function () {\\n let today = new Date(this.range.start);\\n // previous month\\n let start = startOfDay(startOfMonth(subMonths(today, 1)));\\n let end = endOfDay(endOfMonth(subMonths(today, 1)));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\\n }\\n );\\n\\n // this month\\n start = startOfDay(startOfMonth(today));\\n end = endOfDay(endOfMonth(today));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\\n }\\n );\\n\\n // next month\\n start = startOfDay(startOfMonth(addMonths(today, 1)));\\n end = endOfDay(endOfMonth(addMonths(today, 1)));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\\n }\\n );\\n\\n },\\n generateQuarterly: function () {\\n let today = new Date(this.range.start);\\n\\n // last quarter\\n let start = startOfDay(startOfQuarter(subQuarters(today, 1)));\\n let end = endOfDay(endOfQuarter(subQuarters(today, 1)));\\n let dateFormat = this.$t('config.quarter_fns');\\n let title = format(start, dateFormat);\\n\\n // last week\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n\\n // this quarter\\n start = startOfDay(startOfQuarter(today));\\n end = endOfDay(endOfQuarter(today));\\n title = format(start, dateFormat);\\n\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n // next quarter\\n start = startOfDay(startOfQuarter(addQuarters(today, 1)));\\n end = endOfDay(endOfQuarter(addQuarters(today, 1)));\\n title = format(start, dateFormat);\\n\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n },\\n generateHalfYearly: function () {\\n let today = new Date(this.range.start);\\n let start;\\n let end;\\n let title = 'tbd';\\n let half = 1;\\n\\n // its currently first half of year:\\n if (today.getMonth() <= 5) {\\n // previous year, last half:\\n start = today;\\n start.setFullYear(start.getFullYear() - 1);\\n start.setMonth(6);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = start;\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(end);\\n half = 2;\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // this year, first half:\\n start = today;\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = today;\\n end.setMonth(5);\\n end.setDate(30);\\n end = endOfDay(start);\\n half = 1;\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // this year, second half:\\n start = today;\\n start.setMonth(6);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = start;\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(end);\\n half = 2;\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n return;\\n }\\n // this year, first half:\\n start = today;\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = start;\\n end.setMonth(5);\\n end.setDate(30);\\n end = endOfDay(end);\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // this year, current (second) half:\\n start = today;\\n start.setMonth(6);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = today;\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(start);\\n half = 2;\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n\\n // next year, first half:\\n start = today;\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n end = start;\\n end.setMonth(5);\\n end.setDate(30);\\n end = endOfDay(end);\\n half = 1;\\n title = format(start, this.$t('config.half_year_fns', {half: half}));\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: title\\n }\\n );\\n },\\n generateYearly: function () {\\n let today = new Date(this.range.start);\\n let start;\\n let end;\\n\\n // last year\\n start = new Date(today);\\n start.setFullYear(start.getFullYear() - 1);\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n\\n end = new Date(today);\\n end.setFullYear(end.getFullYear() - 1);\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(end);\\n\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: start.getFullYear()\\n }\\n );\\n\\n // this year\\n start = new Date(today);\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n\\n end = new Date(today);\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(end);\\n\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: start.getFullYear()\\n }\\n );\\n // next year\\n start = new Date(today);\\n start.setFullYear(start.getFullYear() + 1);\\n start.setMonth(0);\\n start.setDate(1);\\n start = startOfDay(start);\\n\\n end = new Date(today);\\n end.setFullYear(end.getFullYear() + 1);\\n end.setMonth(11);\\n end.setDate(31);\\n end = endOfDay(end);\\n\\n this.periods.push(\\n {\\n start: start.toDateString(),\\n end: end.toDateString(),\\n title: start.getFullYear()\\n }\\n );\\n },\\n generatePeriods: function () {\\n this.periods = [];\\n // console.log('The view range is \\\"' + this.viewRange + '\\\".');\\n switch (this.viewRange) {\\n case '1D':\\n this.generateDaily();\\n break;\\n case '1W':\\n this.generateWeekly();\\n break;\\n case '1M':\\n this.generateMonthly();\\n break;\\n case '3M':\\n this.generateQuarterly();\\n break;\\n case '6M':\\n this.generateHalfYearly();\\n break;\\n case '1Y':\\n this.generateYearly();\\n break;\\n }\\n\\n\\n // last 7 days\\n let today = new Date;\\n let end = new Date;\\n end.setDate(end.getDate() - 7);\\n this.periods.push(\\n {\\n start: end.toDateString(),\\n end: today.toDateString(),\\n title: this.$t('firefly.last_seven_days')\\n }\\n );\\n\\n // last 30 days:\\n end.setDate(end.getDate() - 23);\\n this.periods.push(\\n {\\n start: end.toDateString(),\\n end: today.toDateString(),\\n title: this.$t('firefly.last_thirty_days')\\n }\\n );\\n // last 30 days\\n // everything\\n }\\n },\\n computed: {\\n ...mapGetters([\\n 'viewRange',\\n 'start',\\n 'end',\\n 'defaultStart',\\n 'defaultEnd'\\n ]),\\n 'datesReady': function () {\\n return null !== this.start && null !== this.end && this.ready;\\n },\\n },\\n watch: {\\n datesReady: function (value) {\\n if (false === value) {\\n return;\\n }\\n this.range.start = new Date(this.start);\\n this.range.end = new Date(this.end);\\n this.generatePeriods();\\n\\n },\\n range: function (value) {\\n //console.log('User updated range');\\n this.setStart(value.start);\\n this.setEnd(value.end);\\n }\\n }\\n}\\n</script>\\n\\n<style scoped>\\n.dropdown-item {\\n color: #212529;\\n}\\n\\n.dropdown-item:hover {\\n color: #212529;\\n}\\n</style>\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"Start\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-8\"},[_vm._v(_vm._s(new Intl.DateTimeFormat(_vm.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(_vm.range.start)))])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"End\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-8\"},[_vm._v(_vm._s(new Intl.DateTimeFormat(_vm.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(_vm.range.end)))])]),_vm._v(\" \"),_c('date-picker',{attrs:{\"rows\":2,\"is-range\":\"\",\"mode\":\"date\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar inputValue = ref.inputValue;\nvar inputEvents = ref.inputEvents;\nvar isDragging = ref.isDragging;\nvar togglePopover = ref.togglePopover;\nreturn [_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('div',{staticClass:\"btn-group btn-group-sm d-flex\"},[_c('button',{staticClass:\"btn btn-secondary btn-sm\",attrs:{\"title\":_vm.$t('firefly.custom_period')},on:{\"click\":function($event){return togglePopover({ placement: 'auto-start', positionFixed: true })}}},[_c('span',{staticClass:\"fas fa-calendar-alt\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-secondary\",attrs:{\"title\":_vm.$t('firefly.reset_to_current')},on:{\"click\":_vm.resetDate}},[_c('span',{staticClass:\"fas fa-history\"})]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-secondary dropdown-toggle\",attrs:{\"id\":\"dropdownMenuButton\",\"title\":_vm.$t('firefly.select_period'),\"aria-expanded\":\"false\",\"aria-haspopup\":\"true\",\"data-toggle\":\"dropdown\",\"type\":\"button\"}},[_c('span',{staticClass:\"fas fa-list\"})]),_vm._v(\" \"),_c('div',{staticClass:\"dropdown-menu\",attrs:{\"aria-labelledby\":\"dropdownMenuButton\"}},_vm._l((_vm.periods),function(period){return _c('a',{staticClass:\"dropdown-item\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){return _vm.customDate(period.start, period.end)}}},[_vm._v(_vm._s(period.title))])}),0)]),_vm._v(\" \"),_c('input',_vm._g({class:isDragging ? 'text-gray-600' : 'text-gray-900',attrs:{\"type\":\"hidden\"},domProps:{\"value\":inputValue.start}},inputEvents.start)),_vm._v(\" \"),_c('input',_vm._g({class:isDragging ? 'text-gray-600' : 'text-gray-900',attrs:{\"type\":\"hidden\"},domProps:{\"value\":inputValue.end}},inputEvents.end))])])]}}]),model:{value:(_vm.range),callback:function ($$v) {_vm.range=$$v},expression:\"range\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - Calendar.vue\n - Copyright (c) 2020 james@firefly-iii.org\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <https://www.gnu.org/licenses/>.\n -->\n\n<template>\n <div>\n <div class=\"row\">\n <div class=\"col\">Start</div>\n <div class=\"col-8\">{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(range.start) }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col\">End</div>\n <div class=\"col-8\">{{ new Intl.DateTimeFormat(locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(range.end) }}</div>\n </div>\n <date-picker\n v-model=\"range\"\n :rows=\"2\"\n is-range\n mode=\"date\"\n >\n <template v-slot=\"{ inputValue, inputEvents, isDragging, togglePopover }\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"btn-group btn-group-sm d-flex\">\n <button\n :title=\"$t('firefly.custom_period')\" class=\"btn btn-secondary btn-sm\"\n @click=\"togglePopover({ placement: 'auto-start', positionFixed: true })\"\n ><span class=\"fas fa-calendar-alt\"></span></button>\n <button :title=\"$t('firefly.reset_to_current')\"\n class=\"btn btn-secondary\"\n @click=\"resetDate\"\n ><span class=\"fas fa-history\"></span></button>\n <button id=\"dropdownMenuButton\" :title=\"$t('firefly.select_period')\" aria-expanded=\"false\" aria-haspopup=\"true\"\n class=\"btn btn-secondary dropdown-toggle\"\n data-toggle=\"dropdown\"\n type=\"button\">\n <span class=\"fas fa-list\"></span>\n </button>\n <div aria-labelledby=\"dropdownMenuButton\" class=\"dropdown-menu\">\n <a v-for=\"period in periods\" class=\"dropdown-item\" href=\"#\" @click=\"customDate(period.start, period.end)\">{{ period.title }}</a>\n </div>\n\n </div>\n <input v-on=\"inputEvents.start\"\n :class=\"isDragging ? 'text-gray-600' : 'text-gray-900'\"\n :value=\"inputValue.start\"\n type=\"hidden\"\n />\n <input v-on=\"inputEvents.end\"\n :class=\"isDragging ? 'text-gray-600' : 'text-gray-900'\"\n :value=\"inputValue.end\"\n type=\"hidden\"\n />\n </div>\n </div>\n </template>\n </date-picker>\n </div>\n</template>\n\n<script>\n\nimport {createNamespacedHelpers} from \"vuex\";\nimport Vue from \"vue\";\nimport DatePicker from \"v-calendar/lib/components/date-picker.umd\";\nimport subDays from 'date-fns/subDays';\nimport addDays from 'date-fns/addDays';\nimport addMonths from 'date-fns/addMonths';\nimport startOfDay from 'date-fns/startOfDay';\nimport endOfDay from 'date-fns/endOfDay';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport format from 'date-fns/format';\nimport startOfQuarter from 'date-fns/startOfQuarter';\nimport subMonths from 'date-fns/subMonths';\nimport endOfQuarter from 'date-fns/endOfQuarter';\nimport subQuarters from 'date-fns/subQuarters';\nimport addQuarters from 'date-fns/addQuarters';\nimport startOfMonth from 'date-fns/startOfMonth';\n\nconst {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('dashboard/index')\n\nVue.component('date-picker', DatePicker)\n\nexport default {\n name: \"Calendar\",\n created() {\n // console.log('Now in calendar created');\n this.ready = true;\n this.locale = localStorage.locale ?? 'en-US';\n },\n data() {\n return {\n locale: 'en-US',\n ready: false,\n range: {\n start: null,\n end: null,\n },\n defaultRange: {\n start: null,\n end: null,\n },\n periods: []\n };\n },\n methods: {\n ...mapMutations(\n [\n 'setEnd',\n 'setStart',\n ],\n ),\n resetDate: function () {\n // console.log('Reset date to');\n // console.log(this.defaultStart);\n // console.log(this.defaultEnd);\n this.range.start = this.defaultStart;\n this.range.end = this.defaultEnd;\n this.setStart(this.defaultStart);\n this.setEnd(this.defaultEnd);\n },\n customDate: function (startStr, endStr) {\n let start = new Date(startStr);\n let end = new Date(endStr);\n this.setStart(start);\n this.setEnd(end);\n this.range.start = start;\n this.range.end = end;\n this.generatePeriods()\n return false;\n },\n generateDaily: function () {\n let today = new Date(this.range.start);\n // yesterday\n this.periods.push(\n {\n start: startOfDay(subDays(today, 1)).toDateString(),\n end: endOfDay(subDays(today, 1)).toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(subDays(today, 1))\n }\n );\n\n // today\n this.periods.push(\n {\n start: startOfDay(today).toDateString(),\n end: endOfDay(today).toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(today)\n }\n );\n\n // tomorrow:\n this.periods.push(\n {\n start: startOfDay(addDays(today, 1)).toDateString(),\n end: endOfDay(addDays(today, 1)).toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(addDays(today, 1))\n }\n );\n\n // The Day After Tomorrow dun-dun-dun!\n this.periods.push(\n {\n start: startOfDay(addDays(today, 2)).toDateString(),\n end: endOfDay(addDays(today, 2)).toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(addDays(today, 2))\n }\n );\n },\n\n generateWeekly: function () {\n //console.log('weekly');\n let today = new Date(this.range.start);\n //console.log('Today is ' + today);\n let start = startOfDay(startOfWeek(subDays(today, 7), {weekStartsOn: 1}));\n let end = endOfDay(endOfWeek(subDays(today, 7), {weekStartsOn: 1}));\n let dateFormat = this.$t('config.week_in_year_fns');\n //console.log('Date format: \"'+dateFormat+'\"');\n let title = format(start, dateFormat);\n\n // last week\n // console.log('Last week');\n // console.log(start);\n // console.log(end);\n // console.log(title);\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // this week\n start = startOfDay(startOfWeek(today, {weekStartsOn: 1}));\n end = endOfDay(endOfWeek(today, {weekStartsOn: 1}));\n title = format(start, dateFormat);\n // console.log('This week');\n // console.log(start);\n // console.log(end);\n // console.log(title);\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // next week\n start = startOfDay(startOfWeek(addDays(today, 7), {weekStartsOn: 1}));\n end = endOfDay(endOfWeek(addDays(today, 7), {weekStartsOn: 1}));\n title = format(start, dateFormat);\n // console.log('Next week');\n // console.log(start);\n // console.log(end);\n // console.log(title);\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n },\n generateMonthly: function () {\n let today = new Date(this.range.start);\n // previous month\n let start = startOfDay(startOfMonth(subMonths(today, 1)));\n let end = endOfDay(endOfMonth(subMonths(today, 1)));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\n }\n );\n\n // this month\n start = startOfDay(startOfMonth(today));\n end = endOfDay(endOfMonth(today));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\n }\n );\n\n // next month\n start = startOfDay(startOfMonth(addMonths(today, 1)));\n end = endOfDay(endOfMonth(addMonths(today, 1)));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long'}).format(start)\n }\n );\n\n },\n generateQuarterly: function () {\n let today = new Date(this.range.start);\n\n // last quarter\n let start = startOfDay(startOfQuarter(subQuarters(today, 1)));\n let end = endOfDay(endOfQuarter(subQuarters(today, 1)));\n let dateFormat = this.$t('config.quarter_fns');\n let title = format(start, dateFormat);\n\n // last week\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n\n // this quarter\n start = startOfDay(startOfQuarter(today));\n end = endOfDay(endOfQuarter(today));\n title = format(start, dateFormat);\n\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n // next quarter\n start = startOfDay(startOfQuarter(addQuarters(today, 1)));\n end = endOfDay(endOfQuarter(addQuarters(today, 1)));\n title = format(start, dateFormat);\n\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n },\n generateHalfYearly: function () {\n let today = new Date(this.range.start);\n let start;\n let end;\n let title = 'tbd';\n let half = 1;\n\n // its currently first half of year:\n if (today.getMonth() <= 5) {\n // previous year, last half:\n start = today;\n start.setFullYear(start.getFullYear() - 1);\n start.setMonth(6);\n start.setDate(1);\n start = startOfDay(start);\n end = start;\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n half = 2;\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // this year, first half:\n start = today;\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n end = today;\n end.setMonth(5);\n end.setDate(30);\n end = endOfDay(start);\n half = 1;\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // this year, second half:\n start = today;\n start.setMonth(6);\n start.setDate(1);\n start = startOfDay(start);\n end = start;\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n half = 2;\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n return;\n }\n // this year, first half:\n start = today;\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n end = start;\n end.setMonth(5);\n end.setDate(30);\n end = endOfDay(end);\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // this year, current (second) half:\n start = today;\n start.setMonth(6);\n start.setDate(1);\n start = startOfDay(start);\n end = today;\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(start);\n half = 2;\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n\n // next year, first half:\n start = today;\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n end = start;\n end.setMonth(5);\n end.setDate(30);\n end = endOfDay(end);\n half = 1;\n title = format(start, this.$t('config.half_year_fns', {half: half}));\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: title\n }\n );\n },\n generateYearly: function () {\n let today = new Date(this.range.start);\n let start;\n let end;\n\n // last year\n start = new Date(today);\n start.setFullYear(start.getFullYear() - 1);\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n\n end = new Date(today);\n end.setFullYear(end.getFullYear() - 1);\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: start.getFullYear()\n }\n );\n\n // this year\n start = new Date(today);\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n\n end = new Date(today);\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: start.getFullYear()\n }\n );\n // next year\n start = new Date(today);\n start.setFullYear(start.getFullYear() + 1);\n start.setMonth(0);\n start.setDate(1);\n start = startOfDay(start);\n\n end = new Date(today);\n end.setFullYear(end.getFullYear() + 1);\n end.setMonth(11);\n end.setDate(31);\n end = endOfDay(end);\n\n this.periods.push(\n {\n start: start.toDateString(),\n end: end.toDateString(),\n title: start.getFullYear()\n }\n );\n },\n generatePeriods: function () {\n this.periods = [];\n // console.log('The view range is \"' + this.viewRange + '\".');\n switch (this.viewRange) {\n case '1D':\n this.generateDaily();\n break;\n case '1W':\n this.generateWeekly();\n break;\n case '1M':\n this.generateMonthly();\n break;\n case '3M':\n this.generateQuarterly();\n break;\n case '6M':\n this.generateHalfYearly();\n break;\n case '1Y':\n this.generateYearly();\n break;\n }\n\n\n // last 7 days\n let today = new Date;\n let end = new Date;\n end.setDate(end.getDate() - 7);\n this.periods.push(\n {\n start: end.toDateString(),\n end: today.toDateString(),\n title: this.$t('firefly.last_seven_days')\n }\n );\n\n // last 30 days:\n end.setDate(end.getDate() - 23);\n this.periods.push(\n {\n start: end.toDateString(),\n end: today.toDateString(),\n title: this.$t('firefly.last_thirty_days')\n }\n );\n // last 30 days\n // everything\n }\n },\n computed: {\n ...mapGetters([\n 'viewRange',\n 'start',\n 'end',\n 'defaultStart',\n 'defaultEnd'\n ]),\n 'datesReady': function () {\n return null !== this.start && null !== this.end && this.ready;\n },\n },\n watch: {\n datesReady: function (value) {\n if (false === value) {\n return;\n }\n this.range.start = new Date(this.start);\n this.range.end = new Date(this.end);\n this.generatePeriods();\n\n },\n range: function (value) {\n //console.log('User updated range');\n this.setStart(value.start);\n this.setEnd(value.end);\n }\n }\n}\n</script>\n\n<style scoped>\n.dropdown-item {\n color: #212529;\n}\n\n.dropdown-item:hover {\n color: #212529;\n}\n</style>","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Calendar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Calendar.vue?vue&type=script&lang=js&\"","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-9[0].rules[0].use[1]!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9[0].rules[0].use[2]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Calendar.vue?vue&type=style&index=0&id=1ce542a2&scoped=true&lang=css&\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import { render, staticRenderFns } from \"./Calendar.vue?vue&type=template&id=1ce542a2&scoped=true&\"\nimport script from \"./Calendar.vue?vue&type=script&lang=js&\"\nexport * from \"./Calendar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Calendar.vue?vue&type=style&index=0&id=1ce542a2&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1ce542a2\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}