This commit is contained in:
2024-11-28 23:29:55 +01:00
parent 0dda8e760c
commit 70cc1e58e0
2 changed files with 13 additions and 8 deletions

View File

@@ -1,19 +1,19 @@
{
"hash": "c9e9bd60",
"configHash": "01a344ed",
"hash": "b70463bf",
"configHash": "5b7b5918",
"lockfileHash": "15613195",
"browserHash": "5dd2ada2",
"browserHash": "6c715d40",
"optimized": {
"vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "6afcb8f2",
"fileHash": "2fa29594",
"needsInterop": false
},
"vue-router": {
"src": "../../vue-router/dist/vue-router.mjs",
"file": "vue-router.js",
"fileHash": "3d78d312",
"fileHash": "5f636aa4",
"needsInterop": false
}
},

View File

@@ -44,6 +44,11 @@
filtered_todos.value = todos.value.filter(todo => todo.etat==etat);
}
}
//Question 10 - delete finished task
function delete_fini(){
todos.value = todos.value.filter(todo => todo.etat !== Etat.FINI);
filtered_todos.value=todos.value;
}
//Question 7 - Delete all_todos
// Delete all todos
@@ -57,7 +62,6 @@
todos.value =todos.value.filter(todo => todo!= this_todo);
filtered_todos.value=todos.value
}
</script>
@@ -70,10 +74,8 @@
<input id="date" type="date" v-model="nouveau_date">
</form>
<button v-on:click="add_todo()">Add</button>
<br>
<h1>Filter todos</h1>
<Filter
:All_etats="All_etats"
@@ -86,6 +88,9 @@
<!--Delete All Todos-->
<DeleteAllTodos @deleteAllTodos="deleteAllTodos " />
<br>
<button v-on:click="delete_fini()">Delete finished tasks</button>
<br>
<h1>Todos</h1>