diff --git a/db/nursingHome.db b/db/nursingHome.db index adcfa93..262eb5d 100644 Binary files a/db/nursingHome.db and b/db/nursingHome.db differ diff --git a/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java b/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java index 1d36d3d..9152026 100644 --- a/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java +++ b/src/main/java/de/hitec/nhplus/treatment/LockedTreatmentController.java @@ -4,6 +4,7 @@ import de.hitec.nhplus.datastorage.DaoFactory; import de.hitec.nhplus.nurse.LockedNurseController; import de.hitec.nhplus.nurse.Nurse; import de.hitec.nhplus.nurse.database.NurseDao; +import de.hitec.nhplus.patient.Patient; import de.hitec.nhplus.patient.database.PatientDao; import de.hitec.nhplus.treatment.database.TreatmentDao; import de.hitec.nhplus.utils.DateConverter; @@ -32,6 +33,12 @@ public class LockedTreatmentController { public TableView tableView; @FXML public TableColumn columnId; + @FXML + private TableColumn columnPatient; + @FXML + private TableColumn columnNurse; + @FXML + private TableColumn columnDeleteDate; private final ObservableList treatments = FXCollections.observableArrayList(); private NurseDao nurseDao; @@ -47,6 +54,21 @@ public class LockedTreatmentController { this.columnId.setCellValueFactory(new PropertyValueFactory<>("id")); + this.columnPatient.setCellValueFactory( + cellData -> { + Patient patient = cellData.getValue().getPatient(); + return new SimpleStringProperty(patient.getSurName() + ", " + patient.getFirstName()); + } + ); + + this.columnNurse.setCellValueFactory( + cellData -> { + Nurse nurse = cellData.getValue().getNurse(); + return new SimpleStringProperty(nurse.getSurName() + ", " + nurse.getFirstName()); + } + ); + + this.columnDeleteDate.setCellValueFactory(new PropertyValueFactory<>("coming soon")); this.tableView.setItems(this.treatments); } diff --git a/src/main/resources/de/hitec/nhplus/treatment/LockedTreatmentView.fxml b/src/main/resources/de/hitec/nhplus/treatment/LockedTreatmentView.fxml index 4505be7..6f501c8 100644 --- a/src/main/resources/de/hitec/nhplus/treatment/LockedTreatmentView.fxml +++ b/src/main/resources/de/hitec/nhplus/treatment/LockedTreatmentView.fxml @@ -24,6 +24,25 @@ prefWidth="102.0" text="ID" /> + + + +