Compare commits
	
		
			8 Commits
		
	
	
		
			f0d87b0e43
			...
			samu_maske
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| bc4926aca8 | |||
| 7acd24e285 | |||
| 509dc31d62 | |||
| a8e9d0ada4 | |||
| f281bc9ef4 | |||
| cac9a4f43a | |||
| eea06a254f | |||
| 5c21ee1743 | 
@@ -3,6 +3,8 @@ package Logik;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
public class Mahlzeit {
 | 
			
		||||
 | 
			
		||||
	private int id;
 | 
			
		||||
	private String name;
 | 
			
		||||
	private float            preis;
 | 
			
		||||
	private ArrayList<Zutat> zutaten;
 | 
			
		||||
@@ -15,6 +17,22 @@ public class Mahlzeit {
 | 
			
		||||
		zutaten = new ArrayList<>();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public Mahlzeit (int id, String name, float preis, String beschreibung) {
 | 
			
		||||
		this.id = id;
 | 
			
		||||
		this.name = name;
 | 
			
		||||
		this.preis = preis;
 | 
			
		||||
		this.beschreibung = beschreibung;
 | 
			
		||||
		zutaten = new ArrayList<>();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public int getId() {
 | 
			
		||||
		return id;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public void setId(int id) {
 | 
			
		||||
		this.id = id;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public String getName() {
 | 
			
		||||
		return name;
 | 
			
		||||
	}
 | 
			
		||||
@@ -36,4 +54,6 @@ public class Mahlzeit {
 | 
			
		||||
		return String.format("Name: %s, Preis: %g, Beschreibung: %s", name, preis, beschreibung);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -282,6 +282,12 @@ public class RestApiClient implements IRestAPI{
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Startet einen guckt ob die mitgegebenen Anmeldedaten in der Kombination existieren.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param credentials Die Anmeldedaten in Json-String form
 | 
			
		||||
	 * @return True oder false, je nach Erfolg des Anmeldeversuchs
 | 
			
		||||
	 */
 | 
			
		||||
	public boolean anmeldeVersuch(String credentials){
 | 
			
		||||
 | 
			
		||||
		JsonObject json = gson.fromJson(credentials, JsonObject.class);
 | 
			
		||||
@@ -316,6 +322,12 @@ public class RestApiClient implements IRestAPI{
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Holt alle Gerichte eines mitgegebenen Tages aus der Datenbank
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param datum Das angeforderte Datum in String Form (YYYY-MM-DD)
 | 
			
		||||
	 * @return Ein Tagesplan Objekt mit allen Gerichten
 | 
			
		||||
	 */
 | 
			
		||||
	public Tagesplan getGerichteOnTag(String datum){
 | 
			
		||||
 | 
			
		||||
		URI apiUri = URI.create(String.format("%s/Tagesplan/getGerichteOnTag?datum=%s", urlBase, datum));
 | 
			
		||||
@@ -359,4 +371,59 @@ public class RestApiClient implements IRestAPI{
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public int getGerichtIdOnTag(String name, String datum){
 | 
			
		||||
 | 
			
		||||
		URI apiUri = URI.create(String.format("%s/Tagesplan/getGerichtIdOnTag?name=%s&datum=%s", urlBase, name, datum));
 | 
			
		||||
		System.out.println(apiUri);
 | 
			
		||||
		HttpRequest httpRequest = HttpRequest.newBuilder()
 | 
			
		||||
											 .uri(apiUri)
 | 
			
		||||
											 .header("Content-Type", "application/json")
 | 
			
		||||
											 .GET()
 | 
			
		||||
											 .build();
 | 
			
		||||
 | 
			
		||||
		try {
 | 
			
		||||
			// Send the request and get the response
 | 
			
		||||
			HttpResponse<String> httpResponse = client.send(httpRequest, HttpResponse.BodyHandlers.ofString());
 | 
			
		||||
 | 
			
		||||
			// Print the response status code and body
 | 
			
		||||
			System.out.println("Status Code: " + httpResponse.statusCode());
 | 
			
		||||
			System.out.println("Response Body: " + httpResponse.body());
 | 
			
		||||
 | 
			
		||||
			JsonElement jsonElement = JsonParser.parseString(httpResponse.body());
 | 
			
		||||
 | 
			
		||||
			JsonArray json = jsonElement.getAsJsonArray();
 | 
			
		||||
 | 
			
		||||
			JsonObject o = json.get(0).getAsJsonObject();
 | 
			
		||||
 | 
			
		||||
			return o.get("id").getAsInt();
 | 
			
		||||
 | 
			
		||||
		} catch (Exception e) {
 | 
			
		||||
			e.printStackTrace();
 | 
			
		||||
			return -1;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public void deleteGericht(int id){
 | 
			
		||||
		URI apiUri = URI.create(String.format("%s/Tagesplan/%d", urlBase, id));
 | 
			
		||||
		System.out.println(apiUri);
 | 
			
		||||
		HttpRequest httpRequest = HttpRequest.newBuilder()
 | 
			
		||||
											 .uri(apiUri)
 | 
			
		||||
											 .header("Content-Type", "application/json")
 | 
			
		||||
											 .DELETE()
 | 
			
		||||
											 .build();
 | 
			
		||||
 | 
			
		||||
		try {
 | 
			
		||||
			// Send the request and get the response
 | 
			
		||||
			HttpResponse<String> httpResponse = client.send(httpRequest, HttpResponse.BodyHandlers.ofString());
 | 
			
		||||
 | 
			
		||||
			// Print the response status code and body
 | 
			
		||||
			System.out.println("Status Code: " + httpResponse.statusCode());
 | 
			
		||||
			System.out.println("Delete Gericht: Response Body: " + httpResponse.body());
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		} catch (Exception e) {
 | 
			
		||||
			e.printStackTrace();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,9 +3,13 @@ package de.subway_surfers.vpr_app;
 | 
			
		||||
import Logik.Mahlzeit;
 | 
			
		||||
import Logik.Tagesplan;
 | 
			
		||||
import RestAPISchnittstelle.RestApiClient;
 | 
			
		||||
import com.google.gson.Gson;
 | 
			
		||||
import com.google.gson.JsonElement;
 | 
			
		||||
import com.google.gson.JsonObject;
 | 
			
		||||
import javafx.beans.value.ChangeListener;
 | 
			
		||||
import javafx.beans.value.ObservableValue;
 | 
			
		||||
import javafx.collections.FXCollections;
 | 
			
		||||
import javafx.collections.ObservableList;
 | 
			
		||||
import javafx.event.ActionEvent;
 | 
			
		||||
import javafx.fxml.FXML;
 | 
			
		||||
import javafx.geometry.Pos;
 | 
			
		||||
@@ -22,6 +26,7 @@ import javafx.stage.Stage;
 | 
			
		||||
 | 
			
		||||
import java.net.http.WebSocket;
 | 
			
		||||
import java.text.DateFormat;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.time.LocalTime;
 | 
			
		||||
import java.time.format.DateTimeFormatter;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
@@ -32,14 +37,6 @@ import static java.time.LocalTime.now;
 | 
			
		||||
 | 
			
		||||
public class EssensverwaltungMitarbeiterView {
 | 
			
		||||
 | 
			
		||||
	public Label g1Name;
 | 
			
		||||
	public Label g2Name;
 | 
			
		||||
	public Label g3Name;
 | 
			
		||||
	public Label g4Name;
 | 
			
		||||
	public Label g1Beschreibung;
 | 
			
		||||
	public Label g2Beschreibung;
 | 
			
		||||
	public Label g3Beschreibung;
 | 
			
		||||
	public Label g4Beschreibung;
 | 
			
		||||
	public Label dateLabel;
 | 
			
		||||
	@FXML
 | 
			
		||||
	private GridPane tagesplan;
 | 
			
		||||
@@ -48,70 +45,47 @@ public class EssensverwaltungMitarbeiterView {
 | 
			
		||||
 | 
			
		||||
	private String date;
 | 
			
		||||
 | 
			
		||||
	private String day;
 | 
			
		||||
 | 
			
		||||
	private String month;
 | 
			
		||||
 | 
			
		||||
	private String year;
 | 
			
		||||
 | 
			
		||||
	private ChangeListener listener;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Initialize des Controllers.
 | 
			
		||||
	 * Setzt das Datum, holt die Gerichte ein und initialisiert die responsive grid.
 | 
			
		||||
	 * @author Samuel Wolff
 | 
			
		||||
	 */
 | 
			
		||||
	public void initialize(){
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
		(obs,oldValue,newValue) -> {
 | 
			
		||||
			final int zeile = 1;
 | 
			
		||||
			for (Node n : tagesplan.getChildren()){
 | 
			
		||||
				if(n instanceof Control  && GridPane.getRowIndex(n) == zeile){
 | 
			
		||||
					((Control) n).setPrefHeight(newValue.floatValue());
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		*/
 | 
			
		||||
 | 
			
		||||
		DateFormat dateFormat = DateFormat.getDateInstance();
 | 
			
		||||
		date = dateFormat.format(new Date());
 | 
			
		||||
		date = date.replace('.', '-');
 | 
			
		||||
		day = date.split("-")[0];
 | 
			
		||||
		month = date.split("-")[1];
 | 
			
		||||
		year = date.split("-")[2];
 | 
			
		||||
		date = String.format("%s-%s-%s", year, month, day);
 | 
			
		||||
 | 
			
		||||
		dateLabel.setText(String.format("%s.%s.%s", day, month, year));
 | 
			
		||||
		date = LocalDate.now().toString();
 | 
			
		||||
 | 
			
		||||
		dateLabel.setText(date);
 | 
			
		||||
 | 
			
		||||
		initGrid();
 | 
			
		||||
		initGerichte();
 | 
			
		||||
 | 
			
		||||
		for (int i = 0; i < tagesplan.getColumnCount(); i++) {
 | 
			
		||||
			ColumnConstraints cc = new ColumnConstraints();
 | 
			
		||||
			cc.setHgrow(Priority.ALWAYS);
 | 
			
		||||
			cc.setFillWidth(true);
 | 
			
		||||
			tagesplan.getColumnConstraints().add(cc);
 | 
			
		||||
	}
 | 
			
		||||
/*
 | 
			
		||||
		tagesplan.heightProperty().addListener((obs,oldValue,newValue) -> {
 | 
			
		||||
			final int zeile = 1;
 | 
			
		||||
			for (Node n : tagesplan.getChildren()){
 | 
			
		||||
				if(n instanceof Control  && GridPane.getRowIndex(n) == zeile){
 | 
			
		||||
					((Control) n).setPrefHeight(newValue.floatValue());
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode beim klicken auf den Anmeldebutton. Meldet den User ab
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Max Heer
 | 
			
		||||
	 */
 | 
			
		||||
		VerwaltungApplication.responsiveBreiteGrid(tagesplan);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
	public void onAbmelden(ActionEvent actionEvent) {
 | 
			
		||||
		VerwaltungApplication.sceneWechseln("login-view.fxml");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode beim klicken auf den Filter Button. Öffnet den Filter Dialog.
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Sven Alteköster
 | 
			
		||||
	 */
 | 
			
		||||
	public void onFilter(ActionEvent actionEvent) {
 | 
			
		||||
		Stage stage = new Stage();
 | 
			
		||||
		VerwaltungApplication.sceneWechseln(stage, 450, 400, "inhaltsstoffe_filtern-view.fxml");
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode beim klicken auf den hinzufügen Button. Öffnet den Dialog zum hinzufügen eines Gerichtes zum aktuellen Tag.
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Sven Alteköster
 | 
			
		||||
	 */
 | 
			
		||||
	public void onHinzufuegen(ActionEvent actionEvent) {
 | 
			
		||||
		Stage gerichterstellung = new Stage();
 | 
			
		||||
 | 
			
		||||
@@ -124,39 +98,59 @@ public class EssensverwaltungMitarbeiterView {
 | 
			
		||||
		gerichterstellung.minHeightProperty().set(530);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode beim klicken auf den Zurück Button. Kehrt zum Startbildschirm zurück.
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Max Heer
 | 
			
		||||
	 */
 | 
			
		||||
	public void onZurueck(ActionEvent actionEvent) {
 | 
			
		||||
		VerwaltungApplication.sceneWechseln("hauptmenue_mitarbeiter-view.fxml");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode bei Klick auf Pfeil links, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Samuel Wolff
 | 
			
		||||
	 */
 | 
			
		||||
	public void pfeilLinks(ActionEvent actionEvent) {
 | 
			
		||||
 | 
			
		||||
		tagesplan.getChildren().clear();
 | 
			
		||||
 | 
			
		||||
		day = String.valueOf(Integer.parseInt(day)-1);
 | 
			
		||||
		date = String.format("%s-%s-%s", year, month, day);
 | 
			
		||||
 | 
			
		||||
		dateLabel.setText(String.format("%s.%s.%s", day, month, year));
 | 
			
		||||
		LocalDate datum = LocalDate.parse(date);
 | 
			
		||||
		datum = datum.minusDays(1);
 | 
			
		||||
		date = datum.toString();
 | 
			
		||||
		dateLabel.setText(date);
 | 
			
		||||
 | 
			
		||||
		initGerichte();
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode bei Klick auf Pfeil rechts, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
			
		||||
	 * @param actionEvent
 | 
			
		||||
	 * @author Samuel Wolff
 | 
			
		||||
	 */
 | 
			
		||||
	public void pfeilRechts(ActionEvent actionEvent) {
 | 
			
		||||
 | 
			
		||||
		tagesplan.getChildren().clear();
 | 
			
		||||
 | 
			
		||||
		day = String.valueOf(Integer.parseInt(day)+1);
 | 
			
		||||
		date = String.format("%s-%s-%s", year, month, day);
 | 
			
		||||
 | 
			
		||||
		dateLabel.setText(String.format("%s.%s.%s", day, month, year));
 | 
			
		||||
		LocalDate datum = LocalDate.parse(date);
 | 
			
		||||
		datum = datum.plusDays(1);
 | 
			
		||||
		date = datum.toString();
 | 
			
		||||
		dateLabel.setText(date);
 | 
			
		||||
 | 
			
		||||
		initGerichte();
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Initialisiert alle Gerichte des aktuellen Datums auf der Seite.
 | 
			
		||||
	 * @author Samuel Wolff
 | 
			
		||||
	 */
 | 
			
		||||
	private void initGerichte(){
 | 
			
		||||
 | 
			
		||||
		tagesplan.getStyleClass().clear();
 | 
			
		||||
		tagesplan.getChildren().clear();
 | 
			
		||||
 | 
			
		||||
		t = new RestApiClient().getGerichteOnTag(date);
 | 
			
		||||
 | 
			
		||||
@@ -167,8 +161,9 @@ public class EssensverwaltungMitarbeiterView {
 | 
			
		||||
				Label beschreibung = new Label();
 | 
			
		||||
				beschreibung.setWrapText(true);
 | 
			
		||||
				tagesplan.add(beschreibung, i, 1);
 | 
			
		||||
				//Button loeschen = new Button("Löschen");
 | 
			
		||||
				//tagesplan.add(loeschen, i ,2);
 | 
			
		||||
				Button loeschen = new Button("Löschen");
 | 
			
		||||
				tagesplan.add(loeschen, i ,2);
 | 
			
		||||
				loeschen.setOnAction(this::loeschenButtonKlick);
 | 
			
		||||
 | 
			
		||||
				name.setText(t.getGerichte().get(i).getName());
 | 
			
		||||
				beschreibung.setText(t.getGerichte().get(i).getBeschreibung());
 | 
			
		||||
@@ -186,9 +181,60 @@ public class EssensverwaltungMitarbeiterView {
 | 
			
		||||
				((Control) n).setPrefWidth(tagesplan.getWidth() / tagesplan.getColumnCount());
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		for (Node n : tagesplan.getChildren()){
 | 
			
		||||
			if(n instanceof Control  && GridPane.getRowIndex(n) == 1){
 | 
			
		||||
				((Control) n).setPrefHeight(tagesplan.getHeight());
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		tagesplan.getStyleClass().add("essensuebersicht_gridlines");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Initialisiert das responsive grid.
 | 
			
		||||
	 */
 | 
			
		||||
	public void initGrid(){
 | 
			
		||||
		for (int i = 0; i < tagesplan.getColumnCount(); i++) {
 | 
			
		||||
			ColumnConstraints cc = new ColumnConstraints();
 | 
			
		||||
			cc.setHgrow(Priority.ALWAYS);
 | 
			
		||||
			cc.setFillWidth(true);
 | 
			
		||||
			tagesplan.getColumnConstraints().add(cc);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		tagesplan.heightProperty().addListener((obs,oldValue,newValue) -> {
 | 
			
		||||
			final int zeile = 1;
 | 
			
		||||
			for (Node n : tagesplan.getChildren()){
 | 
			
		||||
				if(n instanceof Control  && GridPane.getRowIndex(n) == zeile){
 | 
			
		||||
					((Control) n).setPrefHeight(newValue.floatValue());
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		VerwaltungApplication.responsiveBreiteGrid(tagesplan);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Methode beim klicken auf den Löschen Button eines Tagesplan Elementes
 | 
			
		||||
	 * @param a
 | 
			
		||||
	 */
 | 
			
		||||
	private void loeschenButtonKlick(ActionEvent a){
 | 
			
		||||
		Button btn = (Button) a.getSource();
 | 
			
		||||
		int col = GridPane.getColumnIndex(btn);
 | 
			
		||||
		Mahlzeit m = t.getGerichte().get(col);
 | 
			
		||||
 | 
			
		||||
		RestApiClient cl = new RestApiClient();
 | 
			
		||||
 | 
			
		||||
		int id = cl.getGerichtIdOnTag(t.getGerichte().get(col < 0 ? 0 : col).getName().replace(' ', '_'), date);
 | 
			
		||||
 | 
			
		||||
		t.getGerichte().remove(col);
 | 
			
		||||
 | 
			
		||||
		System.out.println("Die Id lautet: " + id + col);
 | 
			
		||||
 | 
			
		||||
		cl.delete("GibtsAm", id);
 | 
			
		||||
		initGerichte();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,15 +4,16 @@ import Logik.Tagesplan;
 | 
			
		||||
import RestAPISchnittstelle.RestApiClient;
 | 
			
		||||
import javafx.event.ActionEvent;
 | 
			
		||||
import javafx.fxml.FXML;
 | 
			
		||||
import javafx.geometry.Pos;
 | 
			
		||||
import javafx.scene.control.Label;
 | 
			
		||||
import javafx.scene.layout.GridPane;
 | 
			
		||||
import javafx.scene.text.TextAlignment;
 | 
			
		||||
 | 
			
		||||
import java.text.DateFormat;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
public class HauptmenueMitarbeiterView {
 | 
			
		||||
 | 
			
		||||
    @FXML
 | 
			
		||||
    private GridPane wochenplan;
 | 
			
		||||
    private String date;
 | 
			
		||||
@@ -34,14 +35,8 @@ public class HauptmenueMitarbeiterView {
 | 
			
		||||
     */
 | 
			
		||||
    public void wochenuebersichtFuellen(){
 | 
			
		||||
        String dateanzeige;
 | 
			
		||||
        DateFormat dateFormat = DateFormat.getDateInstance();
 | 
			
		||||
        date = dateFormat.format(new Date());
 | 
			
		||||
        date = date.replace('.', '-');
 | 
			
		||||
        day = date.split("-")[0];
 | 
			
		||||
        month = date.split("-")[1];
 | 
			
		||||
        year = date.split("-")[2];
 | 
			
		||||
        date = String.format("%s-%s-%s", year, month, day);
 | 
			
		||||
        dateanzeige = String.format("%s.%s.%s",day,month,year);
 | 
			
		||||
        date = LocalDate.now().toString();
 | 
			
		||||
        dateanzeige = date;
 | 
			
		||||
        Tagesplan t = new RestApiClient().getGerichteOnTag(date);
 | 
			
		||||
        for(int i=0;i<5;i++){
 | 
			
		||||
            Label tag = new Label();
 | 
			
		||||
@@ -55,14 +50,21 @@ public class HauptmenueMitarbeiterView {
 | 
			
		||||
                name.setPrefHeight(75);
 | 
			
		||||
                name.setTextAlignment(TextAlignment.CENTER);
 | 
			
		||||
            }
 | 
			
		||||
            day = String.valueOf(Integer.parseInt(day)+1);
 | 
			
		||||
            date = String.format("%s-%s-%s", year, month, day);
 | 
			
		||||
            dateanzeige = String.format("%s.%s.%s",day,month,year);
 | 
			
		||||
            LocalDate datum = LocalDate.parse(date);
 | 
			
		||||
            datum = datum.plusDays(1);
 | 
			
		||||
            date = datum.toString();
 | 
			
		||||
            dateanzeige = date;
 | 
			
		||||
            t = new RestApiClient().getGerichteOnTag(date);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Methode beim klicken auf den Anmeldebutton. Meldet den User ab
 | 
			
		||||
     * @param actionEvent
 | 
			
		||||
     * @author Samuel Wolff
 | 
			
		||||
     */
 | 
			
		||||
    public void onAbmelden(ActionEvent actionEvent) {
 | 
			
		||||
        //VerwaltungApplication.abmelden();
 | 
			
		||||
        VerwaltungApplication.abmelden();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void onAccountAnlegenClick(ActionEvent actionEvent) {
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,10 @@ public class VerwaltungApplication extends Application {
 | 
			
		||||
 | 
			
		||||
	private static Stage stage;
 | 
			
		||||
 | 
			
		||||
	public static void abmelden(){
 | 
			
		||||
		VerwaltungApplication.sceneWechseln("login-view.fxml");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public void start(Stage stage) throws IOException {
 | 
			
		||||
		FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("login-view.fxml"));
 | 
			
		||||
 
 | 
			
		||||
@@ -52,9 +52,6 @@
 | 
			
		||||
    </center>
 | 
			
		||||
    <bottom>
 | 
			
		||||
        <BorderPane styleClass="button-untenrechts">
 | 
			
		||||
            <right>
 | 
			
		||||
                <Button text="Bestätigen" defaultButton="true" styleClass=".button"/>
 | 
			
		||||
            </right>
 | 
			
		||||
        </BorderPane>
 | 
			
		||||
    </bottom>
 | 
			
		||||
</BorderPane>
 | 
			
		||||
 
 | 
			
		||||
@@ -27,12 +27,11 @@
 | 
			
		||||
                    <Button text="Alle Bestellungen anzeigen" onAction="#onBestellungenAnzeigen"/>
 | 
			
		||||
                    <Button text="Rechnungen herunterladen"/>
 | 
			
		||||
                    <Button text="Daten importieren/Exportieren"/>
 | 
			
		||||
                    <Button text="Accounts verwalten" onAction="#onAccountAnlegenClick"/>
 | 
			
		||||
                    <Button text="Account anlegen" onAction="#onAccountAnlegenClick"/>
 | 
			
		||||
                </VBox>
 | 
			
		||||
            </left>
 | 
			
		||||
            <right>
 | 
			
		||||
                <GridPane fx:id="wochenplan" styleClass="hauptmenue_wochenuebersicht">
 | 
			
		||||
 | 
			
		||||
                </GridPane>
 | 
			
		||||
            </right>
 | 
			
		||||
        </BorderPane>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@
 | 
			
		||||
    -fx-padding: 20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.hauptmenue_buttons_links{
 | 
			
		||||
.hauptmenue_buttons_links, .gerichterstellung_felder, .filter, .main, .filter_unten{
 | 
			
		||||
    -fx-spacing: 20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -73,6 +73,13 @@
 | 
			
		||||
    -fx-vgap: 10;
 | 
			
		||||
    -fx-hgap: 10;
 | 
			
		||||
}
 | 
			
		||||
.test {
 | 
			
		||||
    -fx-padding: 10 20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.essensuebersicht_gridlines {
 | 
			
		||||
     -fx-grid-lines-visible: true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.accounterstellung_links, .button-untenrechts{
 | 
			
		||||
    -fx-spacing: 20;
 | 
			
		||||
@@ -82,3 +89,24 @@
 | 
			
		||||
    -fx-background-color: #FFDCDC;
 | 
			
		||||
    -fx-text-fill: #FFDCDC;
 | 
			
		||||
}
 | 
			
		||||
.essensuebersicht_gridlines > * {
 | 
			
		||||
    -fx-alignment: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.pfeil{
 | 
			
		||||
    -fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
 | 
			
		||||
    -fx-background-insets: 0 0 -1 0, 0;
 | 
			
		||||
    -fx-padding: 0.25em;
 | 
			
		||||
    -fx-shape: "M 0 -3.5 v 7 l 4 -3.5 z";
 | 
			
		||||
    -fx-pref-width: 25;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.links {
 | 
			
		||||
    -fx-rotate: 180;
 | 
			
		||||
}
 | 
			
		||||
.titledPaneUeberschrift > .title {
 | 
			
		||||
    -fx-pref-height: 50;
 | 
			
		||||
    -fx-padding: 10 10 16 10;
 | 
			
		||||
    -fx-font-size: 15;
 | 
			
		||||
    -fx-font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user