fix Delete and Insert Todo... (after changed function find, findIndex...)
This commit is contained in:
@@ -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) => {
|
||||
|
||||
})
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<q-list separator no-border class="todo-menu">
|
||||
<div v-for="field in menuPopupTodo" :key="field.value">
|
||||
<q-item clickable v-if="(field.value !== 130) && (field.value !== 100)" :icon="field.icon"
|
||||
@click.native="clickMenu(field.value)">
|
||||
<q-item v-close-popup clickable v-if="(field.value !== 130) && (field.value !== 120)" :icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section v-if="field.value !== 120" label class="item-menu">
|
||||
<q-item-section label class="item-menu">
|
||||
<q-item-label>{{field.label}}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -17,9 +17,14 @@
|
||||
<q-item-section side v-if="field.value === 110">
|
||||
<q-checkbox v-model="itemtodo.completed"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 120)" :icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
|
||||
<q-item-section v-if="field.value === 120">
|
||||
<q-item-section>
|
||||
<q-slider label
|
||||
:class="$parent.menuProgress"
|
||||
v-model="itemtodo.progress"
|
||||
@@ -29,21 +34,12 @@
|
||||
/>
|
||||
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="field.value === 120">
|
||||
<q-item-section side>
|
||||
<div>
|
||||
<q-item-label style="color: blue">{{itemtodo.progress}} %</q-item-label>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 100)" :icon="field.icon"
|
||||
@click.native="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon" inverted color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section class="item-menu">
|
||||
{{field.label}}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 130)">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="priority_high" inverted color="primary"/>
|
||||
|
||||
@@ -306,7 +306,7 @@ export default class Todo extends Vue {
|
||||
}
|
||||
|
||||
public mydeleteItem(idobj: string) {
|
||||
console.log('mydeleteItem', idobj)
|
||||
// console.log('mydeleteItem', idobj)
|
||||
return Todos.actions.deleteItem({ cat: this.categoryAtt, idobj })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user