quick fix task end date can not be null + test data

This commit is contained in:
giavaphi
2022-11-27 21:56:12 +01:00
parent aedcfe2be9
commit 2ec37114de
3 changed files with 83 additions and 1 deletions
@@ -135,6 +135,7 @@ public class TaskFormularController implements Initializable {
});
button.disableProperty().bind(start_datePicker.valueProperty().isNull()
.or(end_datePicker.valueProperty().isNull())
.or(taskName_field.textProperty().isEmpty())
.or(description_area.textProperty().isEmpty()));
}
@@ -42,7 +42,7 @@ public class TaskTemplate {
}
public Task generateTask(LocalDate realStartDate, long cropId) {
LocalDate endDate = relativeEndDate != null ? realStartDate.plusDays(relativeEndDate) : null;
LocalDate endDate = relativeEndDate != null ? realStartDate.plusDays(relativeEndDate) : realStartDate.plusDays(0);
if (interval == null) {
this.interval = 0;