From 9ac68941e9c14fda7b8be2c0f2c5731db6c17a5c Mon Sep 17 00:00:00 2001 From: Dorian Nemec Date: Fri, 17 May 2024 08:53:58 +0200 Subject: [PATCH] #7 Visible UI for locked treatments #2 all visible UIs --- db/nursingHome.db | Bin 28672 -> 28672 bytes .../treatment/LockedTreatmentController.java | 22 ++++++++++++++++++ .../nhplus/treatment/LockedTreatmentView.fxml | 19 +++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/db/nursingHome.db b/db/nursingHome.db index adcfa93e10fe3076d88d4433914e4fa0ddffa308..262eb5dc15564de7ecafe2545549e545414e66dc 100644 GIT binary patch delta 271 zcmZp8z}WDBae|Z(vkn6T13M7Iz~YHIMp8ggy`qJ@+>H!u9BB-EtGViU_i&`~WOGm5 zY$(9VKDm+oDRYac=jImnW=2*wN1tHV$vm9B%uNjLi&yh9O7Q(<5D_;wXKZpUNleN~ z%}q_oOl}PJW}iHl^AdBDpV#Cl9)-!1xZY3B#_9FUa1=6VBbZ z*-(I!eR3oF)5+eP3t7_=bBa?Zf8^|C;rq+@V)9JxOF#y*<>q`IK1SxoV7JLLxXl>Z zC!gn@$LKmak4J%#ZF4`5E+cajgVW+hF2>2L`9hc&L^d<>GYazUXJFx9$IJhU|33dZ z{ 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" /> + + + +