Compare commits
8 Commits
956c723057
...
Max
Author | SHA1 | Date | |
---|---|---|---|
8b7a611e2a | |||
336a6fc89d | |||
0303458524 | |||
f97211ae84 | |||
f0bd39d3a6 | |||
c127cfb8a3 | |||
293c5f7fee | |||
ee2685cd45 |
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.
@@ -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,6 +482,13 @@ 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){
|
public int getGerichtIdOnTag(String name, String datum){
|
||||||
|
|
||||||
URI apiUri = URI.create(String.format("%s/Tagesplan/getGerichtIdOnTag?name=%s&datum=%s", urlBase, name, datum));
|
URI apiUri = URI.create(String.format("%s/Tagesplan/getGerichtIdOnTag?name=%s&datum=%s", urlBase, name, datum));
|
||||||
@@ -493,6 +521,11 @@ public class RestApiClient implements IRestAPI{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Löscht ein Gericht mit der mitgebenen Id aus der Datenbank
|
||||||
|
* @param id
|
||||||
|
* @author Samuel Wolff
|
||||||
|
*/
|
||||||
public void deleteGericht(int id){
|
public void deleteGericht(int id){
|
||||||
URI apiUri = URI.create(String.format("%s/Tagesplan/%d", urlBase, id));
|
URI apiUri = URI.create(String.format("%s/Tagesplan/%d", urlBase, id));
|
||||||
System.out.println(apiUri);
|
System.out.println(apiUri);
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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) {
|
||||||
|
@@ -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);
|
||||||
|
@@ -19,10 +19,17 @@ public class HauptmenueElternController {
|
|||||||
private String month;
|
private String month;
|
||||||
private String year;
|
private String year;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ruft die Methode zum Befüllen der Ansicht auf der Hauptseite auf
|
||||||
|
* @author Max Heer
|
||||||
|
*/
|
||||||
public void initialize(){
|
public void initialize(){
|
||||||
wochenuebersichtFuellen();
|
wochenuebersichtFuellen();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Methode zum initialisieren und befüllen der Tabelle im Hauptmenü
|
||||||
|
* @author Max Heer
|
||||||
|
*/
|
||||||
public void wochenuebersichtFuellen(){
|
public void wochenuebersichtFuellen(){
|
||||||
String dateanzeige;
|
String dateanzeige;
|
||||||
DateFormat dateFormat = DateFormat.getDateInstance();
|
DateFormat dateFormat = DateFormat.getDateInstance();
|
||||||
|
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Sven Alteköster-->
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import java.util.*?>
|
<?import java.util.*?>
|
||||||
<?import javafx.scene.*?>
|
<?import javafx.scene.*?>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--Erstellt von Sven Alteköster-->
|
<!--Erstellt von Sven Alteköster und Max Heer-->
|
||||||
|
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import java.util.*?>
|
<?import java.util.*?>
|
||||||
|
@@ -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>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!-- @author Samuel Wolff -->
|
<!--Samuel Wolff-->
|
||||||
|
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!-- @author Samuel Wolff -->
|
<!--Samuel Wolff-->
|
||||||
|
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import java.util.*?>
|
<?import java.util.*?>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!-- @author Samuel Wolff -->
|
<!--Samuel Wolff-->
|
||||||
|
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import java.util.*?>
|
<?import java.util.*?>
|
||||||
|
Reference in New Issue
Block a user