From 88c8a30ad0fe788899c3a779d635f93b8f2c5f99 Mon Sep 17 00:00:00 2001 From: Marc Beyer Date: Tue, 8 Feb 2022 08:50:34 +0100 Subject: [PATCH 1/2] Refactor --- client/app/src/main/java/main/MainApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/src/main/java/main/MainApplication.java b/client/app/src/main/java/main/MainApplication.java index 0ecfff9..7cc4ba0 100644 --- a/client/app/src/main/java/main/MainApplication.java +++ b/client/app/src/main/java/main/MainApplication.java @@ -55,7 +55,7 @@ public class MainApplication extends Application { scene.getStylesheets().add(Objects.requireNonNull( MainApplication.class.getResource("main-view.css")).toExternalForm() ); - stage.setTitle("SharePlaner"); + stage.setTitle("SharePlanner"); stage.setScene(scene); stage.show(); } From 05229080010d4162c812903bb82b2ddefd265abf Mon Sep 17 00:00:00 2001 From: Marc Beyer Date: Wed, 9 Feb 2022 13:45:12 +0100 Subject: [PATCH 2/2] Fixed edit-event --- .../main/java/events/CreateEventController.java | 8 ++++---- .../src/main/java/events/EditEventController.java | 14 +++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/client/app/src/main/java/events/CreateEventController.java b/client/app/src/main/java/events/CreateEventController.java index 0388faf..bbfa90e 100644 --- a/client/app/src/main/java/events/CreateEventController.java +++ b/client/app/src/main/java/events/CreateEventController.java @@ -28,15 +28,15 @@ public class CreateEventController { @FXML protected JFXComboBox comboBoxPriority; @FXML - private JFXToggleButton toggleBtnIsFullDay; + protected JFXToggleButton toggleBtnIsFullDay; @FXML - private JFXToggleButton toggleBtnIsPrivate; + protected JFXToggleButton toggleBtnIsPrivate; @FXML private Label labelError; @FXML - private JFXTimePicker timeStart; + protected JFXTimePicker timeStart; @FXML - private JFXTimePicker timeEnd; + protected JFXTimePicker timeEnd; public CreateEventController() { diff --git a/client/app/src/main/java/events/EditEventController.java b/client/app/src/main/java/events/EditEventController.java index e813221..6c448f6 100644 --- a/client/app/src/main/java/events/EditEventController.java +++ b/client/app/src/main/java/events/EditEventController.java @@ -4,6 +4,8 @@ import helper.HttpRequestException; import container.DataController; import container.Event; +import java.time.LocalTime; + public class EditEventController extends CreateEventController{ private Event currentEvent; @@ -19,7 +21,17 @@ public class EditEventController extends CreateEventController{ datePickerDate.setValue(currentEvent.getDate().toLocalDate()); comboBoxPriority.getSelectionModel().select(currentEvent.getPriority()); - //timeEnd.setValue(currentEvent.getEnd()); + try{ + timeStart.setValue(LocalTime.parse(currentEvent.getStart())); + }catch (Exception e){} + + + try{ + timeEnd.setValue(LocalTime.parse(currentEvent.getEnd())); + }catch (Exception e){} + + toggleBtnIsFullDay.setSelected(currentEvent.isFullDay()); + toggleBtnIsPrivate.setSelected(currentEvent.isPrivate()); } @Override