#7 Visible UI for locked treatments
This commit is contained in:
parent
89e4be5172
commit
d69c738641
3 changed files with 2 additions and 11 deletions
|
@ -32,12 +32,6 @@ public class LockedTreatmentController {
|
||||||
public TableView<Treatment> tableView;
|
public TableView<Treatment> tableView;
|
||||||
@FXML
|
@FXML
|
||||||
public TableColumn<Treatment, Long> columnId;
|
public TableColumn<Treatment, Long> columnId;
|
||||||
@FXML
|
|
||||||
public TableColumn<Treatment, String> columnFirstName;
|
|
||||||
@FXML
|
|
||||||
public TableColumn<Treatment, String> columnSurName;
|
|
||||||
@FXML
|
|
||||||
public TableColumn<Treatment, String> columnDeleteDate;
|
|
||||||
|
|
||||||
private final ObservableList<Treatment> treatments = FXCollections.observableArrayList();
|
private final ObservableList<Treatment> treatments = FXCollections.observableArrayList();
|
||||||
private NurseDao nurseDao;
|
private NurseDao nurseDao;
|
||||||
|
@ -52,9 +46,6 @@ public class LockedTreatmentController {
|
||||||
this.readAllAndShowInTableView();
|
this.readAllAndShowInTableView();
|
||||||
|
|
||||||
this.columnId.setCellValueFactory(new PropertyValueFactory<>("id"));
|
this.columnId.setCellValueFactory(new PropertyValueFactory<>("id"));
|
||||||
this.columnFirstName.setCellValueFactory(new PropertyValueFactory<>("firstName"));
|
|
||||||
this.columnSurName.setCellValueFactory(new PropertyValueFactory<>("surName"));
|
|
||||||
this.columnDeleteDate.setCellValueFactory(cellData -> new SimpleStringProperty("coming soon"));
|
|
||||||
|
|
||||||
this.tableView.setItems(this.treatments);
|
this.tableView.setItems(this.treatments);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class Treatment {
|
||||||
LocalTime end,
|
LocalTime end,
|
||||||
String description,
|
String description,
|
||||||
String remarks,
|
String remarks,
|
||||||
boolean isLocked
|
Boolean isLocked
|
||||||
) {
|
) {
|
||||||
this.id = new SimpleIntegerProperty(id);
|
this.id = new SimpleIntegerProperty(id);
|
||||||
this.patient = new SimpleObjectProperty<>(patient);
|
this.patient = new SimpleObjectProperty<>(patient);
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class TreatmentDao extends DaoImp<Treatment> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Treatment> readAllLocked() throws SQLException {
|
public List<Treatment> readAllLocked() throws SQLException {
|
||||||
final String SQL = "SELECT * FROM treatment WHERE isLocked=true";
|
final String SQL = "SELECT * FROM treatment WHERE isLocked = true";
|
||||||
return getListFromResultSet(this.connection.prepareStatement(SQL).executeQuery());
|
return getListFromResultSet(this.connection.prepareStatement(SQL).executeQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue