#24 Bugfix
This commit is contained in:
parent
970f167bc3
commit
449f3ade06
2 changed files with 6 additions and 1 deletions
|
@ -113,6 +113,11 @@ public class LockedNurseController {
|
||||||
@FXML
|
@FXML
|
||||||
public void handleMouseClick() {
|
public void handleMouseClick() {
|
||||||
Nurse nurse = tableView.getSelectionModel().getSelectedItem();
|
Nurse nurse = tableView.getSelectionModel().getSelectedItem();
|
||||||
|
if(nurse == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
boolean canBeDeleted = nurse.calculateDeleteDate().isBefore(LocalDate.now());
|
boolean canBeDeleted = nurse.calculateDeleteDate().isBefore(LocalDate.now());
|
||||||
buttonDelete.setDisable(!canBeDeleted);
|
buttonDelete.setDisable(!canBeDeleted);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,5 @@ CREATE TABLE treatment
|
||||||
remark TEXT NOT NULL,
|
remark TEXT NOT NULL,
|
||||||
isLocked BOOLEAN NOT NULL DEFAULT false,
|
isLocked BOOLEAN NOT NULL DEFAULT false,
|
||||||
FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE,
|
FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE SET NULL
|
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE CASCADE
|
||||||
)
|
)
|
Loading…
Reference in a new issue