feature complete
This commit is contained in:
10
todo.js
10
todo.js
@ -9,7 +9,7 @@ console.log("+----------------------------------------+");
|
|||||||
|
|
||||||
let running = true;
|
let running = true;
|
||||||
while (running) {
|
while (running) {
|
||||||
let startQuestion = readline.question("wähle eine option\n1:Aufgabe hinzufügen:\n2:Aufgaben anzeigen\n3:Aufgabe löschen\nq:beenden\n");
|
let startQuestion = readline.question("wähle eine Option:\n1:Aufgabe hinzufügen\n2:Aufgaben anzeigen\n3:Aufgabe abschließen\nq:beenden\n");
|
||||||
startQuestion.trim();
|
startQuestion.trim();
|
||||||
|
|
||||||
switch (startQuestion) {
|
switch (startQuestion) {
|
||||||
@ -20,7 +20,7 @@ switch (startQuestion) {
|
|||||||
showTask();
|
showTask();
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
deleteTask();
|
markTask();
|
||||||
break;
|
break;
|
||||||
case"q":
|
case"q":
|
||||||
running = false;
|
running = false;
|
||||||
@ -55,3 +55,9 @@ function showTask() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function markTask() {
|
||||||
|
showTask();
|
||||||
|
let mark = readline.question("Welche Aufgabe möchtest du abschließen?\n")
|
||||||
|
mark = mark - 1;
|
||||||
|
toDo[mark].state = true;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user