diff --git a/.gitignore b/.gitignore index 0866f9be3..7930f3799 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,9 @@ target/* /target _site/ .DS_Store +.log +.editorconfig +.springBeans +Servers +.metadata +bin diff --git a/pom.xml b/pom.xml index 90d1f9570..6010d2c56 100644 --- a/pom.xml +++ b/pom.xml @@ -4,15 +4,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.springframework.samples - spring-petclinic - 1.5.1 + kidclinic + mvp org.springframework.boot spring-boot-starter-parent 1.5.1.RELEASE - petclinic + kidclinic diff --git a/readme.md b/readme.md index 52b4dc0fd..9e3971642 100644 --- a/readme.md +++ b/readme.md @@ -17,6 +17,9 @@ The purpose of KidClinic is to simulate the building of an enterprise applicatio - [x] View current list of doctors and their specialities - [x] Search through database of parents +### Adding parents and children +When viewing the parents page, users have an option of searching the parents database or adding a parent. Once a parent is chosen or added, a child can be added to that parent. + ## Upcoming Additions | Addition | Stage of Development | Expected Development Time | Lead | | :-------- | :-------------------- | :------------------------- | :--- | @@ -26,6 +29,18 @@ The purpose of KidClinic is to simulate the building of an enterprise applicatio | Add reviews section for doctors | Development | Short Term | Sasank | | Calendar Scheduling | Research | Long Term | Sasank | +### Login System +THe login system is meant to create three different views for users. There will be three categories of users: parents, nurses, and doctors. Each must login to view certain aspects of the website. Without the login system, the all the information of the parents is viewable without any security. + +#### How to incorporate the login system +In order to create a login system, we need to create a subfolder for the login controller. This follows [DoctorController.java](/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java) for the methods. + +### Reviews section for Doctors +The reviews section is meant to show the location of the doctors and include a view reviews for each doctor. + +#### How to incorporate the reviews +In order the create the reviews section, we must create a controller similar to [DoctorController.java](/src/main/java/org/springframework/samples/kidclinic/doctor/DoctorController.java). Then we need to add some reviews to the database as well as locations of each doctor. Then, using [Thymeleaf](http://www.thymeleaf.org/), we can display this information in [reviews.html](/src/main/resources/templates/reviews.html). + ## Contact If you are interested in the development of this app, you can contact any of the developers. You can reach us at diff --git a/src/main/java/org/springframework/samples/kidclinic/reviews/ReviewsController.java b/src/main/java/org/springframework/samples/kidclinic/reviews/ReviewsController.java new file mode 100644 index 000000000..dac61a53c --- /dev/null +++ b/src/main/java/org/springframework/samples/kidclinic/reviews/ReviewsController.java @@ -0,0 +1,45 @@ +/* + * Copyright 2002-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.kidclinic.reviews; + +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @author Juergen Hoeller + * @author Mark Fisher + * @author Ken Krebs + * @author Arjen Poutsma + */ +@Controller +class ReviewsController { + + @Autowired + public ReviewsController() { + } + + @RequestMapping(value = { "/reviews.html" }) + public String showReviews(Map model) { + // Here we are returning an object of type 'Doctors' rather than a collection of Doctor + // objects so it is simpler for Object-Xml mapping + return "reviews"; + } + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f5b0385e9..552190153 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -24,3 +24,5 @@ logging.level.org.springframework=INFO # Active Spring profiles spring.profiles.active=production + +# Port diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index e1fccafaf..0d59e7d8d 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -12,6 +12,7 @@ Presenting... :: Built with Spring Boot :: ${spring-boot.version} +:: Made with ♥ by the 2017 GlowTouch Technologies Interns :: Enjoy... diff --git a/src/main/resources/templates/welcome.html b/src/main/resources/templates/welcome.html index 9a1e36920..a607178e1 100644 --- a/src/main/resources/templates/welcome.html +++ b/src/main/resources/templates/welcome.html @@ -2,32 +2,23 @@ - - - - + + + + + + + - - - - - - - - - - - - - +