Fix: first elem added not working...
This commit is contained in:
@@ -15,6 +15,8 @@ import { Getter, State, Mutation } from 'vuex-class'
|
||||
import { costanti } from '@src/store/Modules/costanti'
|
||||
const namespace: string = 'Todos'
|
||||
|
||||
import globalroutines from './../../../globalroutines/index'
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -44,6 +46,7 @@ export default class Todo extends Vue {
|
||||
public service: any
|
||||
public actualMaxPosition: number = 15
|
||||
public scrollable = true
|
||||
public tmpstrTodos: string = ''
|
||||
public categoryAtt: string = ''
|
||||
// public showtype: number = Todos.state.showtype
|
||||
|
||||
@@ -502,5 +505,36 @@ export default class Todo extends Vue {
|
||||
|
||||
}
|
||||
|
||||
getArrTodos() {
|
||||
|
||||
let mystr = ''
|
||||
let mythis = this
|
||||
|
||||
mythis.tmpstrTodos = ''
|
||||
return globalroutines(null, 'readall', 'todos', null)
|
||||
.then(function (alldata) {
|
||||
const myrecs = [...alldata]
|
||||
|
||||
myrecs.forEach(rec => {
|
||||
mystr = mystr + rec.descr + rec.completed + '] ['
|
||||
})
|
||||
|
||||
mythis.tmpstrTodos = 'TODOS: ' + mystr
|
||||
})
|
||||
}
|
||||
|
||||
// setArrTodos() {
|
||||
//
|
||||
// let mystr = ''
|
||||
// let mythis = this
|
||||
//
|
||||
// mythis.tmpstrTodos = ''
|
||||
// return globalroutines(null, 'write', 'todos', this.todos_arr[0])
|
||||
// .then(function (alldata) {
|
||||
// mythis.getArrTodos()
|
||||
// })
|
||||
// }
|
||||
//
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user