Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c653005652 | ||
|
|
bee517317a | ||
|
|
2be9df6094 | ||
|
|
5faf61089a | ||
|
|
8e23124c6b | ||
|
|
78a27499a8 | ||
|
|
590049b9cf | ||
|
|
ad05e9e95a | ||
|
|
ceb448c1ff | ||
|
|
8c651aec2b | ||
|
|
56fac84e12 | ||
|
|
8b3a0c1570 | ||
|
|
516a185546 |
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to document bugs.
|
||||||
|
title: "[BUG]"
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Class / Methods**
|
||||||
|
List of classes or methods which contains the bug. (If known)
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Features to implement
|
||||||
|
title: "[FEATURE]"
|
||||||
|
labels: feature
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description of Usecase**
|
||||||
|
A clear and concise description of what the feature allows to do.
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**List of Classes and Methods to implement**
|
||||||
|
List all Classes and Methods which have to be implemented.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Tests
|
||||||
|
about: Tests to implement
|
||||||
|
title: "[TEST]"
|
||||||
|
labels: Tests
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Feature description**
|
||||||
|
A clear and concise description of the functionality which have to be tested.
|
||||||
|
|
||||||
|
**Test cases**
|
||||||
|
A list of cases which have to be tested.
|
||||||
|
|
||||||
|
**List of affected Classes and Methods**
|
||||||
|
A clear and concise list of the classes and methods which have to be tested.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
@@ -1,16 +1,34 @@
|
|||||||
package ch.zhaw.gartenverwaltung;
|
package ch.zhaw.gartenverwaltung;
|
||||||
|
|
||||||
|
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
|
||||||
|
import ch.zhaw.gartenverwaltung.io.HardinessZoneNotSetException;
|
||||||
|
import ch.zhaw.gartenverwaltung.plantList.PlantListModel;
|
||||||
|
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
|
||||||
import ch.zhaw.gartenverwaltung.types.Crop;
|
import ch.zhaw.gartenverwaltung.types.Crop;
|
||||||
|
import ch.zhaw.gartenverwaltung.types.Pest;
|
||||||
import ch.zhaw.gartenverwaltung.types.Plant;
|
import ch.zhaw.gartenverwaltung.types.Plant;
|
||||||
|
import ch.zhaw.gartenverwaltung.types.Task;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class CropDetailController {
|
public class CropDetailController {
|
||||||
private Crop crop = null;
|
private Crop crop = null;
|
||||||
private Plant plant = null;
|
private final PlantListModel plantListModel = new PlantListModel();
|
||||||
|
private final TaskListModel taskListModel = new TaskListModel();
|
||||||
|
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private ImageView imageView;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button area_button;
|
private Button area_button;
|
||||||
@@ -45,6 +63,9 @@ public class CropDetailController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Label spacing_label;
|
private Label spacing_label;
|
||||||
|
|
||||||
|
public CropDetailController() throws IOException {
|
||||||
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void editTaskList(ActionEvent event) {
|
void editTaskList(ActionEvent event) {
|
||||||
|
|
||||||
@@ -52,7 +73,8 @@ public class CropDetailController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void goBack(ActionEvent event) {
|
void goBack(ActionEvent event) {
|
||||||
|
Stage stage = (Stage) imageView.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
@@ -65,8 +87,46 @@ public class CropDetailController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlantFromCrop(Crop crop) {
|
public void setPlantFromCrop(Crop crop) throws HardinessZoneNotSetException, IOException {
|
||||||
this.crop = crop;
|
this.crop = crop;
|
||||||
this.plant = null;
|
Plant plant = plantListModel.getFilteredPlantListById(Config.getCurrentHardinessZone(), crop.getPlantId()).get(0);
|
||||||
|
cropName_label.setText(plant.name());
|
||||||
|
description_label.setText(plant.description());
|
||||||
|
light_label.setText(String.valueOf(plant.light()));
|
||||||
|
soil_label.setText(plant.soil());
|
||||||
|
spacing_label.setText(plant.spacing());
|
||||||
|
if (plant.image() != null) {
|
||||||
|
imageView.setImage(plant.image());
|
||||||
|
}
|
||||||
|
area_label.setText("");
|
||||||
|
location_label.setText("");
|
||||||
|
createTaskLists(crop);
|
||||||
|
createPestList(plant);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createTaskLists(Crop crop) throws IOException {
|
||||||
|
List<Task> taskList = taskListModel.getTaskListForCrop(crop.getCropId().get());
|
||||||
|
for (Task task : taskList) {
|
||||||
|
Label label = new Label(task.getDescription());
|
||||||
|
growthPhases_vbox.getChildren().add(label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createPestList(Plant plant) {
|
||||||
|
List<Pest> pests = plant.pests();
|
||||||
|
for (Pest pest : pests) {
|
||||||
|
Label label = new Label(pest.name() + ":");
|
||||||
|
label.setStyle("-fx-font-weight: bold");
|
||||||
|
HBox hBox = new HBox();
|
||||||
|
hBox.fillHeightProperty();
|
||||||
|
Label label1 = new Label(pest.description());
|
||||||
|
label1.setAlignment(Pos.TOP_LEFT);
|
||||||
|
label1.setWrapText(true);
|
||||||
|
label1.setMaxWidth(600);
|
||||||
|
label1.setMaxHeight(100);
|
||||||
|
Button button = new Button("Get Counter Measures");
|
||||||
|
hBox.getChildren().addAll(label1, button);
|
||||||
|
pests_vbox.getChildren().addAll(label, hBox);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import javafx.event.ActionEvent;
|
|||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
|
||||||
@@ -14,12 +13,15 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class MainFXMLController implements Initializable {
|
public class MainFXMLController implements Initializable {
|
||||||
/**
|
/**
|
||||||
* Caching the panes
|
* Caching the panes
|
||||||
*/
|
*/
|
||||||
private final Map<String, AnchorPane> panes = new HashMap<>();
|
private final Map<String, AnchorPane> panes = new HashMap<>();
|
||||||
|
private static final Logger LOG = Logger.getLogger(MainFXMLController.class.getName());
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button home_button;
|
private Button home_button;
|
||||||
@@ -100,7 +102,7 @@ public class MainFXMLController implements Initializable {
|
|||||||
loadPane("Home.fxml");
|
loadPane("Home.fxml");
|
||||||
styleChangeButton(home_button);
|
styleChangeButton(home_button);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
LOG.log(Level.SEVERE, "Failed to load FXML-Pane!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package ch.zhaw.gartenverwaltung;
|
package ch.zhaw.gartenverwaltung;
|
||||||
|
|
||||||
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
|
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
|
||||||
|
import ch.zhaw.gartenverwaltung.io.HardinessZoneNotSetException;
|
||||||
|
import ch.zhaw.gartenverwaltung.plantList.PlantListModel;
|
||||||
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
|
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
|
||||||
import ch.zhaw.gartenverwaltung.types.Crop;
|
import ch.zhaw.gartenverwaltung.types.Crop;
|
||||||
|
import ch.zhaw.gartenverwaltung.types.Plant;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
@@ -14,7 +17,9 @@ import javafx.scene.control.Alert;
|
|||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.ButtonType;
|
import javafx.scene.control.ButtonType;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
import javafx.scene.layout.Priority;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
@@ -27,6 +32,7 @@ public class MyPlantsController implements Initializable {
|
|||||||
MainFXMLController mainController;
|
MainFXMLController mainController;
|
||||||
private final TaskListModel taskListModel = new TaskListModel();
|
private final TaskListModel taskListModel = new TaskListModel();
|
||||||
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
|
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
|
||||||
|
private final PlantListModel plantListModel = new PlantListModel();
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private VBox myPlants_vbox;
|
private VBox myPlants_vbox;
|
||||||
@@ -41,10 +47,15 @@ public class MyPlantsController implements Initializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
|
//ToDo update, when new crops are added
|
||||||
|
try {
|
||||||
loadCropList();
|
loadCropList();
|
||||||
|
} catch (HardinessZoneNotSetException | IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadCropList() {
|
private void loadCropList() throws HardinessZoneNotSetException, IOException {
|
||||||
List<Crop> cropList = new LinkedList<>();
|
List<Crop> cropList = new LinkedList<>();
|
||||||
try {
|
try {
|
||||||
cropList = getCropList();
|
cropList = getCropList();
|
||||||
@@ -54,7 +65,7 @@ public class MyPlantsController implements Initializable {
|
|||||||
createPlantView(cropList);
|
createPlantView(cropList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPlantView(List<Crop> crops) {
|
private void createPlantView(List<Crop> crops) throws HardinessZoneNotSetException, IOException {
|
||||||
myPlants_vbox.getChildren().clear();
|
myPlants_vbox.getChildren().clear();
|
||||||
for(Crop crop : crops) {
|
for(Crop crop : crops) {
|
||||||
HBox hBox = createPlantView(crop);
|
HBox hBox = createPlantView(crop);
|
||||||
@@ -72,16 +83,27 @@ public class MyPlantsController implements Initializable {
|
|||||||
return cropList;
|
return cropList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HBox createPlantView(Crop crop) {
|
private HBox createPlantView(Crop crop) throws HardinessZoneNotSetException, IOException {
|
||||||
//ToDo add good design
|
//ToDo add better design
|
||||||
//ToDo get plant information from crop
|
Plant plant = plantListModel.getFilteredPlantListById(Config.getCurrentHardinessZone(), crop.getPlantId()).get(0);
|
||||||
HBox hBox = new HBox();
|
HBox hBox = new HBox(10);
|
||||||
Label label = new Label("Placeholder");
|
ImageView imageView = new ImageView();
|
||||||
|
imageView.setPreserveRatio(false);
|
||||||
|
imageView.setFitHeight(100);
|
||||||
|
imageView.setFitWidth(100);
|
||||||
|
imageView.maxHeight(100);
|
||||||
|
if (plant.image() != null) {
|
||||||
|
imageView.setImage(plant.image());
|
||||||
|
}
|
||||||
|
hBox.setMinHeight(100);
|
||||||
|
Label label = new Label(plant.name());
|
||||||
|
label.setMaxWidth(2000);
|
||||||
|
HBox.setHgrow(label, Priority.ALWAYS);
|
||||||
Button details = new Button("Details");
|
Button details = new Button("Details");
|
||||||
Button delete = new Button("delete");
|
Button delete = new Button("delete");
|
||||||
details.setOnAction(getGoToCropDetailEvent(crop));
|
details.setOnAction(getGoToCropDetailEvent(crop));
|
||||||
delete.setOnAction(getDeleteCropEvent(crop));
|
delete.setOnAction(getDeleteCropEvent(crop));
|
||||||
hBox.getChildren().addAll(label, details, delete);
|
hBox.getChildren().addAll(imageView, label, details, delete);
|
||||||
return hBox;
|
return hBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +122,7 @@ public class MyPlantsController implements Initializable {
|
|||||||
stage.initModality(Modality.APPLICATION_MODAL);
|
stage.initModality(Modality.APPLICATION_MODAL);
|
||||||
stage.setResizable(true);
|
stage.setResizable(true);
|
||||||
stage.showAndWait();
|
stage.showAndWait();
|
||||||
} catch (IOException e) {
|
} catch (IOException | HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,7 +136,7 @@ public class MyPlantsController implements Initializable {
|
|||||||
public void handle(ActionEvent event) {
|
public void handle(ActionEvent event) {
|
||||||
try {
|
try {
|
||||||
showConfirmation(crop);
|
showConfirmation(crop);
|
||||||
} catch (IOException e) {
|
} catch (IOException | HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +144,7 @@ public class MyPlantsController implements Initializable {
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showConfirmation(Crop crop) throws IOException {
|
private void showConfirmation(Crop crop) throws IOException, HardinessZoneNotSetException {
|
||||||
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||||
alert.setTitle("Delete Crop");
|
alert.setTitle("Delete Crop");
|
||||||
alert.setHeaderText("Are you sure want to delete this Crop?");
|
alert.setHeaderText("Are you sure want to delete this Crop?");
|
||||||
@@ -131,10 +153,8 @@ public class MyPlantsController implements Initializable {
|
|||||||
Optional<ButtonType> option = alert.showAndWait();
|
Optional<ButtonType> option = alert.showAndWait();
|
||||||
|
|
||||||
if (option.get() == ButtonType.OK) {
|
if (option.get() == ButtonType.OK) {
|
||||||
//ToDo uncomment, when error from JsonTaskDatabase.java loadTaskListFromFile() is fixed.
|
gardenplanmodel.removeCrop(crop);
|
||||||
//gardenplanmodel.removeCrop(crop);
|
|
||||||
loadCropList();
|
loadCropList();
|
||||||
System.out.println("Delete Crop");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package ch.zhaw.gartenverwaltung;
|
package ch.zhaw.gartenverwaltung;
|
||||||
|
|
||||||
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
|
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
|
||||||
|
import ch.zhaw.gartenverwaltung.io.HardinessZoneNotSetException;
|
||||||
|
import ch.zhaw.gartenverwaltung.plantList.PlantListModel;
|
||||||
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
|
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
|
||||||
import ch.zhaw.gartenverwaltung.types.Crop;
|
import ch.zhaw.gartenverwaltung.types.Crop;
|
||||||
import ch.zhaw.gartenverwaltung.types.Task;
|
import ch.zhaw.gartenverwaltung.types.Task;
|
||||||
@@ -28,6 +30,7 @@ public class MyScheduleController implements Initializable {
|
|||||||
private Crop selectedCrop = null;
|
private Crop selectedCrop = null;
|
||||||
private final TaskListModel taskListModel = new TaskListModel();
|
private final TaskListModel taskListModel = new TaskListModel();
|
||||||
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
|
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
|
||||||
|
private final PlantListModel plantListModel = new PlantListModel();
|
||||||
|
|
||||||
private final ListProperty<Crop> cropListProperty = new SimpleListProperty<>(FXCollections.observableArrayList());
|
private final ListProperty<Crop> cropListProperty = new SimpleListProperty<>(FXCollections.observableArrayList());
|
||||||
|
|
||||||
@@ -84,7 +87,6 @@ public class MyScheduleController implements Initializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
//ToDo method to load crop list
|
|
||||||
List<Crop> cropList;
|
List<Crop> cropList;
|
||||||
try {
|
try {
|
||||||
cropList = gardenplanmodel.getCrops();
|
cropList = gardenplanmodel.getCrops();
|
||||||
@@ -138,7 +140,11 @@ public class MyScheduleController implements Initializable {
|
|||||||
if (empty || crop == null) {
|
if (empty || crop == null) {
|
||||||
setText(null);
|
setText(null);
|
||||||
} else {
|
} else {
|
||||||
setText("placeholder");
|
try {
|
||||||
|
setText(plantListModel.getFilteredPlantListById(Config.getCurrentHardinessZone(), crop.getPlantId()).get(0).name());
|
||||||
|
} catch (HardinessZoneNotSetException | IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -146,11 +152,10 @@ public class MyScheduleController implements Initializable {
|
|||||||
|
|
||||||
private void loadTaskList() throws IOException {
|
private void loadTaskList() throws IOException {
|
||||||
List<List<Task>> taskLists = new LinkedList<>();
|
List<List<Task>> taskLists = new LinkedList<>();
|
||||||
//ToDo uncomment, when error from JsonTaskDatabase.java loadTaskListFromFile() is fixed.
|
|
||||||
if (selectedCrop != null) {
|
if (selectedCrop != null) {
|
||||||
//taskLists = taskListModel.getTasksUpcomingWeekForCrop(selectedCrop.getCropId().get());
|
taskLists = taskListModel.getTasksUpcomingWeekForCrop(selectedCrop.getCropId().get());
|
||||||
} else {
|
} else {
|
||||||
//taskLists = taskListModel.getTasksUpcomingWeek();
|
taskLists = taskListModel.getTasksUpcomingWeek();
|
||||||
}
|
}
|
||||||
if (!taskLists.isEmpty()) {
|
if (!taskLists.isEmpty()) {
|
||||||
viewTaskListOfDay(day1_pane, taskLists.get(0));
|
viewTaskListOfDay(day1_pane, taskLists.get(0));
|
||||||
@@ -167,7 +172,7 @@ public class MyScheduleController implements Initializable {
|
|||||||
//ToDo update pane with task list
|
//ToDo update pane with task list
|
||||||
VBox vBox = new VBox();
|
VBox vBox = new VBox();
|
||||||
for (Task task : tasks) {
|
for (Task task : tasks) {
|
||||||
Label label = new Label("placeholder");
|
Label label = new Label(task.getDescription());
|
||||||
vBox.getChildren().add(label);
|
vBox.getChildren().add(label);
|
||||||
}
|
}
|
||||||
pane.getChildren().add(vBox);
|
pane.getChildren().add(vBox);
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import ch.zhaw.gartenverwaltung.types.Plant;
|
|||||||
import ch.zhaw.gartenverwaltung.types.Seasons;
|
import ch.zhaw.gartenverwaltung.types.Seasons;
|
||||||
import javafx.beans.property.ListProperty;
|
import javafx.beans.property.ListProperty;
|
||||||
import javafx.beans.property.SimpleListProperty;
|
import javafx.beans.property.SimpleListProperty;
|
||||||
import javafx.beans.value.ChangeListener;
|
|
||||||
import javafx.beans.value.ObservableValue;
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
@@ -29,8 +27,11 @@ import java.net.URL;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class PlantsController implements Initializable {
|
public class PlantsController implements Initializable {
|
||||||
|
private static final Logger LOG = Logger.getLogger(PlantsController.class.getName());
|
||||||
private final PlantListModel plantListModel = new PlantListModel();
|
private final PlantListModel plantListModel = new PlantListModel();
|
||||||
private Plant selectedPlant = null;
|
private Plant selectedPlant = null;
|
||||||
private final HardinessZone DEFAULT_HARDINESS_ZONE = HardinessZone.ZONE_8A;
|
private final HardinessZone DEFAULT_HARDINESS_ZONE = HardinessZone.ZONE_8A;
|
||||||
@@ -98,8 +99,10 @@ public class PlantsController implements Initializable {
|
|||||||
lookForSelectedListEntry();
|
lookForSelectedListEntry();
|
||||||
try {
|
try {
|
||||||
viewFilteredListBySearch();
|
viewFilteredListBySearch();
|
||||||
} catch (HardinessZoneNotSetException | IOException e) {
|
} catch (HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
LOG.log(Level.WARNING, "Hardiness Zone not set!");
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.log(Level.WARNING, "Could not retrieve data!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +110,7 @@ public class PlantsController implements Initializable {
|
|||||||
* set text of list view to plant name
|
* set text of list view to plant name
|
||||||
*/
|
*/
|
||||||
private void setListCellFactory() {
|
private void setListCellFactory() {
|
||||||
list_plants.setCellFactory(param -> new ListCell<Plant>() {
|
list_plants.setCellFactory(param -> new ListCell<>() {
|
||||||
@Override
|
@Override
|
||||||
protected void updateItem(Plant plant, boolean empty) {
|
protected void updateItem(Plant plant, boolean empty) {
|
||||||
super.updateItem(plant, empty);
|
super.updateItem(plant, empty);
|
||||||
@@ -143,13 +146,15 @@ public class PlantsController implements Initializable {
|
|||||||
search_plants.textProperty().addListener((observable, oldValue, newValue) -> {
|
search_plants.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
if (newValue.isEmpty()) {
|
if (newValue.isEmpty()) {
|
||||||
fillPlantListWithHardinessZone();
|
fillPlantListWithHardinessZone();
|
||||||
}else {
|
} else {
|
||||||
try {
|
try {
|
||||||
List<Plant> filteredPlants = plantListModel.getFilteredPlantListByString(DEFAULT_HARDINESS_ZONE, newValue);
|
List<Plant> filteredPlants = plantListModel.getFilteredPlantListByString(DEFAULT_HARDINESS_ZONE, newValue);
|
||||||
clearListView();
|
clearListView();
|
||||||
plantListProperty.addAll(filteredPlants);
|
plantListProperty.addAll(filteredPlants);
|
||||||
} catch (HardinessZoneNotSetException | IOException e) {
|
} catch (HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
LOG.log(Level.WARNING, "Hardiness Zone not set!");
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.log(Level.WARNING, "Could not retrieve data!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -163,8 +168,10 @@ public class PlantsController implements Initializable {
|
|||||||
try {
|
try {
|
||||||
clearListView();
|
clearListView();
|
||||||
plantListProperty.addAll(plantListModel.getPlantList(plantListModel.getCurrentZone()));
|
plantListProperty.addAll(plantListModel.getPlantList(plantListModel.getCurrentZone()));
|
||||||
} catch (HardinessZoneNotSetException | IOException e) {
|
} catch (HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
LOG.log(Level.WARNING, "Hardiness Zone not set!");
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.log(Level.WARNING, "Could not retrieve data!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,12 +189,9 @@ public class PlantsController implements Initializable {
|
|||||||
if (zone.equals(DEFAULT_HARDINESS_ZONE)) {
|
if (zone.equals(DEFAULT_HARDINESS_ZONE)) {
|
||||||
radioButton.setSelected(true);
|
radioButton.setSelected(true);
|
||||||
}
|
}
|
||||||
radioButton.selectedProperty().addListener(new ChangeListener<Boolean>() {
|
radioButton.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
@Override
|
|
||||||
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
||||||
plantListModel.setCurrentZone(zone);
|
plantListModel.setCurrentZone(zone);
|
||||||
fillPlantListWithHardinessZone();
|
fillPlantListWithHardinessZone();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
climate_zones.getChildren().add(radioButton);
|
climate_zones.getChildren().add(radioButton);
|
||||||
}
|
}
|
||||||
@@ -207,20 +211,19 @@ public class PlantsController implements Initializable {
|
|||||||
if (season.equals(Seasons.AllSEASONS)) {
|
if (season.equals(Seasons.AllSEASONS)) {
|
||||||
radioButton.setSelected(true);
|
radioButton.setSelected(true);
|
||||||
}
|
}
|
||||||
radioButton.selectedProperty().addListener(new ChangeListener<Boolean>() {
|
radioButton.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
@Override
|
|
||||||
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
||||||
if (season.equals(Seasons.AllSEASONS)) {
|
if (season.equals(Seasons.AllSEASONS)) {
|
||||||
fillPlantListWithHardinessZone();
|
fillPlantListWithHardinessZone();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
viewFilteredListBySeason(season);
|
viewFilteredListBySeason(season);
|
||||||
} catch (HardinessZoneNotSetException | IOException e) {
|
} catch (HardinessZoneNotSetException e) {
|
||||||
e.printStackTrace();
|
LOG.log(Level.WARNING, "Hardiness Zone not set!");
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.log(Level.WARNING, "Could not retrieve data!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
seasons.getChildren().add(radioButton);
|
seasons.getChildren().add(radioButton);
|
||||||
}
|
}
|
||||||
@@ -237,27 +240,24 @@ public class PlantsController implements Initializable {
|
|||||||
selectSowDay_button.setDisable(true);
|
selectSowDay_button.setDisable(true);
|
||||||
Image img = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
Image img = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
||||||
img_plant.setImage(img);
|
img_plant.setImage(img);
|
||||||
list_plants.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Plant>() {
|
list_plants.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
@Override
|
|
||||||
public void changed(ObservableValue<? extends Plant> observable, Plant oldValue, Plant newValue) {
|
|
||||||
if(newValue != null) {
|
if(newValue != null) {
|
||||||
selectedPlant = newValue;
|
selectedPlant = newValue;
|
||||||
description_plant.setText(selectedPlant.description());
|
description_plant.setText(selectedPlant.description());
|
||||||
selectSowDay_button.setDisable(false);
|
selectSowDay_button.setDisable(false);
|
||||||
Image img;
|
Image img1;
|
||||||
if(selectedPlant.image() != null) {
|
if(selectedPlant.image() != null) {
|
||||||
img = selectedPlant.image();
|
img1 = selectedPlant.image();
|
||||||
} else {
|
} else {
|
||||||
img = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
img1 = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
||||||
}
|
}
|
||||||
img_plant.setImage(img);
|
img_plant.setImage(img1);
|
||||||
} else {
|
} else {
|
||||||
selectedPlant = null;
|
selectedPlant = null;
|
||||||
description_plant.setText("");
|
description_plant.setText("");
|
||||||
selectSowDay_button.setDisable(true);
|
selectSowDay_button.setDisable(true);
|
||||||
Image img = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
Image img1 = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
||||||
img_plant.setImage(img);
|
img_plant.setImage(img1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ public class SelectSowDayController implements Initializable {
|
|||||||
//ToDo method to get current lifecycle group in plant
|
//ToDo method to get current lifecycle group in plant
|
||||||
sowDate = selectedPlant.sowDateFromHarvestDate(datepicker.getValue(), 0);
|
sowDate = selectedPlant.sowDateFromHarvestDate(datepicker.getValue(), 0);
|
||||||
}
|
}
|
||||||
//ToDo uncomment, when error from JsonTaskDatabase.java loadTaskListFromFile() is fixed.
|
gardenplanmodel.plantAsCrop(selectedPlant, sowDate);
|
||||||
//gardenplanmodel.plantAsCrop(selectedPlant, sowDate);
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ public class JsonGardenPlan implements GardenPlan {
|
|||||||
.registerModule(new Jdk8Module())
|
.registerModule(new Jdk8Module())
|
||||||
.writeValue(new File(dataSource.toURI()), cropMap.values());
|
.writeValue(new File(dataSource.toURI()), cropMap.values());
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
// TODO: Log
|
|
||||||
throw new IOException(INVALID_DATASOURCE_MSG, e);
|
throw new IOException(INVALID_DATASOURCE_MSG, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,13 +16,12 @@ public class GrowthPhaseTypeDeserializer extends StdDeserializer<GrowthPhaseType
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GrowthPhaseType deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
public GrowthPhaseType deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
||||||
GrowthPhaseType result = null;
|
GrowthPhaseType result;
|
||||||
String token = parser.getText();
|
String token = parser.getText();
|
||||||
try {
|
try {
|
||||||
result = GrowthPhaseType.valueOf(token.toUpperCase());
|
result = GrowthPhaseType.valueOf(token.toUpperCase());
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// TODO: Log
|
throw new IOException(String.format("Bad growth phase type \"%s\"\n", token));
|
||||||
System.err.printf("Bad growth phase type \"%s\"\n", token);
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,13 +17,12 @@ public class HardinessZoneDeserializer extends StdDeserializer<HardinessZone> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HardinessZone deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
public HardinessZone deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
||||||
HardinessZone result = null;
|
HardinessZone result;
|
||||||
String token = parser.getText();
|
String token = parser.getText();
|
||||||
try {
|
try {
|
||||||
result = HardinessZone.valueOf(token.toUpperCase());
|
result = HardinessZone.valueOf(token.toUpperCase());
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// TODO: Log
|
throw new IOException(String.format("Unknown Hardiness Zone \"%s\"\n", token), e);
|
||||||
System.err.printf("Unknown Hardiness Zone \"%s\"\n", token);
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ public class PlantImageDeserializer extends JsonDeserializer<Image> {
|
|||||||
try (InputStream is = new FileInputStream(new File(imageUrl.toURI()))) {
|
try (InputStream is = new FileInputStream(new File(imageUrl.toURI()))) {
|
||||||
result = new Image(is);
|
result = new Image(is);
|
||||||
} catch (IllegalArgumentException | URISyntaxException e) {
|
} catch (IllegalArgumentException | URISyntaxException e) {
|
||||||
// TODO: Log
|
throw new IOException(String.format("Cannot find Image \"%s\"\n", imageUrl.getFile()));
|
||||||
e.printStackTrace();
|
|
||||||
System.err.printf("Cannot find Image \"%s\"\n", imageUrl.getFile());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -116,9 +116,10 @@ public class PlantListModel {
|
|||||||
if (searchString.length() == 0) {
|
if (searchString.length() == 0) {
|
||||||
return getPlantList(zone);
|
return getPlantList(zone);
|
||||||
} else if (searchString.charAt(0) == '#') {
|
} else if (searchString.charAt(0) == '#') {
|
||||||
try {
|
if (isPositiveIntegral(searchString.substring(1))) {
|
||||||
return getFilteredPlantListById(zone, Long.parseLong(searchString.substring(1)));
|
Long searchId = Long.parseLong(searchString.substring(1));
|
||||||
} catch (NumberFormatException e) {
|
return getFilteredPlantListById(zone, searchId);
|
||||||
|
} else {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -169,7 +170,6 @@ public class PlantListModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param zone selected hardiness zone
|
* @param zone selected hardiness zone
|
||||||
* @param from the earliest date to for the filter
|
* @param from the earliest date to for the filter
|
||||||
* @param to the lastest date for the filter
|
* @param to the lastest date for the filter
|
||||||
@@ -180,4 +180,14 @@ public class PlantListModel {
|
|||||||
public List<Plant> getFilteredPlantListBySaisonWithoutGrowthPhase(HardinessZone zone, MonthDay from, MonthDay to) throws HardinessZoneNotSetException, IOException {
|
public List<Plant> getFilteredPlantListBySaisonWithoutGrowthPhase(HardinessZone zone, MonthDay from, MonthDay to) throws HardinessZoneNotSetException, IOException {
|
||||||
return getFilteredPlantList(zone, plant -> plant.lifecycle().stream().anyMatch(growthPhase -> growthPhase.startDate().compareTo(from) >= 0 && (growthPhase.startDate().compareTo(to) <= 0)));
|
return getFilteredPlantList(zone, plant -> plant.lifecycle().stream().anyMatch(growthPhase -> growthPhase.startDate().compareTo(from) >= 0 && (growthPhase.startDate().compareTo(to) <= 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a string can safely be parsed as a positive Integral value (short/int/long)
|
||||||
|
*
|
||||||
|
* @param subject The string to be tested
|
||||||
|
* @return Whether the string contains only digits
|
||||||
|
*/
|
||||||
|
private boolean isPositiveIntegral(String subject) {
|
||||||
|
return subject != null && subject.matches("[0-9]+");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,10 @@ public class Task {
|
|||||||
* default constructor
|
* default constructor
|
||||||
* (used by Json deserializer)
|
* (used by Json deserializer)
|
||||||
*/
|
*/
|
||||||
public Task(long cropId){
|
public Task(){
|
||||||
name= "";
|
name= "";
|
||||||
description= "";
|
description= "";
|
||||||
startDate = LocalDate.now();
|
startDate = LocalDate.now();
|
||||||
this.cropId = cropId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task(String name, String description, LocalDate startDate, long cropId) {
|
public Task(String name, String description, LocalDate startDate, long cropId) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ module ch.zhaw.gartenverwaltung {
|
|||||||
requires com.fasterxml.jackson.databind;
|
requires com.fasterxml.jackson.databind;
|
||||||
requires com.fasterxml.jackson.datatype.jsr310;
|
requires com.fasterxml.jackson.datatype.jsr310;
|
||||||
requires com.fasterxml.jackson.datatype.jdk8;
|
requires com.fasterxml.jackson.datatype.jdk8;
|
||||||
|
requires java.logging;
|
||||||
|
|
||||||
opens ch.zhaw.gartenverwaltung to javafx.fxml;
|
opens ch.zhaw.gartenverwaltung to javafx.fxml;
|
||||||
opens ch.zhaw.gartenverwaltung.types to com.fasterxml.jackson.databind;
|
opens ch.zhaw.gartenverwaltung.types to com.fasterxml.jackson.databind;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
</Label>
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<ImageView fitHeight="300.0" fitWidth="300.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER" />
|
<ImageView fx:id="imageView" fitHeight="300.0" fitWidth="300.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Label text="Growth Phases:">
|
<Label text="Growth Phases:">
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="655.0" prefWidth="1175.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.MyPlantsController">
|
||||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="655.0" prefWidth="1175.0" xmlns="http://javafx.com/javafx/17"
|
|
||||||
xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.MyPlantsController">
|
|
||||||
<children>
|
<children>
|
||||||
<VBox layoutY="49.0" prefHeight="655.0" prefWidth="1175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<VBox layoutY="49.0" prefHeight="655.0" prefWidth="1175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<children>
|
<children>
|
||||||
@@ -21,7 +19,7 @@
|
|||||||
<Insets bottom="10.0" />
|
<Insets bottom="10.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<VBox fx:id="myPlants_vbox" prefHeight="200.0" prefWidth="100.0" VBox.vgrow="ALWAYS" />
|
<VBox fx:id="myPlants_vbox" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="100.0" VBox.vgrow="ALWAYS" />
|
||||||
<Button fx:id="addPlant_button" mnemonicParsing="false" onAction="#addPlant" prefHeight="45.0" prefWidth="155.0" text="Add new Plant">
|
<Button fx:id="addPlant_button" mnemonicParsing="false" onAction="#addPlant" prefHeight="45.0" prefWidth="155.0" text="Add new Plant">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets top="10.0" />
|
<Insets top="10.0" />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"startDate" : "2022-05-01",
|
"startDate" : "2022-05-01",
|
||||||
"endDate" : "2022-05-01",
|
"endDate" : "2022-05-01",
|
||||||
"interval" : 0,
|
"interval" : 0,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : 2,
|
"id" : 2,
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"startDate" : "2022-05-01",
|
"startDate" : "2022-05-01",
|
||||||
"endDate" : "2022-09-01",
|
"endDate" : "2022-09-01",
|
||||||
"interval" : 2,
|
"interval" : 2,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : 3,
|
"id" : 3,
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"startDate" : "2022-06-01",
|
"startDate" : "2022-06-01",
|
||||||
"endDate" : "2022-08-01",
|
"endDate" : "2022-08-01",
|
||||||
"interval" : 28,
|
"interval" : 28,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : 4,
|
"id" : 4,
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"startDate" : "2022-07-01",
|
"startDate" : "2022-07-01",
|
||||||
"endDate" : "2022-07-01",
|
"endDate" : "2022-07-01",
|
||||||
"interval" : 0,
|
"interval" : 0,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : 5,
|
"id" : 5,
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"startDate" : "2022-05-01",
|
"startDate" : "2022-05-01",
|
||||||
"endDate" : "2022-09-01",
|
"endDate" : "2022-09-01",
|
||||||
"interval" : 5,
|
"interval" : 5,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : 6,
|
"id" : 6,
|
||||||
@@ -51,6 +51,6 @@
|
|||||||
"startDate" : "2022-09-01",
|
"startDate" : "2022-09-01",
|
||||||
"endDate" : "2022-09-01",
|
"endDate" : "2022-09-01",
|
||||||
"interval" : 0,
|
"interval" : 0,
|
||||||
"cropID" : 0
|
"cropId" : 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user