fix Delete and Insert Todo... (after changed function find, findIndex...)

This commit is contained in:
Paolo Arena
2019-03-22 01:00:41 +01:00
parent e0a88df630
commit a2c1a90050
8 changed files with 63 additions and 40 deletions

View File

@@ -458,15 +458,35 @@ export default class SingleTodo extends Vue {
const cancelstr = this.$t('dialog.cancel')
const msg = this.$t('dialog.msg.deleteTask', {mytodo : this.itemtodo.descr })
await askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), msg, deletestr, cancelstr)
.then((ris) => {
console.log('ris', ris)
if (ris) {
this.removeitem(this.itemtodo._id)
}
}).catch((err) => {
this.$q.dialog({
cancel: {
label: cancelstr
},
message: msg,
ok: {
label: deletestr,
push: true
},
title: this.$t('dialog.msg.titledeleteTask')
}).onOk(() => {
console.log('OK')
this.removeitem(this.itemtodo._id)
}).onCancel(() => {
console.log('CANCEL')
})
/*
// return await askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), msg, deletestr, cancelstr)
.then((ris) => {
console.log('ris', ris)
if (ris) {
this.removeitem(this.itemtodo._id)
}
}).catch((err) => {
})
*/
}
}