minimal changes

This commit is contained in:
Malte Schulze Hobeling 2023-02-02 16:23:56 +01:00
parent 106b97e105
commit dbe98686bd
2 changed files with 5 additions and 10 deletions

View File

@ -41,9 +41,7 @@ public class ConsoleMain {
String selection = sc.nextLine();
switch (selection) {
case "0" -> running = false;
case "1" -> {
AccountMgr.currentUser = ConsoleLib.loginPrompt();
}
case "1" -> AccountMgr.currentUser = ConsoleLib.loginPrompt();
case "2" -> ConsoleLib.showFood_planPrompt();
case "3" -> ConsoleLib.createParentPrompt();
}
@ -70,9 +68,7 @@ public class ConsoleMain {
Scanner sc = new Scanner(System.in);
String selection = sc.nextLine();
switch (selection) {
case "0" -> {
AccountMgr.currentUser = null;
}
case "0" -> AccountMgr.currentUser = null;
case "1" -> ConsoleLib.createWorkerPrompt();
case "2" -> ConsoleLib.createParentPrompt();
case "3" -> ConsoleLib.createChildPrompt(String.valueOf(AccountMgr.currentUser.getId()));
@ -101,11 +97,9 @@ public class ConsoleMain {
Scanner sc = new Scanner(System.in);
String selection = sc.nextLine();
switch (selection) {
case "0" -> {
AccountMgr.currentUser = null;
}
case "0" -> AccountMgr.currentUser = null;
case "3" -> ConsoleLib.createChildPrompt(String.valueOf(AccountMgr.currentUser.getId()));
case "6" -> ConsoleLib.tablePrompt();
case "x1" -> ConsoleLib.tablePrompt();
case "7" -> ConsoleLib.showFood_planPrompt();
case "8" -> ConsoleLib.createFood_selectionPrompt();
}

View File

@ -49,6 +49,7 @@ public class FoodMgr {
/**
* updates a food_plan into the database
* @return number of rows affected or -1 on error
* @author Johannes Kantz
*/
public static long updateFood_plan(FoodPlan foodPlan){
String[] food_planH = {"id","food1","food2","dessert1","dessert2"};