- added fields: longdescr, hoursworked, hoursplanned

This commit is contained in:
Paolo Arena
2019-03-30 02:57:40 +01:00
parent de117d55e6
commit 38b3405664
33 changed files with 753 additions and 326 deletions

View File

@@ -1,4 +1,4 @@
import { ITodo, ITodosState, IParamTodo, IDrag } from 'model'
import { ITodo, ITodosState, IParamTodo, IDrag, IProjectsState, IProject } from 'model'
import { storeBuilder } from './Store/Store'
import Api from '@api'
@@ -111,6 +111,14 @@ namespace Getters {
}
}, 'TodosCount')
const getRecordById = b.read((state: ITodosState) => (id: string, cat: string): ITodo => {
const indcat = getindexbycategory(cat)
if (state.todos) {
return state.todos[indcat].find((item) => item._id === id)
}
return null
}, 'getRecordById')
export const getters = {
get items_dacompletare() {
return items_dacompletare()
@@ -123,6 +131,9 @@ namespace Getters {
},
get TodosCount() {
return TodosCount()
},
get getRecordById() {
return getRecordById()
}
}
}