Compare commits
19 Commits
f43dad000f
...
0303458524
Author | SHA1 | Date | |
---|---|---|---|
0303458524 | |||
f97211ae84 | |||
f0bd39d3a6 | |||
c127cfb8a3 | |||
293c5f7fee | |||
956c723057 | |||
ee2685cd45 | |||
8f8597c0c9 | |||
a620c620f0 | |||
43f0aeb352 | |||
29c31841fa | |||
349a8f02cc | |||
58ab3e313c | |||
4bebd27617 | |||
bc4926aca8 | |||
7acd24e285 | |||
3edbca73f9 | |||
0300b96bf4 | |||
53383f3a23 |
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;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
public class Mahlzeit {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private float preis;
|
||||
private ArrayList<Zutat> zutaten;
|
||||
@ -17,7 +17,6 @@ public class Mahlzeit {
|
||||
zutaten = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@ -39,4 +38,6 @@ public class Mahlzeit {
|
||||
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;
|
||||
|
||||
/**
|
||||
* noch nicht getestet
|
||||
* TODO FERTIG MACHEN
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param controllerName Name des aufzurufenden Controllers
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
public String get(String controllerName) {
|
||||
@ -90,6 +89,7 @@ public class RestApiClient implements IRestAPI{
|
||||
*
|
||||
* @param controllerName Name des aufzurufenden Controllers
|
||||
* @param id Id der Aufzurufenden Zeile
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
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.
|
||||
*
|
||||
* @param controllerName Name des aufzurufenden Controllers
|
||||
* @param id Id der Aufzurufenden Zeile
|
||||
* @param bezahlt TODO Warum ist das hier?
|
||||
* @deprecated
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
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
|
||||
public String get(String controllerName, String[] params) {
|
||||
String ende = "";
|
||||
@ -206,6 +216,7 @@ public class RestApiClient implements IRestAPI{
|
||||
* @param controllerName Name des aufzurufenden Controllers.
|
||||
* @param id Id des zu änderenden Eintrags.
|
||||
* @param jsonData JsonString mit den neuen Daten.
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
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 jsonData JsonString mit den Daten des Eintrags.
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
public void post(String controllerName, String jsonData) {
|
||||
@ -279,6 +291,7 @@ public class RestApiClient implements IRestAPI{
|
||||
*
|
||||
* @param controllerName Name des aufzurufenden Controllers
|
||||
* @param id Id des zu löschenden Eintrags.
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
@Override
|
||||
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){
|
||||
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
|
||||
* @return True oder false, je nach Erfolg des Anmeldeversuchs
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
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)
|
||||
* @return Ein Tagesplan Objekt mit allen Gerichten
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -190,7 +190,11 @@ public class AccounterstellungMitarbeiter {
|
||||
*/
|
||||
public void onSpeichern(ActionEvent actionEvent) {
|
||||
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());
|
||||
|
||||
//Schnittstelle zur RestAPI
|
||||
@ -213,14 +217,14 @@ public class AccounterstellungMitarbeiter {
|
||||
Account neuer;
|
||||
//Handelt es sich um einen Elternaccount, werden alle Eingegebenen Kinder erstellt.
|
||||
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
|
||||
for (Kind k : kinder) {
|
||||
((ElternAccount)neuer).getKinder().add(k);
|
||||
}
|
||||
}
|
||||
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
|
||||
else {
|
||||
|
@ -140,7 +140,7 @@ public class BestelluebersichtMitarbeiter {
|
||||
*/
|
||||
|
||||
public void onAbmelden(ActionEvent event) {
|
||||
VerwaltungApplication.abmelden();
|
||||
//VerwaltungApplication.abmelden();
|
||||
}
|
||||
|
||||
public void onZurueck(ActionEvent actionEvent) {
|
||||
|
@ -0,0 +1,38 @@
|
||||
package de.subway_surfers.vpr_app;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public class ErsteLoginViewController {
|
||||
@FXML
|
||||
private Label text;
|
||||
@FXML
|
||||
private TextField passwort;
|
||||
@FXML
|
||||
private TextField bpasswort;
|
||||
@FXML
|
||||
private Label fehlertext;
|
||||
private String benutzername;
|
||||
public void initialize(){
|
||||
benutzername = "Test";
|
||||
text.setText("Willkommen, "+benutzername+"\n\nUm Sie und Ihre Kinder zu schützen, bitten wir Sie darum Ihr Einmalpasswort zu ändern.");
|
||||
}
|
||||
|
||||
public void onAbmelden(ActionEvent actionEvent) {
|
||||
VerwaltungApplication.abmelden();
|
||||
}
|
||||
|
||||
public void onbestaetigen(ActionEvent actionEvent) {
|
||||
if(passwort.getText().equals(bpasswort.getText())){
|
||||
|
||||
}
|
||||
else{
|
||||
fehlertext.setText("Die Eingaben müssen identisch sein");
|
||||
fehlertext.setTextFill(Color.color(1, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package de.subway_surfers.vpr_app;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
|
||||
public class EssensverwaltungElternController {
|
||||
|
||||
public void onFilter(ActionEvent actionEvent) {}
|
||||
|
||||
public void pfeilLinks(ActionEvent actionEvent) {}
|
||||
|
||||
public void pfeilRechts(ActionEvent actionEvent) {}
|
||||
|
||||
public void onAbmelden(ActionEvent actionEvent) {}
|
||||
|
||||
public void onZurueck(ActionEvent actionEvent) {}
|
||||
|
||||
}
|
@ -3,6 +3,9 @@ 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;
|
||||
@ -23,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;
|
||||
@ -41,52 +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());
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
date = LocalDate.now().toString();
|
||||
|
||||
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));
|
||||
dateLabel.setText(date);
|
||||
|
||||
initGrid();
|
||||
initGerichte();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode beim klicken auf den Anmeldebutton. Meldet den User ab
|
||||
* @param actionEvent
|
||||
* @author Max Heer
|
||||
*/
|
||||
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();
|
||||
|
||||
@ -99,6 +98,11 @@ public class EssensverwaltungMitarbeiterView {
|
||||
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) {
|
||||
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.
|
||||
* @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();
|
||||
|
||||
@ -123,15 +128,16 @@ public class EssensverwaltungMitarbeiterView {
|
||||
/**
|
||||
* 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();
|
||||
|
||||
@ -139,10 +145,12 @@ public class EssensverwaltungMitarbeiterView {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
@ -183,6 +191,10 @@ public class EssensverwaltungMitarbeiterView {
|
||||
tagesplan.getStyleClass().add("essensuebersicht_gridlines");
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisiert das responsive grid.
|
||||
* @author Max Heer, Sven Alteköster
|
||||
*/
|
||||
public void initGrid(){
|
||||
for (int i = 0; i < tagesplan.getColumnCount(); i++) {
|
||||
ColumnConstraints cc = new ColumnConstraints();
|
||||
@ -203,10 +215,25 @@ public class EssensverwaltungMitarbeiterView {
|
||||
VerwaltungApplication.responsiveBreiteGrid(tagesplan);
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode beim klicken auf den Löschen Button eines Tagesplan Elementes
|
||||
* @param a
|
||||
* @author Samuel Wolff
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,68 @@
|
||||
package de.subway_surfers.vpr_app;
|
||||
|
||||
import Logik.Tagesplan;
|
||||
import RestAPISchnittstelle.RestApiClient;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.text.TextAlignment;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class HauptmenueElternController {
|
||||
@FXML
|
||||
private GridPane wochenplan;
|
||||
private String date;
|
||||
private String day;
|
||||
private String month;
|
||||
private String year;
|
||||
|
||||
/**
|
||||
* Ruft die Methode zum Befüllen der Ansicht auf der Hauptseite auf
|
||||
* @author Max Heer
|
||||
*/
|
||||
public void initialize(){
|
||||
wochenuebersichtFuellen();
|
||||
}
|
||||
/**
|
||||
* Methode zum initialisieren und befüllen der Tabelle im Hauptmenü
|
||||
* @author Max Heer
|
||||
*/
|
||||
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);
|
||||
Tagesplan t = new RestApiClient().getGerichteOnTag(date);
|
||||
for(int i=0;i<5;i++){
|
||||
Label tag = new Label();
|
||||
wochenplan.add(tag, i, 0);
|
||||
tag.setText(dateanzeige);
|
||||
for(int j=0; j<t.getGerichte().size();j++){
|
||||
Label name = new Label();
|
||||
name.setWrapText(true);
|
||||
wochenplan.add(name, i, j+1);
|
||||
name.setText(t.getGerichte().get(j).getName());
|
||||
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);
|
||||
t = new RestApiClient().getGerichteOnTag(date);
|
||||
}
|
||||
}
|
||||
public void onAbmelden(ActionEvent actionEvent) {}
|
||||
|
||||
public void onBestellungPlanen(ActionEvent actionEvent) {}
|
||||
|
||||
public void onBestellhistorieAnzeigen(ActionEvent actionEvent) {}
|
||||
|
||||
}
|
@ -9,6 +9,7 @@ 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 {
|
||||
@ -21,7 +22,7 @@ public class HauptmenueMitarbeiterView {
|
||||
private String year;
|
||||
|
||||
/**
|
||||
* Ruft die Methode zum Befüllen der Ansicht auf
|
||||
* Ruft die Methode zum Befüllen der Ansicht auf der Hauptseite auf
|
||||
* @author Max Heer
|
||||
*/
|
||||
public void initialize(){
|
||||
@ -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,13 +50,19 @@ 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();
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class VerwaltungApplication extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("login-view.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("gerichterstellung_mitarbeiter-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load());
|
||||
|
||||
stage.setWidth(960);
|
||||
@ -121,7 +121,6 @@ public class VerwaltungApplication extends Application {
|
||||
* Methode zum automatischen vergrößern und verkleinern von Grids
|
||||
*
|
||||
* Geschrieben: Max Heer, Sven Alteköster
|
||||
* Getestet
|
||||
*
|
||||
* @param grid das responsiv sein soll
|
||||
*/
|
||||
|
@ -6,6 +6,8 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- Erstellt von Sven Alteköster -->
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="de.subway_surfers.vpr_app.AccounterstellungMitarbeiter"
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--Erstellt von Max Heer-->
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<BorderPane prefHeight="400.0" prefWidth="600.0" stylesheets="@layout.css" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.subway_surfers.vpr_app.ErsteLoginViewController">
|
||||
<top>
|
||||
<BorderPane styleClass="kopfzeile">
|
||||
<right>
|
||||
<Button onAction="#onAbmelden" text="Abmelden" />
|
||||
</right>
|
||||
</BorderPane>
|
||||
</top>
|
||||
<bottom>
|
||||
<BorderPane styleClass="button-untenrechts">
|
||||
<right>
|
||||
<Button defaultButton="true" onAction="#onbestaetigen" styleClass=".button" text="Bestätigen" />
|
||||
</right>
|
||||
</BorderPane>
|
||||
</bottom>
|
||||
<left>
|
||||
<AnchorPane BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<Label fx:id="text" layoutX="27.0" layoutY="34.0" text="Label" />
|
||||
<Label layoutX="27.0" layoutY="127.0" text="Passwort:" />
|
||||
<Label layoutX="27.0" layoutY="178.0" text="Passwort bestätigen:" />
|
||||
<TextField fx:id="passwort" layoutX="175.0" layoutY="122.0" />
|
||||
<TextField fx:id="bpasswort" layoutX="175.0" layoutY="173.0" />
|
||||
<Label layoutX="27.0" layoutY="216.0" fx:id="fehlertext"/>
|
||||
</children></AnchorPane>
|
||||
</left>
|
||||
</BorderPane>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Erstellt von Max Heer-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
<?import javafx.scene.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="de.subway_surfers.vpr_app.EssensverwaltungElternController"
|
||||
prefHeight="400.0" prefWidth="600.0"
|
||||
stylesheets="@layout.css">
|
||||
<top>
|
||||
<BorderPane styleClass="kopfzeile">
|
||||
<right>
|
||||
<Button text="Abmelden" onAction="#onAbmelden"/>
|
||||
</right>
|
||||
<left>
|
||||
<Button text="Zurück" onAction="#onZurueck"/>
|
||||
</left>
|
||||
</BorderPane>
|
||||
</top>
|
||||
<center>
|
||||
<BorderPane>
|
||||
<top>
|
||||
<BorderPane>
|
||||
<left>
|
||||
<HBox styleClass="test" spacing="10">
|
||||
<Button text="Filter" onAction="#onFilter"/>
|
||||
<Label text="Bestellung Planen für: "/>
|
||||
<ComboBox fx:id="kindAuswahl"/>
|
||||
</HBox>
|
||||
</left>
|
||||
<right>
|
||||
<HBox styleClass="test" spacing="10">
|
||||
<Button styleClass="pfeil, links" onAction="#pfeilLinks"/>
|
||||
<Label fx:id="dateLabel"/>
|
||||
<Button styleClass="pfeil" onAction="#pfeilRechts"/>
|
||||
</HBox>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</top>
|
||||
<center>
|
||||
<AnchorPane>
|
||||
<GridPane fx:id="tagesplan" AnchorPane.bottomAnchor="20" AnchorPane.rightAnchor="20" AnchorPane.leftAnchor="20" AnchorPane.topAnchor="20" >
|
||||
</GridPane>
|
||||
</AnchorPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
|
||||
</center>
|
||||
<bottom>
|
||||
<BorderPane styleClass="button-untenrechts">
|
||||
<right>
|
||||
<Button text="Bestätigen" defaultButton="true" styleClass=".button"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</bottom>
|
||||
</BorderPane>
|
@ -52,9 +52,6 @@
|
||||
</center>
|
||||
<bottom>
|
||||
<BorderPane styleClass="button-untenrechts">
|
||||
<right>
|
||||
<Button text="Bestätigen" defaultButton="true" styleClass=".button"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--Sven Alteköster-->
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
<?import javafx.scene.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- Erstellt von Sven Alteköster -->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Erstellt von Sven Alteköster und Max Heer-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
<?import javafx.scene.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- Erstellt von Sven Alteköster -->
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="de.subway_surfers.vpr_app.HauptmenueElternController"
|
||||
prefHeight="400.0" prefWidth="600.0"
|
||||
stylesheets="@layout.css">
|
||||
<top>
|
||||
<BorderPane styleClass="kopfzeile">
|
||||
<right>
|
||||
<Button text="Abmelden" onAction="#onAbmelden"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</top>
|
||||
<center>
|
||||
<BorderPane styleClass="main">
|
||||
<left>
|
||||
<VBox styleClass="hauptmenue_buttons_links">
|
||||
<Button text="Bestellung Planen" onAction="#onBestellungPlanen"/>
|
||||
<Button text="Bestellhistorie anzeigen" onAction="#onBestellhistorieAnzeigen"/>
|
||||
</VBox>
|
||||
</left>
|
||||
<right>
|
||||
<GridPane fx:id="wochenplan" styleClass="hauptmenue_wochenuebersicht"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</center>
|
||||
</BorderPane>
|
@ -31,8 +31,7 @@
|
||||
</VBox>
|
||||
</left>
|
||||
<right>
|
||||
<GridPane fx:id="wochenplan" styleClass="hauptmenue_wochenuebersicht">
|
||||
</GridPane>
|
||||
<GridPane fx:id="wochenplan" styleClass="hauptmenue_wochenuebersicht"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</center>
|
||||
|
@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- @author Samuel Wolff
|
||||
Noch nicht getestet
|
||||
TODO Style einbauen
|
||||
-->
|
||||
<!--Samuel Wolff-->
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
@ -6,6 +6,8 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- Erstellt von Sven Alteköster -->
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="de.subway_surfers.vpr_app.VerwaltungController"
|
||||
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
@author Samuel Wolff
|
||||
Noch nicht getestet
|
||||
TODO Style einbinden
|
||||
-->
|
||||
<!--Samuel Wolff-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
@author Samuel Wolff
|
||||
Noch nicht getestet
|
||||
TODO Style einbauen
|
||||
-->
|
||||
<!--Samuel Wolff-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
|
Loading…
Reference in New Issue
Block a user