diff --git a/src/components/todos/SingleTodo/SingleTodo.ts b/src/components/todos/SingleTodo/SingleTodo.ts index 63bbee3..436ac1c 100644 --- a/src/components/todos/SingleTodo/SingleTodo.ts +++ b/src/components/todos/SingleTodo/SingleTodo.ts @@ -38,6 +38,7 @@ export default class SingleTodo extends Vue { public percProgress: string = 'percProgress' public colProgress: string = 'blue' public togglemenu: boolean = false + public percentageProgress: number = 0 $q: any @Prop({ required: true }) itemtodo: ITodo @@ -92,10 +93,13 @@ export default class SingleTodo extends Vue { this.classExpiring = 'flex-item data-item' this.classExpiringEx = '' if (this.itemtodo.completed) { + this.percentageProgress = 100 this.classCompleted += ' icon_completed' this.classDescr += ' status_completed' this.classExpiring += ' status_completed' this.classExpiringEx += ' status_completed' + } else { + this.percentageProgress = this.itemtodo.progress } this.menuProgress = 'menuProgress' @@ -332,13 +336,6 @@ export default class SingleTodo extends Vue { // this.$q.notify('setPriority: ' + elem) } - getPercentageProgress() { - if (this.itemtodo.completed) - return 100 - else - return this.itemtodo.progress - } - askConfirmDelete() { const deletestr = this.$t('dialog.delete') const cancelstr = this.$t('dialog.cancel') diff --git a/src/components/todos/SingleTodo/SingleTodo.vue b/src/components/todos/SingleTodo/SingleTodo.vue index 16a3048..bbc070f 100644 --- a/src/components/todos/SingleTodo/SingleTodo.vue +++ b/src/components/todos/SingleTodo/SingleTodo.vue @@ -1,65 +1,16 @@