#7: (WIP) LockedTreatmentView.fxml angefangen & TreatmentDao angepasst.
Some checks failed
Quality Check / Linting Check (push) Failing after 12s
Quality Check / Javadoc Check (push) Successful in 21s

This commit is contained in:
arminribic 2024-05-16 17:12:50 +02:00
parent 79ddf61c26
commit 2b9734a764
4 changed files with 27 additions and 4 deletions

View file

@ -168,7 +168,7 @@ public class TreatmentFixture implements Fixture<Treatment> {
convertStringToLocalTime("17:00"),
"KG",
"Massage der Extremitäten zur Verbesserung der Durchblutung",
false)
true)
);
TreatmentDao dao = DaoFactory.getInstance().createTreatmentDao();

View file

@ -31,8 +31,8 @@ public class TreatmentDao extends DaoImp<Treatment> {
protected PreparedStatement getCreateStatement(Treatment treatment) throws SQLException {
final String SQL = """
INSERT INTO treatment
(patientId, nurseId, date, begin, end, description, remark)
VALUES (?, ?, ?, ?, ?, ?, ?)
(patientId, nurseId, date, begin, end, description, remark, isLocked)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
""";
PreparedStatement statement = this.connection.prepareStatement(SQL);
statement.setInt(1, treatment.getPatient().getId());
@ -42,6 +42,7 @@ public class TreatmentDao extends DaoImp<Treatment> {
statement.setString(5, treatment.getEnd());
statement.setString(6, treatment.getDescription());
statement.setString(7, treatment.getRemarks());
statement.setBoolean(8,treatment.isLocked());
return statement;
}

View file

@ -12,7 +12,11 @@
<Insets top="8" left="8" right="8" bottom="8"/>
</padding>
<center>
<TableView fx:id="tableView" layoutX="31.0" layoutY="40" onMouseClicked="#handleMouseClick" >
<TableView
fx:id="tableView"
layoutX="31.0"
layoutY="40"
onMouseClicked="#handleMouseClick" >
<columns>
<TableColumn
fx:id="columnId"

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.treatment.LockedTreatmentController">
<padding>
<Insets bottom="8" left="8" right="8" top="8" />
</padding>
<center>
<TableView fx:id="tableView" layoutX="31.0" layoutY="40">
<columns>
<TableColumn fx:id="columnId" minWidth="40.0" prefWidth="102.0" text="ID" />
</columns>
</TableView>
</center>
</BorderPane>