Compare commits
	
		
			16 Commits
		
	
	
		
			f0bd39d3a6
			...
			8b7a611e2a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8b7a611e2a | |||
| 336a6fc89d | |||
| 0303458524 | |||
| f97211ae84 | |||
| c127cfb8a3 | |||
| 293c5f7fee | |||
| 956c723057 | |||
| ee2685cd45 | |||
| 8f8597c0c9 | |||
| a620c620f0 | |||
| 43f0aeb352 | |||
| 29c31841fa | |||
| 349a8f02cc | |||
| 58ab3e313c | |||
| bc4926aca8 | |||
| 7acd24e285 | 
							
								
								
									
										
											BIN
										
									
								
								out/artifacts/VPR_App_jar/VPR_App.jar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								out/artifacts/VPR_App_jar/VPR_App.jar
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,10 +1,10 @@
 | 
				
			|||||||
package Logik;
 | 
					package Logik;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.time.LocalDate;
 | 
					 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.Date;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Mahlzeit {
 | 
					public class Mahlzeit {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private int id;
 | 
				
			||||||
	private String name;
 | 
						private String name;
 | 
				
			||||||
	private float            preis;
 | 
						private float            preis;
 | 
				
			||||||
	private ArrayList<Zutat> zutaten;
 | 
						private ArrayList<Zutat> zutaten;
 | 
				
			||||||
@@ -17,7 +17,6 @@ public class Mahlzeit {
 | 
				
			|||||||
		zutaten = new ArrayList<>();
 | 
							zutaten = new ArrayList<>();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
	public String getName() {
 | 
						public String getName() {
 | 
				
			||||||
		return name;
 | 
							return name;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -39,4 +38,6 @@ public class Mahlzeit {
 | 
				
			|||||||
		return String.format("Name: %s, Preis: %g, Beschreibung: %s", name, preis, beschreibung);
 | 
							return String.format("Name: %s, Preis: %g, Beschreibung: %s", name, preis, beschreibung);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,8 +17,6 @@ import com.google.gson.*;
 | 
				
			|||||||
import javafx.scene.control.Alert;
 | 
					import javafx.scene.control.Alert;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * noch nicht getestet
 | 
					 | 
				
			||||||
 * TODO FERTIG MACHEN
 | 
					 | 
				
			||||||
 * @author Samuel Wolff
 | 
					 * @author Samuel Wolff
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public class RestApiClient implements IRestAPI{
 | 
					public class RestApiClient implements IRestAPI{
 | 
				
			||||||
@@ -53,6 +51,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 * Methode für einen Get-Aufruf. Ruft alle Elemente einer Tabelle auf.
 | 
						 * Methode für einen Get-Aufruf. Ruft alle Elemente einer Tabelle auf.
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param controllerName Name des aufzurufenden Controllers
 | 
						 * @param controllerName Name des aufzurufenden Controllers
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public String get(String controllerName) {
 | 
						public String get(String controllerName) {
 | 
				
			||||||
@@ -90,6 +89,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param controllerName Name des aufzurufenden Controllers
 | 
						 * @param controllerName Name des aufzurufenden Controllers
 | 
				
			||||||
	 * @param id Id der Aufzurufenden Zeile
 | 
						 * @param id Id der Aufzurufenden Zeile
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public String get(String controllerName, int id) {
 | 
						public String get(String controllerName, int id) {
 | 
				
			||||||
@@ -125,11 +125,14 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
 | 
						 * --DEPRECATED--
 | 
				
			||||||
	 * Methode für einen Get-Aufruf. Ruft ein spezielles Element auf.
 | 
						 * Methode für einen Get-Aufruf. Ruft ein spezielles Element auf.
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param controllerName Name des aufzurufenden Controllers
 | 
						 * @param controllerName Name des aufzurufenden Controllers
 | 
				
			||||||
	 * @param id Id der Aufzurufenden Zeile
 | 
						 * @param id Id der Aufzurufenden Zeile
 | 
				
			||||||
	 * @param bezahlt TODO Warum ist das hier?
 | 
						 * @param bezahlt TODO Warum ist das hier?
 | 
				
			||||||
 | 
						 * @deprecated
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public String get(String controllerName, int id, boolean bezahlt) {
 | 
						public String get(String controllerName, int id, boolean bezahlt) {
 | 
				
			||||||
@@ -162,6 +165,13 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/***
 | 
				
			||||||
 | 
						 * Ein gefilterter Get Aufruf
 | 
				
			||||||
 | 
						 * @param controllerName
 | 
				
			||||||
 | 
						 * @param params
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 * @author Sven Alteköster
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public String get(String controllerName, String[] params) {
 | 
						public String get(String controllerName, String[] params) {
 | 
				
			||||||
		String ende = "";
 | 
							String ende = "";
 | 
				
			||||||
@@ -206,6 +216,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 * @param controllerName Name des aufzurufenden Controllers.
 | 
						 * @param controllerName Name des aufzurufenden Controllers.
 | 
				
			||||||
	 * @param id Id des zu änderenden Eintrags.
 | 
						 * @param id Id des zu änderenden Eintrags.
 | 
				
			||||||
	 * @param jsonData JsonString mit den neuen Daten.
 | 
						 * @param jsonData JsonString mit den neuen Daten.
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void put(String controllerName, int id, String jsonData) {
 | 
						public void put(String controllerName, int id, String jsonData) {
 | 
				
			||||||
@@ -242,6 +253,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param controllerName Name des aufzurufenden Controllers.
 | 
						 * @param controllerName Name des aufzurufenden Controllers.
 | 
				
			||||||
	 * @param jsonData JsonString mit den Daten des Eintrags.
 | 
						 * @param jsonData JsonString mit den Daten des Eintrags.
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void post(String controllerName, String jsonData) {
 | 
						public void post(String controllerName, String jsonData) {
 | 
				
			||||||
@@ -279,6 +291,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param controllerName Name des aufzurufenden Controllers
 | 
						 * @param controllerName Name des aufzurufenden Controllers
 | 
				
			||||||
	 * @param id Id des zu löschenden Eintrags.
 | 
						 * @param id Id des zu löschenden Eintrags.
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void delete(String controllerName, int id) {
 | 
						public void delete(String controllerName, int id) {
 | 
				
			||||||
@@ -311,6 +324,12 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/***
 | 
				
			||||||
 | 
						 * Holt die nöchste Autoinkrement Id für den mitgegebenen Controller aus der Datenbank
 | 
				
			||||||
 | 
						 * @param controllerName
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public int nextId(String controllerName){
 | 
						public int nextId(String controllerName){
 | 
				
			||||||
		URI apiUri = URI.create(String.format("%s/%s/nextId", urlBase, controllerName));
 | 
							URI apiUri = URI.create(String.format("%s/%s/nextId", urlBase, controllerName));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -353,6 +372,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param credentials Die Anmeldedaten in Json-String form
 | 
						 * @param credentials Die Anmeldedaten in Json-String form
 | 
				
			||||||
	 * @return True oder false, je nach Erfolg des Anmeldeversuchs
 | 
						 * @return True oder false, je nach Erfolg des Anmeldeversuchs
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public boolean anmeldeVersuch(String credentials){
 | 
						public boolean anmeldeVersuch(String credentials){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -409,6 +429,7 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param datum Das angeforderte Datum in String Form (YYYY-MM-DD)
 | 
						 * @param datum Das angeforderte Datum in String Form (YYYY-MM-DD)
 | 
				
			||||||
	 * @return Ein Tagesplan Objekt mit allen Gerichten
 | 
						 * @return Ein Tagesplan Objekt mit allen Gerichten
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public Tagesplan getGerichteOnTag(String datum){
 | 
						public Tagesplan getGerichteOnTag(String datum){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -461,4 +482,71 @@ public class RestApiClient implements IRestAPI{
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Holt die Id des Gerichtes mit dem mitgegebenen Namen an einem mitgegebenen Tag und gibt sie zurück
 | 
				
			||||||
 | 
						 * @param name
 | 
				
			||||||
 | 
						 * @param datum
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						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;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Löscht ein Gericht mit der mitgebenen Id aus der Datenbank
 | 
				
			||||||
 | 
						 * @param id
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						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();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,10 @@ public class AccounterstellungMitarbeiter {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	private ArrayList<Kind> kinder;
 | 
						private ArrayList<Kind> kinder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Initialisiert die Accounterstellungsmaske
 | 
				
			||||||
 | 
						 * @author Sven Alteköster
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void initialize() {
 | 
						public void initialize() {
 | 
				
			||||||
		//Die Radiobuttons zum auswählen eines Accountypes werden einer ToggleGroup hinzugefügt
 | 
							//Die Radiobuttons zum auswählen eines Accountypes werden einer ToggleGroup hinzugefügt
 | 
				
			||||||
		accountTyp = new ToggleGroup();
 | 
							accountTyp = new ToggleGroup();
 | 
				
			||||||
@@ -43,6 +47,7 @@ public class AccounterstellungMitarbeiter {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		einmalpw.setText(einmalPwGenerieren());
 | 
							einmalpw.setText(einmalPwGenerieren());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//kinder wird initialisiert
 | 
				
			||||||
		kinder = new ArrayList<>();
 | 
							kinder = new ArrayList<>();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -62,7 +67,7 @@ public class AccounterstellungMitarbeiter {
 | 
				
			|||||||
	 * @author Sven Alteköster
 | 
						 * @author Sven Alteköster
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void onAbmelden(ActionEvent actionEvent) {
 | 
						public void onAbmelden(ActionEvent actionEvent) {
 | 
				
			||||||
		//VerwaltungApplication.abmelden();
 | 
							VerwaltungApplication.abmelden();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
@@ -190,7 +195,11 @@ public class AccounterstellungMitarbeiter {
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void onSpeichern(ActionEvent actionEvent) {
 | 
						public void onSpeichern(ActionEvent actionEvent) {
 | 
				
			||||||
		if (eingabenGueltig()) {
 | 
							if (eingabenGueltig()) {
 | 
				
			||||||
			//Zeigt generiert ein Einmalpasswort und zeigt es an
 | 
					
 | 
				
			||||||
 | 
								//speichert das aktuelle Passwort zwischen
 | 
				
			||||||
 | 
								String passwort = einmalpw.getText();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//generiert ein neues Einmalpasswort und zeigt es an
 | 
				
			||||||
			einmalpw.setText(einmalPwGenerieren());
 | 
								einmalpw.setText(einmalPwGenerieren());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Schnittstelle zur RestAPI
 | 
								//Schnittstelle zur RestAPI
 | 
				
			||||||
@@ -213,14 +222,14 @@ public class AccounterstellungMitarbeiter {
 | 
				
			|||||||
			Account neuer;
 | 
								Account neuer;
 | 
				
			||||||
			//Handelt es sich um einen Elternaccount, werden alle Eingegebenen Kinder erstellt.
 | 
								//Handelt es sich um einen Elternaccount, werden alle Eingegebenen Kinder erstellt.
 | 
				
			||||||
			if (typEltern.isSelected()) {
 | 
								if (typEltern.isSelected()) {
 | 
				
			||||||
				neuer = new ElternAccount(String.format("%d",einmalpw.getText().hashCode()), accountname.getText(), email.getText());
 | 
									neuer = new ElternAccount(passwort, accountname.getText(), email.getText());
 | 
				
			||||||
				//Kinder dem neuen Account hinzufügen
 | 
									//Kinder dem neuen Account hinzufügen
 | 
				
			||||||
				for (Kind k : kinder) {
 | 
									for (Kind k : kinder) {
 | 
				
			||||||
					((ElternAccount)neuer).getKinder().add(k);
 | 
										((ElternAccount)neuer).getKinder().add(k);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			else if (typMitarbeiter.isSelected()) {
 | 
								else if (typMitarbeiter.isSelected()) {
 | 
				
			||||||
				neuer = new MitarbeiterAccount(String.format("%d",einmalpw.getText().hashCode()), accountname.getText(), email.getText());
 | 
									neuer = new MitarbeiterAccount(passwort, accountname.getText(), email.getText());
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			//Ist kein Radio Button ausgewählt, wird hier abgebrochen
 | 
								//Ist kein Radio Button ausgewählt, wird hier abgebrochen
 | 
				
			||||||
			else {
 | 
								else {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -140,7 +140,7 @@ public class BestelluebersichtMitarbeiter {
 | 
				
			|||||||
	*/
 | 
						*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public void onAbmelden(ActionEvent event) {
 | 
						public void onAbmelden(ActionEvent event) {
 | 
				
			||||||
		//VerwaltungApplication.abmelden();
 | 
							VerwaltungApplication.abmelden();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public void onZurueck(ActionEvent actionEvent) {
 | 
						public void onZurueck(ActionEvent actionEvent) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@ package de.subway_surfers.vpr_app;
 | 
				
			|||||||
import Logik.Mahlzeit;
 | 
					import Logik.Mahlzeit;
 | 
				
			||||||
import Logik.Tagesplan;
 | 
					import Logik.Tagesplan;
 | 
				
			||||||
import RestAPISchnittstelle.RestApiClient;
 | 
					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.ChangeListener;
 | 
				
			||||||
import javafx.beans.value.ObservableValue;
 | 
					import javafx.beans.value.ObservableValue;
 | 
				
			||||||
import javafx.collections.FXCollections;
 | 
					import javafx.collections.FXCollections;
 | 
				
			||||||
@@ -23,6 +26,7 @@ import javafx.stage.Stage;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.net.http.WebSocket;
 | 
					import java.net.http.WebSocket;
 | 
				
			||||||
import java.text.DateFormat;
 | 
					import java.text.DateFormat;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
import java.time.LocalTime;
 | 
					import java.time.LocalTime;
 | 
				
			||||||
import java.time.format.DateTimeFormatter;
 | 
					import java.time.format.DateTimeFormatter;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
@@ -41,52 +45,47 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	private String date;
 | 
						private String date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private String day;
 | 
						/**
 | 
				
			||||||
 | 
						 * Initialize des Controllers.
 | 
				
			||||||
	private String month;
 | 
						 * Setzt das Datum, holt die Gerichte ein und initialisiert die responsive grid.
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	private String year;
 | 
						 */
 | 
				
			||||||
 | 
					 | 
				
			||||||
	private ChangeListener listener;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void initialize(){
 | 
						public void initialize(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
							date = LocalDate.now().toString();
 | 
				
			||||||
		(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();
 | 
							dateLabel.setText(date);
 | 
				
			||||||
		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));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		initGrid();
 | 
							initGrid();
 | 
				
			||||||
		initGerichte();
 | 
							initGerichte();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Methode beim klicken auf den Anmeldebutton. Meldet den User ab
 | 
				
			||||||
 | 
						 * @param actionEvent
 | 
				
			||||||
 | 
						 * @author Max Heer
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void onAbmelden(ActionEvent actionEvent) {
 | 
						public void onAbmelden(ActionEvent actionEvent) {
 | 
				
			||||||
		VerwaltungApplication.sceneWechseln("login-view.fxml");
 | 
							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) {
 | 
						public void onFilter(ActionEvent actionEvent) {
 | 
				
			||||||
		Stage stage = new Stage();
 | 
							Stage stage = new Stage();
 | 
				
			||||||
		VerwaltungApplication.sceneWechseln(stage, 450, 400, "inhaltsstoffe_filtern-view.fxml");
 | 
							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) {
 | 
						public void onHinzufuegen(ActionEvent actionEvent) {
 | 
				
			||||||
		Stage gerichterstellung = new Stage();
 | 
							Stage gerichterstellung = new Stage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -99,6 +98,11 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
		gerichterstellung.minHeightProperty().set(600);
 | 
							gerichterstellung.minHeightProperty().set(600);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Methode beim klicken auf den Zurück Button. Kehrt zum Startbildschirm zurück.
 | 
				
			||||||
 | 
						 * @param actionEvent
 | 
				
			||||||
 | 
						 * @author Max Heer
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void onZurueck(ActionEvent actionEvent) {
 | 
						public void onZurueck(ActionEvent actionEvent) {
 | 
				
			||||||
		VerwaltungApplication.sceneWechseln("hauptmenue_mitarbeiter-view.fxml");
 | 
							VerwaltungApplication.sceneWechseln("hauptmenue_mitarbeiter-view.fxml");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -106,15 +110,16 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Methode bei Klick auf Pfeil links, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
						 * Methode bei Klick auf Pfeil links, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
				
			||||||
	 * @param actionEvent
 | 
						 * @param actionEvent
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void pfeilLinks(ActionEvent actionEvent) {
 | 
						public void pfeilLinks(ActionEvent actionEvent) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		tagesplan.getChildren().clear();
 | 
							tagesplan.getChildren().clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		day = String.valueOf(Integer.parseInt(day)-1);
 | 
							LocalDate datum = LocalDate.parse(date);
 | 
				
			||||||
		date = String.format("%s-%s-%s", year, month, day);
 | 
							datum = datum.minusDays(1);
 | 
				
			||||||
 | 
							date = datum.toString();
 | 
				
			||||||
		dateLabel.setText(String.format("%s.%s.%s", day, month, year));
 | 
							dateLabel.setText(date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		initGerichte();
 | 
							initGerichte();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -123,15 +128,16 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Methode bei Klick auf Pfeil rechts, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
						 * Methode bei Klick auf Pfeil rechts, ändert das Datum und gibt neue Gerichte auf die GUI aus.
 | 
				
			||||||
	 * @param actionEvent
 | 
						 * @param actionEvent
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public void pfeilRechts(ActionEvent actionEvent) {
 | 
						public void pfeilRechts(ActionEvent actionEvent) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		tagesplan.getChildren().clear();
 | 
							tagesplan.getChildren().clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		day = String.valueOf(Integer.parseInt(day)+1);
 | 
							LocalDate datum = LocalDate.parse(date);
 | 
				
			||||||
		date = String.format("%s-%s-%s", year, month, day);
 | 
							datum = datum.plusDays(1);
 | 
				
			||||||
 | 
							date = datum.toString();
 | 
				
			||||||
		dateLabel.setText(String.format("%s.%s.%s", day, month, year));
 | 
							dateLabel.setText(date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		initGerichte();
 | 
							initGerichte();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -139,10 +145,12 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Initialisiert alle Gerichte des aktuellen Datums auf der Seite.
 | 
						 * Initialisiert alle Gerichte des aktuellen Datums auf der Seite.
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	private void initGerichte(){
 | 
						private void initGerichte(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		tagesplan.getStyleClass().clear();
 | 
							tagesplan.getStyleClass().clear();
 | 
				
			||||||
 | 
							tagesplan.getChildren().clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		t = new RestApiClient().getGerichteOnTag(date);
 | 
							t = new RestApiClient().getGerichteOnTag(date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -183,6 +191,10 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
		tagesplan.getStyleClass().add("essensuebersicht_gridlines");
 | 
							tagesplan.getStyleClass().add("essensuebersicht_gridlines");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Initialisiert das responsive grid.
 | 
				
			||||||
 | 
						 * @author Max Heer, Sven Alteköster
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void initGrid(){
 | 
						public void initGrid(){
 | 
				
			||||||
		for (int i = 0; i < tagesplan.getColumnCount(); i++) {
 | 
							for (int i = 0; i < tagesplan.getColumnCount(); i++) {
 | 
				
			||||||
			ColumnConstraints cc = new ColumnConstraints();
 | 
								ColumnConstraints cc = new ColumnConstraints();
 | 
				
			||||||
@@ -203,10 +215,25 @@ public class EssensverwaltungMitarbeiterView {
 | 
				
			|||||||
		VerwaltungApplication.responsiveBreiteGrid(tagesplan);
 | 
							VerwaltungApplication.responsiveBreiteGrid(tagesplan);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Methode beim klicken auf den Löschen Button eines Tagesplan Elementes
 | 
				
			||||||
 | 
						 * @param a
 | 
				
			||||||
 | 
						 * @author Samuel Wolff
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	private void loeschenButtonKlick(ActionEvent a){
 | 
						private void loeschenButtonKlick(ActionEvent a){
 | 
				
			||||||
		Button btn = (Button) a.getSource();
 | 
							Button btn = (Button) a.getSource();
 | 
				
			||||||
		int col = GridPane.getColumnIndex(btn);
 | 
							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);
 | 
							t.getGerichte().remove(col);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("Die Id lautet: " + id + col);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cl.delete("GibtsAm", id);
 | 
				
			||||||
		initGerichte();
 | 
							initGerichte();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,6 +40,11 @@ public class GerichterstellungMitarbeiterView {
 | 
				
			|||||||
		});
 | 
							});
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Fügt den Eingebenen Inhaltsstoff aus dem zugehörigen Textfeld als Button hinzu
 | 
				
			||||||
 | 
						 * @param actionEvent
 | 
				
			||||||
 | 
						 * @author Sven Alteköster
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void onButtonInhaltsstoffeClick(ActionEvent actionEvent) {
 | 
						public void onButtonInhaltsstoffeClick(ActionEvent actionEvent) {
 | 
				
			||||||
		String text = eingabeInhaltsstoffe.getText();
 | 
							String text = eingabeInhaltsstoffe.getText();
 | 
				
			||||||
		if (!text.equals("")) {
 | 
							if (!text.equals("")) {
 | 
				
			||||||
@@ -51,6 +56,7 @@ public class GerichterstellungMitarbeiterView {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			Zutat neue = new Zutat(text);
 | 
								Zutat neue = new Zutat(text);
 | 
				
			||||||
			zutaten.add(neue);
 | 
								zutaten.add(neue);
 | 
				
			||||||
 | 
								//Wird der Inhaltsstoff angeklickt, wird er entfernt
 | 
				
			||||||
			neuerInhalt.setOnAction(e -> {
 | 
								neuerInhalt.setOnAction(e -> {
 | 
				
			||||||
				((HBox) neuerInhalt.getParent()).getChildren().remove(neuerInhalt);
 | 
									((HBox) neuerInhalt.getParent()).getChildren().remove(neuerInhalt);
 | 
				
			||||||
				zutaten.remove(neue);
 | 
									zutaten.remove(neue);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@ import javafx.scene.layout.GridPane;
 | 
				
			|||||||
import javafx.scene.text.TextAlignment;
 | 
					import javafx.scene.text.TextAlignment;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.text.DateFormat;
 | 
					import java.text.DateFormat;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class HauptmenueMitarbeiterView {
 | 
					public class HauptmenueMitarbeiterView {
 | 
				
			||||||
@@ -34,14 +35,8 @@ public class HauptmenueMitarbeiterView {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public void wochenuebersichtFuellen(){
 | 
					    public void wochenuebersichtFuellen(){
 | 
				
			||||||
        String dateanzeige;
 | 
					        String dateanzeige;
 | 
				
			||||||
        DateFormat dateFormat = DateFormat.getDateInstance();
 | 
					        date = LocalDate.now().toString();
 | 
				
			||||||
        date = dateFormat.format(new Date());
 | 
					        dateanzeige = 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);
 | 
					 | 
				
			||||||
        Tagesplan t = new RestApiClient().getGerichteOnTag(date);
 | 
					        Tagesplan t = new RestApiClient().getGerichteOnTag(date);
 | 
				
			||||||
        for(int i=0;i<5;i++){
 | 
					        for(int i=0;i<5;i++){
 | 
				
			||||||
            Label tag = new Label();
 | 
					            Label tag = new Label();
 | 
				
			||||||
@@ -55,13 +50,19 @@ public class HauptmenueMitarbeiterView {
 | 
				
			|||||||
                name.setPrefHeight(75);
 | 
					                name.setPrefHeight(75);
 | 
				
			||||||
                name.setTextAlignment(TextAlignment.CENTER);
 | 
					                name.setTextAlignment(TextAlignment.CENTER);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            day = String.valueOf(Integer.parseInt(day)+1);
 | 
					            LocalDate datum = LocalDate.parse(date);
 | 
				
			||||||
            date = String.format("%s-%s-%s", year, month, day);
 | 
					            datum = datum.plusDays(1);
 | 
				
			||||||
            dateanzeige = String.format("%s.%s.%s",day,month,year);
 | 
					            date = datum.toString();
 | 
				
			||||||
 | 
					            dateanzeige = date;
 | 
				
			||||||
            t = new RestApiClient().getGerichteOnTag(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) {
 | 
					    public void onAbmelden(ActionEvent actionEvent) {
 | 
				
			||||||
        VerwaltungApplication.abmelden();
 | 
					        VerwaltungApplication.abmelden();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,25 +31,27 @@ public class InhaltsstoffeFilternController {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	private ArrayList<Zutat> zutaten;
 | 
						private ArrayList<Zutat> zutaten;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Initialisert sie InhaltsstoffeFiltern View
 | 
				
			||||||
 | 
						 * @author Sven Alteköster
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
	public void initialize(){
 | 
						public void initialize(){
 | 
				
			||||||
 | 
							//mehrere Inhaltsstoffe können ausgewählt werden
 | 
				
			||||||
		zutatListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
 | 
							zutatListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//Befüllen der ListView mit allen existierenden Inhaltsstoffen
 | 
				
			||||||
		RestApiClient api = new RestApiClient();
 | 
							RestApiClient api = new RestApiClient();
 | 
				
			||||||
		String json = api.get("Inhaltsstoff");
 | 
							String json = api.get("Inhaltsstoff");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		zutaten = new ArrayList<>();
 | 
							zutaten = new ArrayList<>();
 | 
				
			||||||
 | 
					 | 
				
			||||||
		Gson gson = new Gson();
 | 
							Gson gson = new Gson();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		JsonElement je = JsonParser.parseString(json);
 | 
							JsonElement je = JsonParser.parseString(json);
 | 
				
			||||||
		JsonArray ja = je.getAsJsonArray();
 | 
							JsonArray ja = je.getAsJsonArray();
 | 
				
			||||||
 | 
					 | 
				
			||||||
		for (JsonElement e : ja) {
 | 
							for (JsonElement e : ja) {
 | 
				
			||||||
			JsonObject jo = e.getAsJsonObject();
 | 
								JsonObject jo = e.getAsJsonObject();
 | 
				
			||||||
			zutaten.add(gson.fromJson(jo, Zutat.class));
 | 
								zutaten.add(gson.fromJson(jo, Zutat.class));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					 | 
				
			||||||
		zutatListView.setItems(FXCollections.observableArrayList(zutaten));
 | 
							zutatListView.setItems(FXCollections.observableArrayList(zutaten));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ public class VerwaltungApplication extends Application {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void start(Stage stage) throws IOException {
 | 
						public void start(Stage stage) throws IOException {
 | 
				
			||||||
		FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("gerichterstellung_mitarbeiter-view.fxml"));
 | 
							FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("login-view.fxml"));
 | 
				
			||||||
		Scene scene = new Scene(fxmlLoader.load());
 | 
							Scene scene = new Scene(fxmlLoader.load());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		stage.setWidth(960);
 | 
							stage.setWidth(960);
 | 
				
			||||||
@@ -48,7 +48,6 @@ public class VerwaltungApplication extends Application {
 | 
				
			|||||||
	 * Die Scene auf der aktuellen Stage wird durch die in der fxml-Datei definierte Scene ausgetauscht.
 | 
						 * Die Scene auf der aktuellen Stage wird durch die in der fxml-Datei definierte Scene ausgetauscht.
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * Geschrieben: Sven Alteköster
 | 
						 * Geschrieben: Sven Alteköster
 | 
				
			||||||
	 * Getestet:
 | 
					 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param fxml name der zu ladenden fxml Datei.
 | 
						 * @param fxml name der zu ladenden fxml Datei.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
@@ -84,9 +83,7 @@ public class VerwaltungApplication extends Application {
 | 
				
			|||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * in einem neuen Fenster wird die in der fxml-Datei definierte Scene gesetzt.
 | 
						 * in einem neuen Fenster wird die in der fxml-Datei definierte Scene gesetzt.
 | 
				
			||||||
	 * Die geladene Scene wird <b><u>nicht</u></b> zu der neuen Hauptstage.
 | 
						 * Die geladene Scene wird <b><u>nicht</u></b> zu der neuen Hauptstage.
 | 
				
			||||||
	 *
 | 
					 | 
				
			||||||
	 * Geschrieben: Sven Alteköster
 | 
						 * Geschrieben: Sven Alteköster
 | 
				
			||||||
	 * Getestet:
 | 
					 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param neue Stage auf der die Scene gesetzt werden soll
 | 
						 * @param neue Stage auf der die Scene gesetzt werden soll
 | 
				
			||||||
	 * @param width breite des neuen Fensters
 | 
						 * @param width breite des neuen Fensters
 | 
				
			||||||
@@ -121,7 +118,6 @@ public class VerwaltungApplication extends Application {
 | 
				
			|||||||
	 * Methode zum automatischen vergrößern und verkleinern von Grids
 | 
						 * Methode zum automatischen vergrößern und verkleinern von Grids
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * Geschrieben: Max Heer, Sven Alteköster
 | 
						 * Geschrieben: Max Heer, Sven Alteköster
 | 
				
			||||||
	 * Getestet
 | 
					 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param grid das responsiv sein soll
 | 
						 * @param grid das responsiv sein soll
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,8 @@
 | 
				
			|||||||
<?import javafx.scene.control.*?>
 | 
					<?import javafx.scene.control.*?>
 | 
				
			||||||
<?import javafx.scene.layout.*?>
 | 
					<?import javafx.scene.layout.*?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- Erstellt von Sven Alteköster -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<BorderPane xmlns="http://javafx.com/javafx"
 | 
					<BorderPane xmlns="http://javafx.com/javafx"
 | 
				
			||||||
            xmlns:fx="http://javafx.com/fxml"
 | 
					            xmlns:fx="http://javafx.com/fxml"
 | 
				
			||||||
            fx:controller="de.subway_surfers.vpr_app.AccounterstellungMitarbeiter"
 | 
					            fx:controller="de.subway_surfers.vpr_app.AccounterstellungMitarbeiter"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,9 +52,6 @@
 | 
				
			|||||||
    </center>
 | 
					    </center>
 | 
				
			||||||
    <bottom>
 | 
					    <bottom>
 | 
				
			||||||
        <BorderPane styleClass="button-untenrechts">
 | 
					        <BorderPane styleClass="button-untenrechts">
 | 
				
			||||||
            <right>
 | 
					 | 
				
			||||||
                <Button text="Bestätigen" defaultButton="true" styleClass=".button"/>
 | 
					 | 
				
			||||||
            </right>
 | 
					 | 
				
			||||||
        </BorderPane>
 | 
					        </BorderPane>
 | 
				
			||||||
    </bottom>
 | 
					    </bottom>
 | 
				
			||||||
</BorderPane>
 | 
					</BorderPane>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,8 @@
 | 
				
			|||||||
<?import javafx.scene.control.*?>
 | 
					<?import javafx.scene.control.*?>
 | 
				
			||||||
<?import javafx.scene.layout.*?>
 | 
					<?import javafx.scene.layout.*?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- Erstellt von Sven Alteköster -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<?import javafx.geometry.Insets?>
 | 
					<?import javafx.geometry.Insets?>
 | 
				
			||||||
<BorderPane xmlns="http://javafx.com/javafx"
 | 
					<BorderPane xmlns="http://javafx.com/javafx"
 | 
				
			||||||
            xmlns:fx="http://javafx.com/fxml"
 | 
					            xmlns:fx="http://javafx.com/fxml"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,8 @@
 | 
				
			|||||||
<?import javafx.scene.control.*?>
 | 
					<?import javafx.scene.control.*?>
 | 
				
			||||||
<?import javafx.scene.layout.*?>
 | 
					<?import javafx.scene.layout.*?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- Erstellt von Sven Alteköster -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<BorderPane xmlns="http://javafx.com/javafx"
 | 
					<BorderPane xmlns="http://javafx.com/javafx"
 | 
				
			||||||
            xmlns:fx="http://javafx.com/fxml"
 | 
					            xmlns:fx="http://javafx.com/fxml"
 | 
				
			||||||
            fx:controller="de.subway_surfers.vpr_app.HauptmenueElternController"
 | 
					            fx:controller="de.subway_surfers.vpr_app.HauptmenueElternController"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,8 +25,6 @@
 | 
				
			|||||||
                <VBox styleClass="hauptmenue_buttons_links">
 | 
					                <VBox styleClass="hauptmenue_buttons_links">
 | 
				
			||||||
                    <Button text="Speiseplan" onAction="#onSpeiseplanClick"/>
 | 
					                    <Button text="Speiseplan" onAction="#onSpeiseplanClick"/>
 | 
				
			||||||
                    <Button text="Alle Bestellungen anzeigen" onAction="#onBestellungenAnzeigen"/>
 | 
					                    <Button text="Alle Bestellungen anzeigen" onAction="#onBestellungenAnzeigen"/>
 | 
				
			||||||
                    <Button text="Rechnungen herunterladen"/>
 | 
					 | 
				
			||||||
                    <Button text="Daten importieren/Exportieren"/>
 | 
					 | 
				
			||||||
                    <Button text="Account anlegen" onAction="#onAccountAnlegenClick"/>
 | 
					                    <Button text="Account anlegen" onAction="#onAccountAnlegenClick"/>
 | 
				
			||||||
                </VBox>
 | 
					                </VBox>
 | 
				
			||||||
            </left>
 | 
					            </left>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,8 @@
 | 
				
			|||||||
<?import javafx.scene.control.*?>
 | 
					<?import javafx.scene.control.*?>
 | 
				
			||||||
<?import javafx.scene.layout.*?>
 | 
					<?import javafx.scene.layout.*?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- Erstellt von Sven Alteköster -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<BorderPane xmlns="http://javafx.com/javafx"
 | 
					<BorderPane xmlns="http://javafx.com/javafx"
 | 
				
			||||||
            xmlns:fx="http://javafx.com/fxml"
 | 
					            xmlns:fx="http://javafx.com/fxml"
 | 
				
			||||||
            fx:controller="de.subway_surfers.vpr_app.VerwaltungController"
 | 
					            fx:controller="de.subway_surfers.vpr_app.VerwaltungController"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user