diff --git a/README.md b/README.md index df57719..87cc6a7 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,6 @@ Run `maven install` ([Intellij](https://www.jetbrains.com/help/idea/2016.3/getti **Checkstyle**: Run `maven site` -# Daan Sneep (4849515, dsneep) - -![My Picture](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/Pictures%20Group%20Members/Daan_Sneep.png "The one and only") - -## Personal Development Plan - -My Core Quadrant is visible ![here](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/Pictures%20Group%20Members/Daan_Sneep_PDP_Core_Quadrant.PNG) - -### G – Goal -After completing this project, I want to be able to work on a programming project efficiently with other people. I have never attempted anything of this scale and find that it is a core requirement of becoming a good programmer, as in most companies programming is done within teams, not alone. - -### R – Reality -With this project I hope to work towards this goal. I have never programmed as a team on this scale, so this project will be the first step towards my goal. - -### O – Options -During this quarter the project will be my only option towards achieving this goal. If I am unhappy with my progress towards my goal by the end of this quarter, I must try to implement the same structure of teamwork in my next projects, and try to learn from the mistakes I made when working as a team in this project. - -### W – Will -I will try to make sure to adhere to the structure we establish as a group which describes how we will work together. This way, we all do the work we are supposed to do, and none of us will be overloaded with work. I will also try to make use of all the tools available to us which can improve the quality of programming together (scrum, git, GitLab etc.). - # Merel Steenbergen (masteenbergen) ![Picture:](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/Pictures%20Group%20Members/Merel_Steenbergen.jpg) @@ -55,10 +35,10 @@ Actively watching myself and letting my teammates know that they need to be clea I’m just going to keep working on myself and hope my teammates will work with me. It also helps to work in different teams to get a much more diverse experience. Every team is different, so I’m just going to wait what this team will bring me and how I will have to adjust myself to make the team efficient. # Sem van der Hoeven (4896726, semvanderhoeve) -![Picture location](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/Pictures%20Group%20Members/sem_van_der_hoeven.jpg) +![Picture location](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/doc/Pictures%20Group%20Members/sem_van_der_hoeven.jpg) ## Personal development plan -![Core quadrant location](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/Pictures%20Group%20Members/sem_van_der_hoeven_core_quadrant.png) +![Core quadrant location](https://gitlab.ewi.tudelft.nl/cse1105/2018-2019/oopp-group-43/template/blob/master/doc/Pictures%20Group%20Members/sem_van_der_hoeven_core_quadrant.png) ### G - Goal My goal with this project is most of all to be able to efficiently work with a group of people. This is important to me because I have not worked on a (development) project with a (big) group of people before. I believe I have succeeded in this goal when our project is finished and we have got a passing grade. diff --git a/doc/Pictures Group Members/Daan_Sneep.png b/doc/Pictures Group Members/Daan_Sneep.png deleted file mode 100644 index 623c64e..0000000 Binary files a/doc/Pictures Group Members/Daan_Sneep.png and /dev/null differ diff --git a/doc/Pictures Group Members/Daan_Sneep_PDP_Core_Quadrant.PNG b/doc/Pictures Group Members/Daan_Sneep_PDP_Core_Quadrant.PNG deleted file mode 100644 index c747447..0000000 Binary files a/doc/Pictures Group Members/Daan_Sneep_PDP_Core_Quadrant.PNG and /dev/null differ diff --git a/doc/Pictures Group Members/KristinPeneva.jpg b/doc/Pictures Group Members/KristinPeneva.jpg deleted file mode 100644 index ab2c35d..0000000 Binary files a/doc/Pictures Group Members/KristinPeneva.jpg and /dev/null differ diff --git a/doc/Pictures Group Members/corequadrant-KP.png b/doc/Pictures Group Members/corequadrant-KP.png deleted file mode 100644 index 2e7b84b..0000000 Binary files a/doc/Pictures Group Members/corequadrant-KP.png and /dev/null differ diff --git a/doc/meetings/week1/20190218_agenda.md b/doc/meetings/week2/20190218_agenda.md similarity index 100% rename from doc/meetings/week1/20190218_agenda.md rename to doc/meetings/week2/20190218_agenda.md diff --git a/doc/meetings/week1/20190218_notes.pdf b/doc/meetings/week2/20190218_notes.pdf similarity index 100% rename from doc/meetings/week1/20190218_notes.pdf rename to doc/meetings/week2/20190218_notes.pdf diff --git a/doc/meetings/week2/20190225_agenda.md b/doc/meetings/week3/20190225_agenda.md similarity index 100% rename from doc/meetings/week2/20190225_agenda.md rename to doc/meetings/week3/20190225_agenda.md diff --git a/doc/meetings/week2/20190225_notes.pdf b/doc/meetings/week3/20190225_notes.pdf similarity index 100% rename from doc/meetings/week2/20190225_notes.pdf rename to doc/meetings/week3/20190225_notes.pdf diff --git a/doc/meetings/week3/20190304_agenda.md b/doc/meetings/week4/20190304_agenda.md similarity index 100% rename from doc/meetings/week3/20190304_agenda.md rename to doc/meetings/week4/20190304_agenda.md diff --git a/doc/meetings/week3/20190304_notes.pdf b/doc/meetings/week4/20190304_notes.pdf similarity index 100% rename from doc/meetings/week3/20190304_notes.pdf rename to doc/meetings/week4/20190304_notes.pdf diff --git a/doc/meetings/week6/20190318_notes.pdf b/doc/meetings/week6/20190318_notes.pdf new file mode 100644 index 0000000..7a89fa5 Binary files /dev/null and b/doc/meetings/week6/20190318_notes.pdf differ diff --git a/doc/meetings/week7/20190325_agenda.md b/doc/meetings/week7/20190325_agenda.md index 519d2eb..336d28b 100644 --- a/doc/meetings/week7/20190325_agenda.md +++ b/doc/meetings/week7/20190325_agenda.md @@ -4,11 +4,11 @@ > Check if everyone is present: - ~~Nivard Jansen~~ - ~~Kristin Peneva~~ -- [ ] Daan Sneep -- [ ] Merel SteenBergen -- [ ] Ceren Ugurlu -- [ ] Mika Wauben -- [ ] Sem van der Hoeven +- ~~Daan Sneep~~ +- [x] Merel SteenBergen +- [x] Ceren Ugurlu +- [x] Mika Wauben +- [x] Sem van der Hoeven - Chair: Sem van der Hoeven - Secretary: Merel Steenbergen diff --git a/doc/meetings/week7/20190325_notes.pdf b/doc/meetings/week7/20190325_notes.pdf new file mode 100644 index 0000000..35d20a4 Binary files /dev/null and b/doc/meetings/week7/20190325_notes.pdf differ diff --git a/doc/reports/checkstyle/20190325_checkstyle.jpg b/doc/reports/checkstyle/20190325_checkstyle.jpg new file mode 100644 index 0000000..54dcac9 Binary files /dev/null and b/doc/reports/checkstyle/20190325_checkstyle.jpg differ diff --git a/doc/reports/coverage/20190325_coverage.png b/doc/reports/coverage/20190325_coverage.png new file mode 100644 index 0000000..60dc619 Binary files /dev/null and b/doc/reports/coverage/20190325_coverage.png differ diff --git a/doc/reports/sprint-reviews/20190325_sprint_review.md b/doc/reports/sprint-reviews/20190325_sprint_review.md new file mode 100644 index 0000000..beb30eb --- /dev/null +++ b/doc/reports/sprint-reviews/20190325_sprint_review.md @@ -0,0 +1,13 @@ + +# Sprint Review + +## Main problems Encountered + +### Problem 1: Database won't grow +It is difficult to add new columns to the database, but together we will fix this problem. + +## Adjustments from previous sprints +We're doing great with starting on time for the demo. + +## Adjustments for next sprint + - Speficy tasks a bit more, that way they are easier to follow diff --git a/doc/sprints/sprint4/20190325_scrumboard.png b/doc/sprints/sprint4/20190325_scrumboard.png new file mode 100644 index 0000000..c390314 Binary files /dev/null and b/doc/sprints/sprint4/20190325_scrumboard.png differ diff --git a/doc/sprints/sprint4/retrospective_sprint4.pdf b/doc/sprints/sprint4/retrospective_sprint4.pdf new file mode 100644 index 0000000..646c413 Binary files /dev/null and b/doc/sprints/sprint4/retrospective_sprint4.pdf differ diff --git a/doc/sprints/sprint5/.gitkeep b/doc/sprints/sprint5/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/sprints/sprint5/backlog_sprint5.pdf b/doc/sprints/sprint5/backlog_sprint5.pdf new file mode 100644 index 0000000..7fa4f4a Binary files /dev/null and b/doc/sprints/sprint5/backlog_sprint5.pdf differ diff --git a/src/Client/src/main/java/greenify/client/Application.java b/src/Client/src/main/java/greenify/client/Application.java index a8e7d4f..29afbe3 100644 --- a/src/Client/src/main/java/greenify/client/Application.java +++ b/src/Client/src/main/java/greenify/client/Application.java @@ -12,15 +12,11 @@ import org.springframework.context.ConfigurableApplicationContext; import java.io.IOException; -//springbootApplication is so Spring knows that this is a Spring application @SpringBootApplication public class Application extends javafx.application.Application { - //configurable application is for spring so it knows that it can use it private static ConfigurableApplicationContext springContext; - //logger to log all the things that happen to the console private static final Logger log = LoggerFactory.getLogger(Application.class); - //launch is to launch the GUI things public static void main(String[] args) { launch(args); } @@ -29,10 +25,8 @@ public class Application extends javafx.application.Application { * This method takes an url and return a parent. * @param url which is being loaded. * @return parent object. - * @throws IOException if it can't find an FXML file */ public static Parent load(java.net.URL url) throws IOException { - //loader to load the FXML file FXMLLoader loader = new FXMLLoader(); loader.setControllerFactory(springContext::getBean); loader.setLocation(url); @@ -41,22 +35,14 @@ public class Application extends javafx.application.Application { @Override public void init() throws Exception { - //run the application springContext = SpringApplication.run(Application.class); } @Override public void start(Stage primaryStage) throws Exception { - //load the fxml file - Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/sample.fxml")); - //set the title for the window + Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/LoginWindow.fxml")); primaryStage.setTitle("Greenify"); - //set the scene Scene scene = new Scene(rootNode); - //add the stylesheet - scene.getStylesheets() - .add(getClass().getClassLoader().getResource("stylesheets/LoginWindowStyle.css") - .toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } diff --git a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java index 6157982..80918bd 100644 --- a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java +++ b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java @@ -121,11 +121,7 @@ public class DashBoardController { * @param event the event (clicking the button) */ public void displayActivities(ActionEvent event) { - - addFadeTransition(activitiesPane); - - net = userService.currentUser.getVeganMeal() + count; totalVeganMealCounter.setText("" + net); System.out.println("display activities"); dashboardPane.setVisible(false); @@ -157,23 +153,6 @@ public class DashBoardController { friendsPane.setVisible(true); } - - /** - * adds a vegetarian meal. - * @param event the event (clicking the button) - */ - public void addVeganMeal(ActionEvent event) { - - count++; - net = userService.currentUser.getVeganMeal() + count; - totalVeganMealCounter.setText("" + net); - veganMealCounter.setText("" + count); - System.out.println(userService); - userService.addVeganMeal(userService.currentUser.getId(), - userService.currentUser.getName()); - System.out.println("Vegetarian meal is added"); - } - //sets the slide in transition for startup public void addSlideTransition(Node node, Line path1) { PathTransition pathTrans = new PathTransition(Duration.millis(1100), path1, node); diff --git a/src/Client/src/main/java/greenify/client/controller/UserController.java b/src/Client/src/main/java/greenify/client/controller/UserController.java index abb387d..fc0f097 100644 --- a/src/Client/src/main/java/greenify/client/controller/UserController.java +++ b/src/Client/src/main/java/greenify/client/controller/UserController.java @@ -82,7 +82,7 @@ public class UserController { public void openDashboard() throws IOException { //load the fxml file Parent dash = Application.load(this.getClass().getClassLoader() - .getResource("fxml/dashboard.fxml")); + .getResource("fxml/dashboard.fxml")); Scene scene = new Scene(dash); //add the stylesheet for the CSS scene.getStylesheets().add(getClass().getClassLoader() diff --git a/src/Client/src/main/java/greenify/client/rest/UserService.java b/src/Client/src/main/java/greenify/client/rest/UserService.java index ced0ec2..c993e2d 100644 --- a/src/Client/src/main/java/greenify/client/rest/UserService.java +++ b/src/Client/src/main/java/greenify/client/rest/UserService.java @@ -80,27 +80,18 @@ public class UserService { return result; } - /** - * a user adds vegan meal. - * @param id the id of the user - * @param name the username of the user - * @return a userDTO - */ @SuppressWarnings("Duplicates") - public UserDto addVeganMeal(Long id, String name) { - //this method is almost the same as the registerUser one, but with a different link + public String updateInput(String name, String inputName, String value) { HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); - UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/addVeganMeal") - .queryParam("id", id) - .queryParam("name", name); + UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/setInput") + .queryParam("name", name) + .queryParam("inputName", inputName) + .queryParam("value",value); HttpEntity entity = new HttpEntity<>(headers); System.out.println(builder.build().encode().toUri()); - return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDto.class); - } - - @RequestMapping("/userData") - public int getVeganData(@RequestParam(value = "veganMeal") int veganMeal) { - return veganMeal; + String result = this.restTemplate.getForObject(builder.build() + .encode().toUri(), String.class); + return result; } } diff --git a/src/Client/src/main/resources/fxml/sample.fxml b/src/Client/src/main/resources/fxml/LoginWindow.fxml similarity index 96% rename from src/Client/src/main/resources/fxml/sample.fxml rename to src/Client/src/main/resources/fxml/LoginWindow.fxml index 96027de..03a3902 100644 --- a/src/Client/src/main/resources/fxml/sample.fxml +++ b/src/Client/src/main/resources/fxml/LoginWindow.fxml @@ -1,14 +1,10 @@ - - - - @@ -36,3 +32,4 @@ + diff --git a/src/Client/src/main/resources/fxml/RegisterWindow.fxml b/src/Client/src/main/resources/fxml/RegisterWindow.fxml index 35bff80..9daeb7f 100644 --- a/src/Client/src/main/resources/fxml/RegisterWindow.fxml +++ b/src/Client/src/main/resources/fxml/RegisterWindow.fxml @@ -1,21 +1,14 @@ - - - - - - - - + diff --git a/src/Client/src/main/resources/fxml/dashboard.fxml b/src/Client/src/main/resources/fxml/dashboard.fxml index 3f76040..a06f56e 100644 --- a/src/Client/src/main/resources/fxml/dashboard.fxml +++ b/src/Client/src/main/resources/fxml/dashboard.fxml @@ -7,17 +7,6 @@ - - - - - - - - - - - @@ -62,7 +51,7 @@ -