diff options
author | Tharre <tharre3@gmail.com> | 2018-05-24 20:28:05 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2018-05-24 20:28:05 +0200 |
commit | f5bc7925a8fbbe247972a6f0e0571cc7e92fbefa (patch) | |
tree | 25c6010b1c96de0302ac618bc3aeee61100655fe /src/main/resources | |
parent | f7d14a76123911f0bced08356a0c69e61147cb1b (diff) | |
parent | 58f6ea4ad233f4cbb57b57734a5067e0856b6341 (diff) | |
download | sepm-groupproject-2.0.tar.gz sepm-groupproject-2.0.tar.xz sepm-groupproject-2.0.zip |
Merge branch 'develop'v2.0
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/fxml/ArchiveOperation.fxml | 70 | ||||
-rw-r--r-- | src/main/resources/fxml/CreateOperationController.fxml | 163 | ||||
-rw-r--r-- | src/main/resources/fxml/OperationDetails.fxml | 102 | ||||
-rw-r--r-- | src/main/resources/fxml/createCar.fxml | 5 | ||||
-rw-r--r-- | src/main/resources/fxml/createNewEmployee.fxml | 5 | ||||
-rw-r--r-- | src/main/resources/fxml/employeeListItem.fxml | 56 | ||||
-rw-r--r-- | src/main/resources/fxml/filterEmployeesControl.fxml | 19 | ||||
-rw-r--r-- | src/main/resources/fxml/listEmployees.fxml | 41 | ||||
-rw-r--r-- | src/main/resources/fxml/vehiclePane.fxml | 53 | ||||
-rw-r--r-- | src/main/resources/images/Driver.png | bin | 0 -> 2098 bytes | |||
-rw-r--r-- | src/main/resources/images/NotDriver.png | bin | 0 -> 4423 bytes | |||
-rw-r--r-- | src/main/resources/images/NotPilot.png | bin | 0 -> 3964 bytes | |||
-rw-r--r-- | src/main/resources/images/Pilot.png | bin | 0 -> 2389 bytes | |||
-rw-r--r-- | src/main/resources/logback.xml | 23 | ||||
-rw-r--r-- | src/main/resources/sql/database.sql | 20 | ||||
-rw-r--r-- | src/main/resources/styles/main.css | 95 |
16 files changed, 520 insertions, 132 deletions
diff --git a/src/main/resources/fxml/ArchiveOperation.fxml b/src/main/resources/fxml/ArchiveOperation.fxml new file mode 100644 index 0000000..88b5b39 --- /dev/null +++ b/src/main/resources/fxml/ArchiveOperation.fxml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Hyperlink?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.ScrollPane?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.FlowPane?> +<?import javafx.scene.text.Font?> + +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="650.0" prefWidth="1200.0" style="-fx-background-color: BLACK;" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.ArchiveOperationController"> + <children> + <AnchorPane prefHeight="650.0" prefWidth="800.0" style="-fx-background-color: rgba(239,235,232,1);" AnchorPane.leftAnchor="200.0" /> + <ScrollPane prefHeight="650.0" prefWidth="800.0" AnchorPane.leftAnchor="200.0"> + <content> + <FlowPane fx:id="archiveOperationFlowPane" prefHeight="650.0" prefWidth="800.0" /> + </content> + </ScrollPane> + <AnchorPane fx:id="apDetails" layoutX="201.0" prefHeight="650.0" prefWidth="800.0" style="-fx-background-color: rgba(239,235,232,1);" visible="false" AnchorPane.leftAnchor="201.0" AnchorPane.topAnchor="0.0"> + <children> + <AnchorPane prefHeight="170.0" prefWidth="800.0" style="-fx-background-color: rgba(191,144,0,1);"> + <children> + <Label layoutX="81.0" layoutY="20.0" prefHeight="34.0" prefWidth="116.0" text="Archiv-Eintrag:" textFill="WHITE"> + <font> + <Font name="System Bold" size="16.0" /> + </font> + </Label> + <Label fx:id="lblCodeHeader" layoutX="203.0" layoutY="20.0" prefHeight="34.0" prefWidth="116.0" textFill="WHITE"> + <font> + <Font name="System Bold" size="16.0" /> + </font> + </Label> + <Hyperlink fx:id="hypBack" layoutX="656.0" layoutY="20.0" onAction="#backClicked" text="Zurück" textFill="WHITE"> + <font> + <Font name="System Bold" size="16.0" /> + </font> + </Hyperlink> + </children></AnchorPane> + <AnchorPane layoutX="82.0" layoutY="60.0" prefHeight="150.0" prefWidth="636.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 5, 0, 0, 5);"> + <children> + <Label fx:id="lblOpCode" layoutX="25.0" layoutY="22.0" prefHeight="26.0" prefWidth="116.0" text="Label"> + <font> + <Font name="System Bold" size="18.0" /> + </font> + </Label> + <Label fx:id="lblAddress" layoutX="26.0" layoutY="53.0" prefHeight="22.0" prefWidth="540.0" text="Label"> + <font> + <Font size="15.0" /> + </font> + </Label> + <Label fx:id="lblVehicles" layoutX="58.0" layoutY="91.0" prefHeight="46.0" prefWidth="554.0" text="Label"> + <font> + <Font size="15.0" /> + </font> + </Label> + <Label fx:id="lblDate" alignment="CENTER_RIGHT" layoutX="482.0" layoutY="22.0" prefHeight="27.0" prefWidth="140.0" text="Label"> + <font> + <Font name="System Bold" size="18.0" /> + </font> + </Label> + </children> + </AnchorPane> + <ScrollPane fitToWidth="true" prefHeight="410.0" prefWidth="640.0" AnchorPane.leftAnchor="82.0" AnchorPane.topAnchor="225.0"> + <content> + <FlowPane fx:id="fpVehicles" prefHeight="410.0" prefWidth="640.0" /> + </content> + </ScrollPane> + </children> + </AnchorPane> + </children> +</AnchorPane> diff --git a/src/main/resources/fxml/CreateOperationController.fxml b/src/main/resources/fxml/CreateOperationController.fxml index 086a5d1..0a09611 100644 --- a/src/main/resources/fxml/CreateOperationController.fxml +++ b/src/main/resources/fxml/CreateOperationController.fxml @@ -6,90 +6,83 @@ <?import javafx.scene.control.ListView?> <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.FlowPane?> <?import javafx.scene.text.Font?> - -<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="650.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.userInterface.CreateOperationController"> - <children> - <AnchorPane layoutX="964.0" layoutY="-66.0" prefHeight="182.0" prefWidth="1200.0" style="-fx-background-color: #2D75B6;" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" /> - <AnchorPane fx:id="apCreateOperation" layoutX="40.0" layoutY="71.0" prefHeight="151.0" prefWidth="920.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 5, 0, 0, 5);"> - <children> - <Label layoutX="14.0" layoutY="14.0" prefHeight="30.0" prefWidth="62.0" text="Code"> - <font> - <Font size="19.0" /> - </font> - </Label> - <Label layoutX="185.0" layoutY="14.0" prefHeight="30.0" prefWidth="94.0" text="Adresse"> - <font> - <Font size="19.0" /> - </font> - </Label> - <Label layoutX="587.0" layoutY="14.0" prefHeight="30.0" prefWidth="121.0" text="Anmerkung"> - <font> - <Font size="19.0" /> - </font> - </Label> - <TextField fx:id="txtCode" layoutX="14.0" layoutY="48.0" prefHeight="39.0" prefWidth="163.0"> - <font> - <Font name="System Bold" size="20.0" /> - </font> - </TextField> - <TextField fx:id="txtAddress" layoutX="185.0" layoutY="48.0" prefHeight="39.0" prefWidth="396.0"> - <font> - <Font name="System Bold" size="20.0" /> - </font> - </TextField> - <TextField fx:id="txtNote" layoutX="587.0" layoutY="48.0" prefHeight="39.0" prefWidth="319.0"> - <font> - <Font name="System Bold" size="20.0" /> - </font> - </TextField> - <Label layoutX="14.0" layoutY="101.0" prefHeight="30.0" prefWidth="102.0" text="Fahrzeuge:"> - <font> - <Font size="19.0" /> - </font> - </Label> - <Label fx:id="lblChosenVehicles" layoutX="116.0" layoutY="102.0" prefHeight="30.0" prefWidth="610.0" text="keine ausgewählt"> - <font> - <Font size="19.0" /> - </font> - </Label> - <Button fx:id="btnCreateOperation" layoutX="747.0" layoutY="95.0" mnemonicParsing="false" onAction="#createOperationClicked" prefHeight="0.0" prefWidth="158.0" text="Erstellen"> - <font> - <Font name="System Bold" size="21.0" /> - </font> - </Button> - </children> - </AnchorPane> - <Hyperlink layoutX="44.0" layoutY="38.0" onAction="#onRegistrationLinkClicked" text="Anmeldungen" textFill="WHITE"> - <font> - <Font size="15.0" /> - </font> - </Hyperlink> - <Hyperlink layoutX="802.0" layoutY="38.0" onAction="#onEmployeeLinkClicked" text="Personen" textFill="WHITE"> - <font> - <Font size="15.0" /> - </font> - </Hyperlink> - <Hyperlink layoutX="877.0" layoutY="38.0" onAction="#onVehicleLinkClicked" text="Fahrzeuge" textFill="WHITE"> - <font> - <Font size="15.0" /> - </font> - </Hyperlink> - <AnchorPane fx:id="apActiveOperations" layoutX="968.0" layoutY="71.0" prefHeight="315.0" prefWidth="207.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 5);"> - <children> - <ListView fx:id="lvActiveOperations" layoutX="4.0" layoutY="74.0" prefHeight="242.0" prefWidth="200.0" style="-fx-background-color: white;" /> - <Label layoutX="10.0" layoutY="14.0" prefHeight="46.0" prefWidth="103.0" text="Aktive Einsätze"> - <font> - <Font name="System Bold" size="14.0" /> - </font> - </Label> - <Label layoutX="148.0" layoutY="28.0" text="Archiv"> - <font> - <Font size="13.0" /> - </font> - </Label> - </children> - </AnchorPane> - <ListView fx:id="lvVehicles" layoutX="40.0" layoutY="228.0" prefHeight="388.0" prefWidth="920.0" style="-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 5);" /> - </children> +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" + prefHeight="650.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/9.0.1" + xmlns:fx="http://javafx.com/fxml/1" + fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.CreateOperationController" + stylesheets="@/styles/main.css"> + <AnchorPane prefHeight="182.0" style="-fx-background-color: #2D75B6;" AnchorPane.leftAnchor="0.0" + AnchorPane.topAnchor="0.0" AnchorPane.rightAnchor="0.0"/> + <AnchorPane fx:id="apCreateOperation" layoutX="40.0" layoutY="71.0" prefHeight="151.0" + prefWidth="920.0" + styleClass="bg-white, shadowed"> + <Label layoutX="14.0" layoutY="14.0" prefHeight="30.0" prefWidth="62.0" text="Code" + styleClass="text-medium"/> + <Label layoutX="185.0" layoutY="14.0" prefHeight="30.0" prefWidth="94.0" text="Adresse" + styleClass="text-medium"/> + <Label layoutX="587.0" layoutY="14.0" prefHeight="30.0" prefWidth="121.0" text="Anmerkung" + styleClass="text-medium"/> + <TextField fx:id="txtCode" layoutX="14.0" layoutY="48.0" prefHeight="39.0" + onKeyReleased="#onOperationCodeChanged" + prefWidth="163.0" styleClass="text-big"> + <font> + <Font name="System Bold"/> + </font> + </TextField> + <TextField fx:id="txtAddress" layoutX="185.0" layoutY="48.0" prefHeight="39.0" + prefWidth="396.0" styleClass="text-big"> + <font> + <Font name="System Bold"/> + </font> + </TextField> + <TextField fx:id="txtNote" layoutX="587.0" layoutY="48.0" prefHeight="39.0" + prefWidth="319.0" styleClass="text-big"> + <font> + <Font name="System Bold"/> + </font> + </TextField> + <Label layoutX="14.0" layoutY="101.0" prefHeight="30.0" prefWidth="102.0" + text="Fahrzeuge:" styleClass="text-medium"/> + <Label fx:id="lblChosenVehicles" layoutX="116.0" layoutY="102.0" prefHeight="30.0" + prefWidth="610.0" text="keine ausgewählt" styleClass="text-big"/> + <Button fx:id="btnCreateOperation" layoutX="747.0" styleClass="text-big, button-main" + layoutY="95.0" mnemonicParsing="false" + onAction="#createOperationClicked" prefHeight="0.0" prefWidth="158.0" text="Erstellen"> + <font> + <Font name="System Bold"/> + </font> + </Button> + </AnchorPane> + <Hyperlink layoutX="44.0" layoutY="38.0" onAction="#onRegistrationLinkClicked" text="Anmeldungen" + textFill="WHITE" styleClass="text-small"> + </Hyperlink> + <Hyperlink layoutX="802.0" layoutY="38.0" onAction="#onEmployeeLinkClicked" text="Personen" + styleClass="text-small" + textFill="WHITE"> + </Hyperlink> + <Hyperlink layoutX="877.0" layoutY="38.0" onAction="#onVehicleLinkClicked" text="Fahrzeuge" + styleClass="text-small" + textFill="WHITE"> + </Hyperlink> + <!--<AnchorPane fx:id="apActiveOperations" layoutX="968.0" layoutY="71.0" prefHeight="315.0" prefWidth="207.0" style="-fx-background-color: white; -fx-effect: dropshadow(gaussian, rgba(0.5,0.5,0.5,0.8), 5, 0, 0, 3);">--> + <AnchorPane fx:id="apActiveOperations" layoutX="968.0" layoutY="71.0" prefHeight="315.0" + prefWidth="207.0" + styleClass="bg-white, shadowed"> + <ListView fx:id="lvActiveOperations" layoutX="4.0" layoutY="74.0" prefHeight="242.0" + prefWidth="200.0" style="-fx-background-color: white;"/> + <Label layoutX="10.0" layoutY="6.0" + text="Aktive Einsätze" styleClass="text-big"> + </Label> + <Hyperlink onAction="#onArchivLinkClicked" layoutY="7.0" text="Archiv" styleClass="text-medium" + AnchorPane.rightAnchor="12"/> + </AnchorPane> + <FlowPane fx:id="fpVehicles" hgap="12" layoutX="40.0" layoutY="228.0" prefHeight="388.0" + prefWidth="920.0" vgap="12"> + </FlowPane> + <AnchorPane fx:id="apInvisible" prefHeight="650.0" prefWidth="1200.0" + style="-fx-background-color: rgba(0,0,0,0.7);" visible="false"/> + <fx:include fx:id="operationDetails" source="/fxml/OperationDetails.fxml" + AnchorPane.leftAnchor="54.0" AnchorPane.topAnchor="50.0"/> </AnchorPane> diff --git a/src/main/resources/fxml/OperationDetails.fxml b/src/main/resources/fxml/OperationDetails.fxml new file mode 100644 index 0000000..3ac7d93 --- /dev/null +++ b/src/main/resources/fxml/OperationDetails.fxml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Hyperlink?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.ListView?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.text.Font?> + +<AnchorPane fx:id="operationDetailsAP" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="542.0" prefWidth="1100.0" visible="false" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.OperationDetailsController"> + <children> + <AnchorPane prefHeight="542.0" prefWidth="1100.0" style="-fx-background-color: white;" /> + <AnchorPane layoutX="10.0" layoutY="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="542.0" prefWidth="1000.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0"> + <children> + <AnchorPane layoutX="964.0" layoutY="-66.0" prefHeight="152.0" prefWidth="1100.0" style="-fx-background-color: green;" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0"> + <children> + <Hyperlink layoutX="1023.0" layoutY="16.0" onAction="#closeWindow" text="Zurück" textFill="WHITE"> + <font> + <Font size="15.0" /> + </font> + </Hyperlink> + <Label layoutX="17.0" layoutY="13.0" prefHeight="34.0" prefWidth="174.0" text="Ausgewählter Einsatz:" textFill="WHITE"> + <font> + <Font size="17.0" /> + </font> + </Label> + </children> + </AnchorPane> + <AnchorPane fx:id="apActiveOperations" layoutX="874.0" layoutY="50.0" prefHeight="298.0" prefWidth="200.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 5);"> + <children> + <ListView fx:id="lvActiveOperations" layoutX="9.0" layoutY="55.0" prefHeight="242.0" prefWidth="182.0" style="-fx-background-color: white;" /> + <Label layoutX="9.0" layoutY="11.0" prefHeight="46.0" prefWidth="103.0" text="Aktive Einsätze"> + <font> + <Font name="System Bold" size="14.0" /> + </font> + </Label> + <Label layoutX="150.0" layoutY="24.0" text="Archiv"> + <font> + <Font size="13.0" /> + </font> + </Label> + </children> + </AnchorPane> + <ListView fx:id="lvVehicles" layoutX="16.0" layoutY="185.0" prefHeight="355.0" prefWidth="846.0" style="-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 5);" /> + <AnchorPane fx:id="apCreateOperation" layoutX="16.0" layoutY="49.0" prefHeight="134.0" prefWidth="845.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 5, 0, 0, 5);"> + <children> + <Label layoutX="14.0" layoutY="14.0" prefHeight="30.0" prefWidth="62.0" text="Code"> + <font> + <Font size="15.0" /> + </font> + </Label> + <Label layoutX="185.0" layoutY="14.0" prefHeight="30.0" prefWidth="94.0" text="Adresse"> + <font> + <Font size="15.0" /> + </font> + </Label> + <Label layoutX="563.0" layoutY="14.0" prefHeight="30.0" prefWidth="121.0" text="Anmerkung"> + <font> + <Font size="15.0" /> + </font> + </Label> + <Label layoutX="14.0" layoutY="96.0" prefHeight="30.0" prefWidth="102.0" text="Fahrzeuge:"> + <font> + <Font size="17.0" /> + </font> + </Label> + <Label fx:id="lblChosenVehicles" layoutX="105.0" layoutY="96.0" prefHeight="30.0" prefWidth="418.0" text="keine ausgewählt"> + <font> + <Font size="17.0" /> + </font> + </Label> + <Button fx:id="btnCloseOperation" layoutX="709.0" layoutY="89.0" mnemonicParsing="false" onAction="#closeOperationClicked" prefHeight="39.0" prefWidth="122.0" text="Abschließen"> + <font> + <Font name="System Bold" size="17.0" /> + </font> + </Button> + <Button fx:id="btnCancelOperation" layoutX="575.0" layoutY="90.0" mnemonicParsing="false" onAction="#cancelOperationClicked" prefHeight="38.0" prefWidth="122.0" text="Stornieren"> + <font> + <Font name="System Bold" size="17.0" /> + </font> + </Button> + <Label fx:id="lblCode" layoutX="14.0" layoutY="39.0" prefHeight="46.0" prefWidth="154.0"> + <font> + <Font name="System Bold" size="19.0" /> + </font> + </Label> + <Label fx:id="lblAddress" layoutX="185.0" layoutY="39.0" prefHeight="44.0" prefWidth="374.0"> + <font> + <Font name="System Bold" size="19.0" /> + </font> + </Label> + <Label fx:id="lblAdditionalInfo" layoutX="562.0" layoutY="39.0" prefHeight="44.0" prefWidth="272.0"> + <font> + <Font name="System Bold" size="19.0" /> + </font> + </Label> + </children> + </AnchorPane> + </children> + </AnchorPane> + </children> +</AnchorPane> diff --git a/src/main/resources/fxml/createCar.fxml b/src/main/resources/fxml/createCar.fxml index b0898da..cefac82 100644 --- a/src/main/resources/fxml/createCar.fxml +++ b/src/main/resources/fxml/createCar.fxml @@ -4,14 +4,15 @@ <?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.ChoiceBox?> <?import javafx.scene.layout.AnchorPane?> - +<?import javafx.scene.layout.FlowPane?> <AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.CreateCarController"> <children> <ChoiceBox fx:id="cmb_Ctyp" layoutX="14.0" layoutY="14.0" prefWidth="150.0" /> <ChoiceBox fx:id="cmb_typ" layoutX="191.0" layoutY="14.0" prefWidth="150.0" /> - <Button fx:id="btn_cancel" layoutX="500.0" layoutY="14.0" mnemonicParsing="false" text="abbrechen" /> + <Button fx:id="btn_cancel" layoutX="500.0" layoutY="14.0" mnemonicParsing="false" text="abbrechen" onAction="#cancelAction"/> <Button fx:id="btn_create" layoutX="500.0" layoutY="53.0" mnemonicParsing="false" onAction="#createCar" text="Erstellen" /> <CheckBox fx:id="cbx_NEF" layoutX="14.0" layoutY="57.0" mnemonicParsing="false" text="NEF - Halterung" /> + <FlowPane fx:id="fp_vehicleList" layoutX="14.0" layoutY="94.0" prefHeight="298.0" prefWidth="571.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" /> </children> </AnchorPane> diff --git a/src/main/resources/fxml/createNewEmployee.fxml b/src/main/resources/fxml/createNewEmployee.fxml index 5fa1ca9..4848c09 100644 --- a/src/main/resources/fxml/createNewEmployee.fxml +++ b/src/main/resources/fxml/createNewEmployee.fxml @@ -8,10 +8,9 @@ <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.AnchorPane?> - -<AnchorPane prefHeight="114.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.CreateNewEmployeeController"> +<AnchorPane prefHeight="96.0" prefWidth="740.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.CreateNewEmployeeController"> <children> - <Label layoutX="14.0" layoutY="14.0" text="Neue Person erstellen" /> + <Label fx:id="lblHeader" layoutX="14.0" layoutY="14.0" text="Neue Person erstellen" /> <Label layoutX="14.0" layoutY="38.0" text="Name" /> <Label layoutX="206.0" layoutY="38.0" text="Qualifikation" /> <CheckBox fx:id="inputIsDriver" layoutX="343.0" layoutY="37.0" mnemonicParsing="false" text="Fahrer" /> diff --git a/src/main/resources/fxml/employeeListItem.fxml b/src/main/resources/fxml/employeeListItem.fxml new file mode 100644 index 0000000..05354fc --- /dev/null +++ b/src/main/resources/fxml/employeeListItem.fxml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.image.ImageView?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.HBox?> +<?import javafx.scene.text.Font?> + +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" + prefHeight="96.0" prefWidth="360.0" style="-fx-background-color: white;" + xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" + fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.EmployeeListItemController"> + <children> + <Label fx:id="lblName" layoutX="8.0" layoutY="22.0" text="Peter Mustermann" + AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="5.0"> + <font> + <Font name="System Bold" size="18.0"/> + </font> + </Label> + <Button layoutX="298.0" layoutY="5.0" mnemonicParsing="false" onAction="#onEditEmployeeClicked" + text="bearbeiten" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0"/> + <HBox layoutX="10.0" layoutY="40.0" prefHeight="42.0" prefWidth="339.0" + AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="40.0"> + <children> + <AnchorPane prefHeight="42.0" prefWidth="112.0" style="-fx-background-color: white;"> + <children> + <ImageView fx:id="imgQualification" fitHeight="25.0" fitWidth="25.0" layoutX="10.0" + layoutY="11.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="10.0" + AnchorPane.topAnchor="10.0"/> + <Label fx:id="lblQualification" layoutX="45.0" layoutY="14.0" text="Notarzt" + AnchorPane.leftAnchor="45.0" AnchorPane.topAnchor="14.0"/> + </children> + </AnchorPane> + <AnchorPane prefHeight="42.0" prefWidth="112.0" style="-fx-background-color: white;"> + <children> + <ImageView fx:id="imgPilot" fitHeight="25.0" fitWidth="25.0" layoutX="10.0" + layoutY="11.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="10.0" + AnchorPane.topAnchor="10.0"/> + <Label fx:id="lblPilot" layoutX="53.0" layoutY="14.0" text="nicht Pilot" + AnchorPane.leftAnchor="45.0" AnchorPane.topAnchor="14.0"/> + </children> + </AnchorPane> + <AnchorPane prefHeight="42.0" prefWidth="112.0" style="-fx-background-color: white;"> + <children> + <ImageView fx:id="imgDriver" fitHeight="25.0" fitWidth="25.0" layoutX="10.0" + layoutY="11.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="10.0" + AnchorPane.topAnchor="10.0"/> + <Label fx:id="lblDriver" layoutX="54.0" layoutY="14.0" text="ist Fahrer" + AnchorPane.leftAnchor="45.0" AnchorPane.topAnchor="14.0"/> + </children> + </AnchorPane> + </children> + </HBox> + </children> +</AnchorPane> diff --git a/src/main/resources/fxml/filterEmployeesControl.fxml b/src/main/resources/fxml/filterEmployeesControl.fxml new file mode 100644 index 0000000..68a6f3e --- /dev/null +++ b/src/main/resources/fxml/filterEmployeesControl.fxml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.AnchorPane?> + +<AnchorPane prefHeight="86.0" prefWidth="740.0" style="-fx-background-color: white;" + xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" + fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.FilterEmployeesController"> + <children> + <Label layoutX="14.0" layoutY="14.0" text="Filtern nach Name"/> + <TextField fx:id="inputFilterString" layoutX="22.0" layoutY="41.0" + onKeyReleased="#onFilterTextChanged" promptText="Name eingeben"/> + <Button layoutX="698.0" layoutY="48.0" mnemonicParsing="false" onAction="#onAddEmployeeClicked" + onInputMethodTextChanged="#onFilterTextChanged" text="Person hinzufügen" + AnchorPane.rightAnchor="10.0"/> + </children> +</AnchorPane> diff --git a/src/main/resources/fxml/listEmployees.fxml b/src/main/resources/fxml/listEmployees.fxml new file mode 100644 index 0000000..ae815e1 --- /dev/null +++ b/src/main/resources/fxml/listEmployees.fxml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.ScrollPane?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.FlowPane?> +<?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> + +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" + prefHeight="536.0" prefWidth="816.0" style="-fx-background-color: #EFEBE8;" + xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" + fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.ListEmployeesController"> + <children> + <AnchorPane prefHeight="118.0" prefWidth="816.0" style="-fx-background-color: #C55A11;"> + <children> + <Label layoutX="39.0" layoutY="23.0" text="Personen" textFill="WHITE"> + <font> + <Font name="Calibri Bold" size="22.0"/> + </font> + </Label> + </children> + </AnchorPane> + <VBox layoutX="37.0" layoutY="60.0" prefHeight="454.0" prefWidth="742.0"> + <children> + <AnchorPane fx:id="containerHeader" prefHeight="86.0" prefWidth="740.0" + style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 5);"/> + <ScrollPane hbarPolicy="NEVER" style="-fx-background-color: #EFEBE8;" vbarPolicy="NEVER"> + <VBox.margin> + <Insets top="20.0"/> + </VBox.margin> + <content> + <FlowPane fx:id="flowPaneEmployeeList" prefHeight="346.0" prefWidth="742.0" + style="-fx-background-color: #EFEBE8;"/> + </content> + </ScrollPane> + </children> + </VBox> + </children> +</AnchorPane> diff --git a/src/main/resources/fxml/vehiclePane.fxml b/src/main/resources/fxml/vehiclePane.fxml index 8b1d194..784febc 100644 --- a/src/main/resources/fxml/vehiclePane.fxml +++ b/src/main/resources/fxml/vehiclePane.fxml @@ -10,61 +10,56 @@ <?import javafx.scene.text.Text?> <?import javafx.scene.text.TextFlow?> -<GridPane hgap="6.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" - fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.ui.vehiclepane.VehiclePaneController"> +<GridPane hgap="6.0" stylesheets="@/styles/main.css" styleClass="bg-white, shadowed" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.controller.VehiclePaneController"> <columnConstraints> - <ColumnConstraints/> - <ColumnConstraints/> - <ColumnConstraints/> - <ColumnConstraints/> + <ColumnConstraints /> + <ColumnConstraints /> + <ColumnConstraints /> + <ColumnConstraints /> </columnConstraints> <rowConstraints> - <RowConstraints/> - <RowConstraints/> - <RowConstraints/> - <RowConstraints/> + <RowConstraints /> + <RowConstraints /> + <RowConstraints /> + <RowConstraints /> </rowConstraints> <padding> - <Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/> + <Insets bottom="6.0" left="12.0" right="12.0" top="6.0" /> </padding> <TextFlow GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0"> - <Text text="RTW" fx:id="txtType"> + <Text fx:id="txtType" text="RTW"> <font> - <Font name="System Bold" size="18.0"/> + <Font name="System Bold" size="18.0" /> </font> </Text> - <Text text="-10003" fx:id="txtNumber"> + <Text fx:id="txtNumber" text="-10003"> <font> - <Font size="16.0"/> + <Font size="16.0" /> </font> </Text> </TextFlow> - <ImageView fx:id="ivNEF" fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" - GridPane.columnIndex="0" GridPane.rowIndex="1"> - <Image url="@../images/NotNEF.png"/> + <ImageView fx:id="ivNEF" fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="0" GridPane.rowIndex="1"> + <Image url="@../images/NotNEF.png" /> </ImageView> <Text fx:id="txtNEF" text="keine NEF-Halterung" GridPane.columnIndex="1" GridPane.rowIndex="1"> <font> - <Font size="14.0"/> + <Font size="14.0" /> </font> </Text> - <ImageView fx:id="ivQualification" fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" - preserveRatio="true" - GridPane.columnIndex="0" GridPane.rowIndex="2"> - <Image url="@../images/Qualification.png"/> + <ImageView fx:id="ivQualification" fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="0" GridPane.rowIndex="2"> + <Image url="@../images/Qualification.png" /> </ImageView> - <Text fx:id="txtQualification" text="Notarzt" GridPane.columnIndex="1" GridPane.rowIndex="2"> + <Text fx:id="txtQualification" text="-" GridPane.columnIndex="1" GridPane.rowIndex="2"> <font> - <Font size="14.0"/> + <Font size="14.0" /> </font> </Text> - <ImageView fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" - GridPane.columnIndex="0" GridPane.rowIndex="3"> - <Image url="@../images/Vehicle.png"/> + <ImageView fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="0" GridPane.rowIndex="3"> + <Image url="@../images/Vehicle.png" /> </ImageView> <Text fx:id="txtRooftype" text="Hochdach" GridPane.columnIndex="1" GridPane.rowIndex="3"> <font> - <Font size="14.0"/> + <Font size="14.0" /> </font> </Text> </GridPane> diff --git a/src/main/resources/images/Driver.png b/src/main/resources/images/Driver.png Binary files differnew file mode 100644 index 0000000..55d4f4a --- /dev/null +++ b/src/main/resources/images/Driver.png diff --git a/src/main/resources/images/NotDriver.png b/src/main/resources/images/NotDriver.png Binary files differnew file mode 100644 index 0000000..b8492aa --- /dev/null +++ b/src/main/resources/images/NotDriver.png diff --git a/src/main/resources/images/NotPilot.png b/src/main/resources/images/NotPilot.png Binary files differnew file mode 100644 index 0000000..22d039f --- /dev/null +++ b/src/main/resources/images/NotPilot.png diff --git a/src/main/resources/images/Pilot.png b/src/main/resources/images/Pilot.png Binary files differnew file mode 100644 index 0000000..18049e8 --- /dev/null +++ b/src/main/resources/images/Pilot.png diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..d2d4f23 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> +<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>sepm-%d{yyyy-MM-dd}.log</fileNamePattern> + </rollingPolicy> + + <encoder> + <pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</pattern> + </encoder> +</appender> + +<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg%n</pattern> + </encoder> +</appender> + +<root level="INFO"> + <appender-ref ref="FILE" /> + <appender-ref ref="STDOUT" /> +</root> +</configuration> diff --git a/src/main/resources/sql/database.sql b/src/main/resources/sql/database.sql index 4f3adf7..463e8ac 100644 --- a/src/main/resources/sql/database.sql +++ b/src/main/resources/sql/database.sql @@ -1,30 +1,26 @@ CREATE TABLE IF NOT EXISTS VehicleVersion ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, - constructionType VARCHAR NOT NULL, - type VARCHAR NOT NULL, + constructionType ENUM('NORMAL', 'HOCHDACH', 'MITTELHOCHDACH') NOT NULL, + type ENUM('BKTW', 'KTW_B', 'KTW', 'RTW', 'NEF', 'NAH') NOT NULL, hasNef BOOLEAN NOT NULL, - CHECK constructionType IN ('NORMAL', 'HOCHDACH', 'MITTELHOCHDACH'), - CHECK type IN ('BKTW', 'KTW-B', 'KTW', 'RTW', 'NEF', 'NAH') ); CREATE TABLE IF NOT EXISTS Vehicle ( id BIGINT AUTO_INCREMENT PRIMARY KEY, version BIGINT NOT NULL, - status VARCHAR NOT NULL, + status ENUM('ABGEMELDET', 'FREI_WACHE', 'FREI_FUNK', 'ZUM_BERUFUNGSORT', 'AM_BERUFUNGSORT', + 'ZUM_ZIELORT', 'AM_ZIELORT', 'DELETED') NOT NULL, FOREIGN KEY (version) REFERENCES VehicleVersion(id), - CHECK status IN ('ABGEMELDET', 'FREI_WACHE', 'ZUM_BERUFUNGSORT', 'AM_BERUFUNGSORT', 'ZUM_ZIELORT', - 'AM_ZIELORT', 'FREI_FUNK', 'DELETED') ); CREATE TABLE IF NOT EXISTS EmployeeVersion ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, birthday DATE NOT NULL, - educationLevel VARCHAR NOT NULL, + educationLevel ENUM('RS', 'NFS', 'NKV', 'NKA', 'NKI', 'NA') NOT NULL, isDriver BOOLEAN NOT NULL, isPilot BOOLEAN NOT NULL, - CHECK educationLevel IN ('RS', 'NFS', 'NKV', 'NKA', 'NKI', 'NA') ); CREATE TABLE IF NOT EXISTS Employee ( @@ -47,13 +43,11 @@ CREATE TABLE IF NOT EXISTS Registration ( CREATE TABLE IF NOT EXISTS Operation ( id BIGINT AUTO_INCREMENT PRIMARY KEY, opCode VARCHAR(20) NOT NULL, - severity VARCHAR NOT NULL, + severity ENUM('A', 'B', 'C', 'D', 'E', 'O') NOT NULL, created TIMESTAMP NOT NULL, destination VARCHAR(100) NOT NULL, additionalInfo VARCHAR(100), - status VARCHAR NOT NULL, - CHECK severity IN ('A', 'B', 'C', 'D', 'E', 'O'), - CHECK status IN ('ACTIVE', 'COMPLETED', 'CANCELLED') + status ENUM('ACTIVE', 'COMPLETED', 'CANCELLED'), ); CREATE TABLE IF NOT EXISTS VehicleOperation ( diff --git a/src/main/resources/styles/main.css b/src/main/resources/styles/main.css new file mode 100644 index 0000000..886e756 --- /dev/null +++ b/src/main/resources/styles/main.css @@ -0,0 +1,95 @@ +/* === shadow === */ +.shadowed { + -fx-effect: dropshadow(gaussian, rgba(100,100,100,0.8), 5, 0, 0, 3); +} + +/* === background === */ +/* -- basic -- */ +.bg-white { + -fx-background-color: white; +} +/* -- vehiclePane -- */ +.bg-yellow { + -fx-background-color: #FFE699; +} +.bg-status-green { + -fx-background-color: #C5E0B4; +} +.bg-status-orange { + -fx-background-color: #F8CBAD; +} +/* -- header areas -- */ +.bg-blue { + -fx-background-color: #2E75B6; +} +.bg-green { + -fx-background-color: #548235; +} +.bg-light-orange { + -fx-background-color: #BF9000; +} +.bg-dark-orange { + -fx-background-color: #C55A11; +} +/* -- content areas -- */ +.bg-gray-blue { + -fx-background-color: #E8EAEF; +} +.bg-gray-green { + -fx-background-color: #EBEFE8; +} +.bg-gray-orange { + -fx-background-color: #EFEBE8; +} +/* -- edit area -- */ +.bg-edit-area-orange { + -fx-background-color: #FBE5D6; +} + +/* === text === */ +.text-big { + -fx-font-size: 18px; +} + +.text-medium { + -fx-font-size: 14px; +} + +.text-small { + -fx-font-size: 14px; +} + +/* === button === */ +.button { + -fx-background-radius: 0em; + -fx-border-color: black; +} + +.button-main { + -fx-background-color: #548235; + -fx-text-fill: white; + -fx-font-weight: bold; +} + +.button-free-status { + -fx-background-color: #C5E0B4; +} + +.button-other-status { + -fx-background-color: #F8CBAD; +} + +/* === menu item === */ +.mi-free { + -fx-background-color: #C5E0B4; +} + +.mi-other { + -fx-background-color: #F8CBAD; +} + +.menu-item:focused .label { + -fx-text-fill: black; + -fx-font-weight: bold; +} + |