2019-02-03 14:40:20 +01:00
|
|
|
import { IGlobalState, ITodo, ITodosState } from 'model'
|
2019-01-14 22:40:30 +01:00
|
|
|
import { storeBuilder } from './Store/Store'
|
|
|
|
|
|
2019-02-01 04:10:31 +01:00
|
|
|
import Api from '@api'
|
|
|
|
|
import { rescodes } from './rescodes'
|
2019-02-08 17:10:25 +01:00
|
|
|
import { GlobalStore, Todos, UserStore } from '@store'
|
2019-02-03 14:40:20 +01:00
|
|
|
import globalroutines from './../../globalroutines/index'
|
2019-02-12 12:06:01 +01:00
|
|
|
import { Mutation } from 'vuex-module-decorators'
|
|
|
|
|
import { serv_constants } from '@src/store/Modules/serv_constants'
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-01-14 22:40:30 +01:00
|
|
|
|
|
|
|
|
const state: ITodosState = {
|
2019-02-01 04:10:31 +01:00
|
|
|
visuOnlyUncompleted: false,
|
|
|
|
|
networkDataReceived: false,
|
2019-02-03 14:40:20 +01:00
|
|
|
todos: [],
|
|
|
|
|
todos_changed: 1,
|
2019-02-14 18:38:23 +01:00
|
|
|
reload_fromServer: 0,
|
2019-02-04 03:09:15 +01:00
|
|
|
testpao: 'Test',
|
|
|
|
|
insidePending: false
|
2019-01-14 22:40:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const b = storeBuilder.module<ITodosState>('TodosModule', state)
|
2019-02-01 04:10:31 +01:00
|
|
|
const stateGetter = b.state()
|
2019-01-14 22:40:30 +01:00
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
|
namespace Getters {
|
|
|
|
|
|
|
|
|
|
const visuOnlyUncompleted = b.read(state => state.visuOnlyUncompleted, 'visuOnlyUncompleted')
|
|
|
|
|
|
|
|
|
|
export const getters = {
|
|
|
|
|
get visuOnlyUncompleted() {
|
|
|
|
|
return visuOnlyUncompleted
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Mutations {
|
|
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
function setTestpao(state: ITodosState, testpao: String) {
|
|
|
|
|
state.testpao = testpao
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setTodos_changed(state: ITodosState) {
|
|
|
|
|
state.todos_changed++
|
2019-02-08 17:10:25 +01:00
|
|
|
mutations.setTestpao('Cambiato : ' + String(state.todos_changed))
|
2019-02-14 18:38:23 +01:00
|
|
|
// console.log('******* state.todos_changed', state.todos_changed)
|
2019-02-03 14:40:20 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
function findTodoById(state: ITodosState, id: string) {
|
|
|
|
|
for (let i = 0; i < state.todos.length; i++) {
|
|
|
|
|
if (state.todos[i]._id === id)
|
|
|
|
|
return i
|
|
|
|
|
}
|
|
|
|
|
return -1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createNewItem(state: ITodosState, myitem: ITodo) {
|
|
|
|
|
state.todos.push(myitem)
|
|
|
|
|
Todos.mutations.setTodos_changed()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function modifymyItem(state: ITodosState, myitem: ITodo) {
|
|
|
|
|
// Find record
|
|
|
|
|
const ind = findTodoById(state, myitem._id)
|
|
|
|
|
if (ind >= 0)
|
|
|
|
|
state.todos[ind] = rescodes.jsonCopy(myitem)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deletemyitem(state: ITodosState, myitem: ITodo) {
|
|
|
|
|
// Find record
|
|
|
|
|
const ind = findTodoById(state, myitem._id)
|
|
|
|
|
|
|
|
|
|
// Delete Item in to Array
|
|
|
|
|
if (ind >= 0)
|
|
|
|
|
state.todos.splice(ind, 1)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
export const mutations = {
|
|
|
|
|
setTestpao: b.commit(setTestpao),
|
2019-02-15 01:25:44 +01:00
|
|
|
setTodos_changed: b.commit(setTodos_changed),
|
|
|
|
|
modifymyItem: b.commit(modifymyItem),
|
|
|
|
|
deletemyitem: b.commit(deletemyitem),
|
|
|
|
|
createNewItem: b.commit(createNewItem)
|
2019-02-03 14:40:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function consolelogpao(strlog, strlog2 = '', strlog3 = '') {
|
|
|
|
|
globalroutines(null, 'log', strlog + strlog2 + strlog3, null)
|
2019-01-14 22:40:30 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
|
2019-01-14 22:40:30 +01:00
|
|
|
namespace Actions {
|
|
|
|
|
|
2019-02-02 20:13:06 +01:00
|
|
|
function json2array(json) {
|
|
|
|
|
let result = []
|
|
|
|
|
let keys = Object.keys(json)
|
|
|
|
|
keys.forEach(function (key) {
|
2019-02-01 04:10:31 +01:00
|
|
|
result.push(json[key])
|
2019-02-02 20:13:06 +01:00
|
|
|
})
|
|
|
|
|
return result
|
2019-02-01 04:10:31 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-04 03:09:15 +01:00
|
|
|
// If something in the call of Service Worker went wrong (Network or Server Down), then retry !
|
|
|
|
|
async function sendSwMsgIfAvailable() {
|
|
|
|
|
let something = false
|
|
|
|
|
|
2019-02-08 17:10:25 +01:00
|
|
|
if ('serviceWorker' in navigator) {
|
2019-02-12 12:06:01 +01:00
|
|
|
console.log(' -------- sendSwMsgIfAvailable')
|
2019-02-08 17:10:25 +01:00
|
|
|
|
|
|
|
|
let count = await checkPendingMsg(null)
|
|
|
|
|
if (count > 0) {
|
2019-02-14 18:38:23 +01:00
|
|
|
return await navigator.serviceWorker.ready
|
2019-02-04 03:09:15 +01:00
|
|
|
.then(function (sw) {
|
|
|
|
|
|
2019-02-14 18:38:23 +01:00
|
|
|
return globalroutines(null, 'readall', 'swmsg')
|
2019-02-04 03:09:15 +01:00
|
|
|
.then(function (arr_recmsg) {
|
2019-02-07 00:53:10 +01:00
|
|
|
// let recclone = [...arr_recmsg]
|
2019-02-04 03:09:15 +01:00
|
|
|
if (arr_recmsg.length > 0) {
|
|
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
// console.log(' TROVATI MSG PENDENTI ! ORA LI MANDO: ', arr_recmsg)
|
2019-02-04 03:09:15 +01:00
|
|
|
|
2019-02-07 00:53:10 +01:00
|
|
|
// console.log('---------------------- 2) navigator (2) .serviceWorker.ready')
|
2019-02-04 03:09:15 +01:00
|
|
|
|
2019-02-14 20:08:22 +01:00
|
|
|
let promiseChain = Promise.resolve()
|
|
|
|
|
|
2019-02-04 03:09:15 +01:00
|
|
|
something = true
|
|
|
|
|
for (let rec of arr_recmsg) {
|
2019-02-12 12:06:01 +01:00
|
|
|
// console.log(' .... sw.sync.register ( ', rec._id)
|
|
|
|
|
// if ('SyncManager' in window) {
|
|
|
|
|
// sw.sync.register(rec._id)
|
|
|
|
|
// } else {
|
2019-02-14 20:08:22 +01:00
|
|
|
|
|
|
|
|
// #Alternative to SyncManager
|
|
|
|
|
promiseChain = promiseChain.then(() => {
|
|
|
|
|
return Api.syncAlternative(rec._id)
|
|
|
|
|
})
|
|
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
// }
|
2019-02-04 03:09:15 +01:00
|
|
|
}
|
2019-02-14 20:08:22 +01:00
|
|
|
return promiseChain
|
2019-02-04 03:09:15 +01:00
|
|
|
}
|
|
|
|
|
})
|
2019-02-08 17:10:25 +01:00
|
|
|
|
2019-02-04 03:09:15 +01:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-02-08 17:10:25 +01:00
|
|
|
|
2019-02-14 20:08:22 +01:00
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
|
|
resolve(something)
|
|
|
|
|
})
|
2019-02-04 03:09:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function waitAndcheckPendingMsg(context) {
|
|
|
|
|
|
|
|
|
|
await aspettansec(1000)
|
|
|
|
|
|
|
|
|
|
return await checkPendingMsg(context)
|
|
|
|
|
.then(ris => {
|
|
|
|
|
if (ris) {
|
2019-02-12 12:06:01 +01:00
|
|
|
console.log('risPending = ', ris)
|
2019-02-14 18:38:23 +01:00
|
|
|
return sendSwMsgIfAvailable()
|
2019-02-04 03:09:15 +01:00
|
|
|
.then(something => {
|
|
|
|
|
if (something) {
|
|
|
|
|
// Refresh data
|
2019-02-14 18:38:23 +01:00
|
|
|
return waitAndRefreshData(context)
|
2019-02-04 03:09:15 +01:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function waitAndRefreshData(context) {
|
|
|
|
|
await aspettansec(3000)
|
|
|
|
|
|
|
|
|
|
return await dbLoadTodo(context, false)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function checkPendingMsg(context) {
|
2019-02-04 04:17:50 +01:00
|
|
|
// console.log('checkPendingMsg')
|
2019-02-04 03:09:15 +01:00
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
const config = await globalroutines(null, 'readall', 'config', null)
|
|
|
|
|
// console.log('config', config)
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (config) {
|
|
|
|
|
if (config[1].stateconn !== undefined) {
|
|
|
|
|
// console.log('config.stateconn', config[1].stateconn)
|
|
|
|
|
|
|
|
|
|
if (config[1].stateconn !== GlobalStore.state.stateConnection) {
|
|
|
|
|
GlobalStore.mutations.setStateConnection(config[1].stateconn)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-04 03:09:15 +01:00
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
|
|
// Check if there is something
|
2019-02-14 20:08:22 +01:00
|
|
|
return globalroutines(null, 'count', 'swmsg')
|
2019-02-04 03:09:15 +01:00
|
|
|
.then(function (count) {
|
|
|
|
|
if (count > 0) {
|
2019-02-04 04:17:50 +01:00
|
|
|
console.log('count = ', count)
|
2019-02-04 03:09:15 +01:00
|
|
|
return resolve(true)
|
|
|
|
|
} else {
|
|
|
|
|
return resolve(false)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(e => {
|
|
|
|
|
return reject()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function dbLoadTodo(context, checkPending: boolean = false) {
|
|
|
|
|
console.log('dbLoadTodo', checkPending)
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
if (UserStore.state.userId === '')
|
|
|
|
|
return false // Login not made
|
2019-02-01 04:10:31 +01:00
|
|
|
|
|
|
|
|
let call = process.env.MONGODB_HOST + '/todos/' + UserStore.state.userId
|
|
|
|
|
|
2019-02-02 20:13:06 +01:00
|
|
|
state.networkDataReceived = false
|
|
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
let ris = await Api.SendReq(call, 'GET', null)
|
2019-02-12 19:09:43 +01:00
|
|
|
.then(({ res, body, status }) => {
|
2019-02-02 20:13:06 +01:00
|
|
|
state.networkDataReceived = true
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-12 19:09:43 +01:00
|
|
|
// console.log('******* UPDATE TODOS.STATE.TODOS !:', res.todos)
|
2019-02-12 12:06:01 +01:00
|
|
|
if (body.todos) {
|
|
|
|
|
state.todos = [...body.todos]
|
2019-02-14 21:36:16 +01:00
|
|
|
Todos.mutations.setTodos_changed()
|
2019-02-12 12:06:01 +01:00
|
|
|
}
|
2019-02-04 03:09:15 +01:00
|
|
|
|
2019-02-14 18:38:23 +01:00
|
|
|
console.log('********** res', 'state.todos', state.todos, 'checkPending', checkPending)
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-02 20:13:06 +01:00
|
|
|
// After Login will store into the indexedDb...
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-12 12:06:01 +01:00
|
|
|
return { status }
|
2019-02-01 04:10:31 +01:00
|
|
|
})
|
2019-02-12 12:06:01 +01:00
|
|
|
.catch(error => {
|
2019-02-09 18:04:49 +01:00
|
|
|
console.log('error=', error)
|
2019-02-06 18:47:54 +01:00
|
|
|
UserStore.mutations.setErrorCatch(error)
|
2019-02-12 12:06:01 +01:00
|
|
|
return { status }
|
2019-02-01 04:10:31 +01:00
|
|
|
})
|
2019-02-02 20:13:06 +01:00
|
|
|
|
2019-02-12 19:09:43 +01:00
|
|
|
// console.log('ris : ', ris)
|
|
|
|
|
// console.log('ris STATUS: ', ris.status)
|
2019-02-04 03:09:15 +01:00
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
if (!Todos.state.networkDataReceived) {
|
2019-02-09 18:04:49 +01:00
|
|
|
|
|
|
|
|
if (ris.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
|
|
|
|
consolelogpao('UNAUTHORIZING... TOKEN EXPIRED... !! ')
|
|
|
|
|
} else {
|
2019-02-12 12:06:01 +01:00
|
|
|
consolelogpao('NETWORK UNREACHABLE ! (Error in fetch)', UserStore.getters.getServerCode, ris.status)
|
2019-02-09 18:04:49 +01:00
|
|
|
}
|
2019-02-15 01:25:44 +01:00
|
|
|
if ('serviceWorker' in navigator) {
|
|
|
|
|
// Read all data from IndexedDB Store into Memory
|
|
|
|
|
await updatefromIndexedDbToStateTodo(context)
|
|
|
|
|
}
|
2019-02-04 03:09:15 +01:00
|
|
|
} else {
|
2019-02-12 12:06:01 +01:00
|
|
|
if (ris.status === rescodes.OK && checkPending) {
|
2019-02-04 03:09:15 +01:00
|
|
|
waitAndcheckPendingMsg(context)
|
|
|
|
|
}
|
2019-02-03 14:40:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
2019-02-02 20:13:06 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
async function updatefromIndexedDbToStateTodo(context) {
|
2019-02-09 18:04:49 +01:00
|
|
|
// console.log('Update the array in memory, from todos table from IndexedDb')
|
2019-02-15 01:25:44 +01:00
|
|
|
await globalroutines(null, 'updatefromIndexedDbToStateTodo', 'todos', null)
|
2019-02-03 19:28:06 +01:00
|
|
|
.then(() => {
|
2019-02-15 01:25:44 +01:00
|
|
|
console.log('updatefromIndexedDbToStateTodo! ')
|
2019-02-03 19:28:06 +01:00
|
|
|
return true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
function aspettansec(numsec) {
|
|
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
resolve('anything')
|
|
|
|
|
}, numsec)
|
|
|
|
|
})
|
|
|
|
|
}
|
2019-02-02 20:13:06 +01:00
|
|
|
|
2019-02-03 14:40:20 +01:00
|
|
|
async function testfunc() {
|
|
|
|
|
while (true) {
|
|
|
|
|
consolelogpao('testfunc')
|
2019-02-08 17:10:25 +01:00
|
|
|
Todos.mutations.setTodos_changed()
|
2019-02-03 19:28:06 +01:00
|
|
|
// console.log('Todos.state.todos_changed:', Todos.state.todos_changed)
|
2019-02-03 14:40:20 +01:00
|
|
|
await aspettansec(5000)
|
|
|
|
|
}
|
2019-02-01 04:10:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function dbSaveTodo(context, itemtodo: ITodo) {
|
2019-02-03 00:51:58 +01:00
|
|
|
return await dbInsertSaveTodo(context, itemtodo, 'PATCH')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function dbInsertTodo(context, itemtodo: ITodo) {
|
|
|
|
|
return await dbInsertSaveTodo(context, itemtodo, 'POST')
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
async function dbInsertSaveTodo(context, itemtodo: ITodo, method) {
|
2019-02-03 03:44:25 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
if (!('serviceWorker' in navigator)) {
|
2019-02-03 02:40:24 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
console.log('dbInsertSaveTodo', itemtodo, method)
|
|
|
|
|
let call = process.env.MONGODB_HOST + '/todos'
|
2019-02-08 17:10:25 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
if (UserStore.state.userId === '')
|
|
|
|
|
return false // Login not made
|
2019-02-12 12:06:01 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
if (method !== 'POST')
|
|
|
|
|
call += '/' + itemtodo._id
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
console.log('TODO TO SAVE: ', itemtodo)
|
2019-02-11 02:58:53 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
let res = await Api.SendReq(call, method, itemtodo)
|
|
|
|
|
.then(({ res, newItem }) => {
|
|
|
|
|
console.log('dbInsertSaveTodo to the Server', newItem)
|
2019-02-03 02:40:24 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
return (res.status === 200)
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
UserStore.mutations.setErrorCatch(error)
|
|
|
|
|
// return UserStore.getters.getServerCode
|
|
|
|
|
return false
|
|
|
|
|
})
|
|
|
|
|
}
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
return true
|
2019-02-02 20:13:06 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-03 03:44:25 +01:00
|
|
|
async function dbDeleteTodo(context, item: ITodo) {
|
2019-02-02 20:13:06 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
if (!('serviceWorker' in navigator)) {
|
|
|
|
|
// console.log('dbDeleteTodo', item)
|
|
|
|
|
let call = process.env.MONGODB_HOST + '/todos/' + item._id
|
2019-02-02 20:13:06 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
if (UserStore.state.userId === '')
|
|
|
|
|
return false // Login not made
|
2019-02-03 03:44:25 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
let res = await Api.SendReq(call, 'DELETE', item)
|
|
|
|
|
.then(function ({ res, itemris }) {
|
|
|
|
|
console.log('dbDeleteTodo to the Server')
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
UserStore.mutations.setErrorCatch(error)
|
|
|
|
|
return UserStore.getters.getServerCode
|
|
|
|
|
})
|
2019-02-01 04:10:31 +01:00
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
return res
|
|
|
|
|
}
|
2019-02-01 04:10:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function getTodosByCategory(context, category: string) {
|
|
|
|
|
let myarr = state.todos.filter((p) => {
|
|
|
|
|
return p.category === category
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return myarr
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-14 22:40:30 +01:00
|
|
|
export const actions = {
|
2019-02-03 00:51:58 +01:00
|
|
|
dbInsertTodo: b.dispatch(dbInsertTodo),
|
2019-02-01 04:10:31 +01:00
|
|
|
dbSaveTodo: b.dispatch(dbSaveTodo),
|
|
|
|
|
dbLoadTodo: b.dispatch(dbLoadTodo),
|
2019-02-02 20:13:06 +01:00
|
|
|
dbDeleteTodo: b.dispatch(dbDeleteTodo),
|
2019-02-15 01:25:44 +01:00
|
|
|
updatefromIndexedDbToStateTodo: b.dispatch(updatefromIndexedDbToStateTodo),
|
2019-02-04 03:09:15 +01:00
|
|
|
getTodosByCategory: b.dispatch(getTodosByCategory),
|
|
|
|
|
checkPendingMsg: b.dispatch(checkPendingMsg),
|
|
|
|
|
waitAndcheckPendingMsg: b.dispatch(waitAndcheckPendingMsg)
|
2019-01-14 22:40:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Module
|
|
|
|
|
const TodosModule = {
|
|
|
|
|
get state() {
|
|
|
|
|
return stateGetter()
|
|
|
|
|
},
|
|
|
|
|
getters: Getters.getters,
|
2019-02-03 14:40:20 +01:00
|
|
|
mutations: Mutations.mutations,
|
2019-01-14 22:40:30 +01:00
|
|
|
actions: Actions.actions
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-01 04:10:31 +01:00
|
|
|
export default TodosModule
|