#10 story/pfleger-modul-sperren-und-loschen-von-pflegern #37
4 changed files with 21 additions and 9 deletions
|
@ -114,7 +114,6 @@ public class MainWindowController {
|
|||
}
|
||||
|
||||
private void loadActiveNursePage() {
|
||||
SZUT-Dominik marked this conversation as resolved
SZUT-Dominik
commented
Review
- [x] Missing Javadoc
|
||||
System.out.println("TODO: Active Nurse");
|
||||
try {
|
||||
BorderPane activeNursePane = FXMLLoader.load(
|
||||
Objects.requireNonNull(Main.class.getResource("/de/hitec/nhplus/nurse/AllNurseView.fxml"))
|
||||
|
@ -130,7 +129,6 @@ public class MainWindowController {
|
|||
}
|
||||
|
||||
private void loadLockedNursePage() {
|
||||
SZUT-Dominik marked this conversation as resolved
SZUT-Dominik
commented
- [x] Missing Javadoc
|
||||
System.out.println("TODO: Locked Nurse");
|
||||
try {
|
||||
BorderPane lockedNursePane = FXMLLoader.load(
|
||||
Objects.requireNonNull(Main.class.getResource("/de/hitec/nhplus/nurse/LockedNurseView.fxml"))
|
||||
|
|
|
@ -2,18 +2,15 @@ package de.hitec.nhplus.nurse;
|
|||
|
||||
import de.hitec.nhplus.datastorage.DaoFactory;
|
||||
import de.hitec.nhplus.nurse.database.NurseDao;
|
||||
import javafx.application.Application;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import javafx.scene.control.cell.TextFieldTableCell;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
|
@ -31,6 +28,8 @@ public class LockedNurseController {
|
|||
@FXML
|
||||
public TableColumn<Nurse, String> columnSurName;
|
||||
@FXML
|
||||
public TableColumn<Nurse, String> columnPhoneNumber;
|
||||
@FXML
|
||||
public TableColumn<Nurse, String> columnDeleteDate;
|
||||
|
||||
private final ObservableList<Nurse> nurses = FXCollections.observableArrayList();
|
||||
|
@ -47,8 +46,14 @@ public class LockedNurseController {
|
|||
this.columnSurName.setCellValueFactory(new PropertyValueFactory<>("surName"));
|
||||
SZUT-Dominik marked this conversation as resolved
Outdated
SZUT-Dominik
commented
- [x] Missing Javadoc
SZUT-Dominik
commented
- [x] Ist technisch falsch, technisch korrekt wäre:
> Initialization method that is called after the binding of all the fields.
Weil **Initalize** & **Instanciate** nicht dasselbe sind.
**Initalize** ist eine Methode, die im Hintergrund von **JavaFx**, nach dem **Instaciating** & **Binding** aufgerufen wird.
|
||||
this.columnSurName.setCellFactory(TextFieldTableCell.forTableColumn());
|
||||
|
||||
this.columnDeleteDate.setCellValueFactory(new PropertyValueFactory<>("date"));
|
||||
this.columnDeleteDate.setCellFactory(TextFieldTableCell.forTableColumn());
|
||||
this.columnPhoneNumber.setCellValueFactory(new PropertyValueFactory<>("phoneNumber"));
|
||||
this.columnPhoneNumber.setCellFactory(TextFieldTableCell.forTableColumn());
|
||||
|
||||
this.columnDeleteDate.setCellValueFactory(cellData -> {
|
||||
return new SimpleStringProperty(cellData.getValue().calculateDeleteDate());
|
||||
});
|
||||
//this.columnDeleteDate.setCellFactory(TextFieldTableCell.forTableColumn());
|
||||
|
||||
|
||||
this.tableView.setItems(this.nurses);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ public class Nurse extends Person {
|
|||
private final SimpleStringProperty phoneNumber;
|
||||
private final SimpleBooleanProperty locked;
|
||||
|
||||
|
||||
/**
|
||||
* This constructor allows instantiating a {@link Nurse} object,
|
||||
* before it is stored in the database, by omitting the {@link Nurse#id ID} value.
|
||||
SZUT-Dominik marked this conversation as resolved
Outdated
SZUT-Dominik
commented
- [x] Missing `@author` Tag
fügt euch bitte, sobald ihr was anpasst in einer Klasse selber als Autoren Hinzu
|
||||
|
@ -61,6 +60,11 @@ public class Nurse extends Person {
|
|||
this.locked = new SimpleBooleanProperty(isLocked);
|
||||
}
|
||||
|
||||
public String calculateDeleteDate() {
|
||||
//TODO: Lese alle Behandlungen die Dieser Pfleger Durchgefürt hat & brechene mit ihnen das Datum
|
||||
return "Comming soon";
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber.set(phoneNumber);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
minWidth="140.0"
|
||||
text="Vorname"
|
||||
/>
|
||||
<TableColumn
|
||||
fx:id="columnPhoneNumber"
|
||||
minWidth="140.0"
|
||||
text="Telefonnummer"
|
||||
/>
|
||||
<TableColumn
|
||||
fx:id="columnDeleteDate"
|
||||
minWidth="140.0"
|
||||
|
|
Loading…
Reference in a new issue