From dbe98686bd580d2c8cf613a0f7f520fd09acdf00 Mon Sep 17 00:00:00 2001 From: Malte Schulze Hobeling Date: Thu, 2 Feb 2023 16:23:56 +0100 Subject: [PATCH] minimal changes --- .../essensbestellungsverwaltung/ConsoleMain.java | 14 ++++---------- .../bib/essensbestellungsverwaltung/FoodMgr.java | 1 + 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/ConsoleMain.java b/src/main/java/com/bib/essensbestellungsverwaltung/ConsoleMain.java index cde3844..7b61cb0 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/ConsoleMain.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/ConsoleMain.java @@ -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(); } diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/FoodMgr.java b/src/main/java/com/bib/essensbestellungsverwaltung/FoodMgr.java index 57e2f58..b3239c4 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/FoodMgr.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/FoodMgr.java @@ -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"};