Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/development'
Browse files Browse the repository at this point in the history
Conflicts:
	.idea/libraries/com_github_warmuuh_libsass_maven_plugin_0_2_5_libsass_3_3_6.xml
	.idea/libraries/org_apache_maven_plugins_maven_resources_plugin_3_0_2.xml
	.idea/libraries/org_springframework_boot_spring_boot_devtools_1_4_3_RELEASE.xml
	.idea/workspace.xml
  • Loading branch information
mtenrero committed Feb 16, 2017
2 parents 5b07970 + ee8840c commit 4592364
Show file tree
Hide file tree
Showing 118 changed files with 3,324 additions and 7,215 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ fabric.properties
# modules.xml
# .idea/misc.xml
# *.ipr

vetmanager\.iml

src/main/resources/public/resources/styles/

\.idea/webContexts\.xml
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,335 changes: 1,029 additions & 306 deletions .idea/workspace.xml

Large diffs are not rendered by default.

49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VetManager®: Cloud Veterinary Management

----------

![Development build status](http://52.232.105.28:8080/buildStatus/icon?job=Build%20development%20branch)
![Screenshots](readmeFiles/walking.gif)

**Welcome to VetManager®!**
VetManager® is a service which allows you to manage your veterinary practice easily. You can have an ordered storage with all things that matters: clients, pets, inventory, appointments, diagnoses…
Expand Down Expand Up @@ -98,3 +98,50 @@ Contributors
- Jesús Guitérrez López ([@Was17](https://github.com/Was17))

Our Trello dashboard: https://trello.com/b/d1yQOm1i/dad-development

Fase 2
===================


Page information
----------------
**Index:** Home page of the applicationand only public page. You can access or create a user besides you can consult relevant information about the veterinary clinic.

**Dashboard:** Main window of the private part with addresses to the four main windows

**Client:** Page to consult all veterinary clients

**Add client:** Page to add a new customer

**Client information:** Page for detailed customer information

**Pet:** Page to consult all veterinary pets

**Add Pet:** Page to add a new pet

**Pet information:** Page for detailed pet information

**Appointments:** Window in which you can see the appointments corresponding to a day, with the data of the mascot and owner. The type of visit is characterized by the color of the business card.

**Appointments information:** Page showing details of the appointment

**Inventory:** Page to consult all veterinary items

**Add Item:** Page to add a new item

**Item information:** Page for detailed item information

**Settings:** Page to edit basic settings



Navigation chart
----------------

UML
---
![UML](/readmeFiles/UML.png)

Entity relationship
-------------------
![E/R](/readmeFiles/eer.png)
Binary file added lib/aether-api-0.9.0.M2.jar
Binary file not shown.
Binary file added lib/aether-api-1.7.jar
Binary file not shown.
Binary file added lib/aether-impl-0.9.0.M2.jar
Binary file not shown.
Binary file added lib/aether-impl-1.7.jar
Binary file not shown.
Binary file added lib/aether-spi-0.9.0.M2.jar
Binary file not shown.
Binary file added lib/aether-spi-1.7.jar
Binary file not shown.
Binary file added lib/aether-util-0.9.0.M2.jar
Binary file not shown.
Binary file added lib/aether-util-1.7.jar
Binary file not shown.
Binary file added lib/aopalliance-1.0.jar
Binary file not shown.
Binary file added lib/cdi-api-1.0.jar
Binary file not shown.
Binary file added lib/commons-io-2.5.jar
Binary file not shown.
Binary file added lib/commons-lang3-3.4.jar
Binary file not shown.
Binary file added lib/guava-10.0.1.jar
Binary file not shown.
Binary file added lib/javax.inject-1.jar
Binary file not shown.
Binary file added lib/jsass-5.3.0.jar
Binary file not shown.
Binary file added lib/jsr250-api-1.0.jar
Binary file not shown.
Binary file added lib/jsr305-1.3.9.jar
Binary file not shown.
Binary file added lib/jsr305-2.0.1.jar
Binary file not shown.
Binary file added lib/libsass-maven-plugin-0.2.5-libsass_3.3.6.jar
Binary file not shown.
Binary file added lib/maven-aether-provider-3.0.jar
Binary file not shown.
Binary file added lib/maven-aether-provider-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-artifact-3.0.jar
Binary file not shown.
Binary file added lib/maven-artifact-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-core-3.0.jar
Binary file not shown.
Binary file added lib/maven-core-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-filtering-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-model-3.0.jar
Binary file not shown.
Binary file added lib/maven-model-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-model-builder-3.0.jar
Binary file not shown.
Binary file added lib/maven-model-builder-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-plugin-annotations-3.4.jar
Binary file not shown.
Binary file added lib/maven-plugin-api-3.0.jar
Binary file not shown.
Binary file added lib/maven-plugin-api-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-repository-metadata-3.0.jar
Binary file not shown.
Binary file added lib/maven-repository-metadata-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-resources-plugin-3.0.2.jar
Binary file not shown.
Binary file added lib/maven-settings-3.0.jar
Binary file not shown.
Binary file added lib/maven-settings-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-settings-builder-3.0.jar
Binary file not shown.
Binary file added lib/maven-settings-builder-3.1.1.jar
Binary file not shown.
Binary file added lib/maven-shared-utils-3.0.0.jar
Binary file not shown.
Binary file added lib/org.eclipse.sisu.inject-0.0.0.M5.jar
Binary file not shown.
Binary file added lib/org.eclipse.sisu.plexus-0.0.0.M5.jar
Binary file not shown.
Binary file added lib/plexus-build-api-0.0.7.jar
Binary file not shown.
Binary file added lib/plexus-cipher-1.4.jar
Binary file not shown.
Binary file added lib/plexus-classworlds-2.2.3.jar
Binary file not shown.
Binary file added lib/plexus-classworlds-2.5.1.jar
Binary file not shown.
Binary file added lib/plexus-component-annotations-1.5.5.jar
Binary file not shown.
Binary file added lib/plexus-interpolation-1.19.jar
Binary file not shown.
Binary file added lib/plexus-interpolation-1.24.jar
Binary file not shown.
Binary file added lib/plexus-sec-dispatcher-1.3.jar
Binary file not shown.
Binary file added lib/plexus-utils-3.0.15.jar
Binary file not shown.
Binary file added lib/plexus-utils-3.0.24.jar
Binary file not shown.
Binary file added lib/sisu-guice-2.1.7-noaop.jar
Binary file not shown.
Binary file added lib/sisu-guice-3.1.0-no_aop.jar
Binary file not shown.
Binary file added lib/sisu-inject-bean-1.4.2.jar
Binary file not shown.
Binary file added lib/sisu-inject-plexus-1.4.2.jar
Binary file not shown.
Binary file added lib/slf4j-api-1.7.21.jar
Binary file not shown.
183 changes: 101 additions & 82 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,93 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>es.urjc.etsii.mtenrero</groupId>
<artifactId>vetmanager</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>es.urjc.etsii.mtenrero</groupId>
<artifactId>vetmanager</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>vetmanager</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<name>vetmanager</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mustache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mustache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>

<build>
<plugins>
<plugin>
<groupId>com.github.warmuuh</groupId>
<artifactId>libsass-maven-plugin</artifactId>
<version>0.2.6-libsass_3.4.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<inputPath>${basedir}/src/main/sass</inputPath>
<outputPath>src/main/resources/public/resources/styles</outputPath>
<includePath>${basedir}/src/main/sass/components/</includePath>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.warmuuh</groupId>
<artifactId>libsass-maven-plugin</artifactId>
<version>0.2.6-libsass_3.4.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<inputPath>${basedir}/src/main/sass</inputPath>
<outputPath>src/main/resources/public/resources/styles</outputPath>
<includePath>${basedir}/src/main/sass/components/</includePath>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


</project>
Binary file added readmeFiles/UML.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readmeFiles/eer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readmeFiles/walking.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,20 +1,70 @@
package es.urjc.etsii.mtenrero.Controllers;

import es.urjc.etsii.mtenrero.Entities.Client;
import es.urjc.etsii.mtenrero.Entities.Pet;
import es.urjc.etsii.mtenrero.Entities.Appointment;
import es.urjc.etsii.mtenrero.Entities.Pet_Breed;
import es.urjc.etsii.mtenrero.Repositories.AppointmentRepository;
import es.urjc.etsii.mtenrero.Repositories.ClientRepository;
import es.urjc.etsii.mtenrero.Repositories.PetRepository;
import es.urjc.etsii.mtenrero.Repositories.PreferenceRepository;
import es.urjc.etsii.mtenrero.VetmanagerApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

/**
* Created by mtenrero on 28/01/2017.
*/
@Controller
public class AppointmentController {
@Autowired
PetRepository petRepository;
@Autowired
AppointmentRepository appointmentRepository;
@Autowired
PreferenceRepository preferenceRepository;
@Autowired
ClientRepository clientRepository;

@RequestMapping("/dashboard/appointments")
public String getLanding(Model model) {
model.addAttribute("title", VetmanagerApplication.appName + ": Appointments");
model.addAttribute("navAppointments", true);

model.addAttribute("intervals",this.preferenceRepository.findAll().get(0).generateWeekdayAppointmentIntervals());
model.addAttribute("Appointment", appointmentRepository.findAll());
return "appointments";
}

@PostMapping("/dashboard/appointments")
public String addAppointment(Model model,
@RequestParam String hour,
@RequestParam String consult,
@RequestParam long petId
) {
model.addAttribute("title", VetmanagerApplication.appName + ": Appointments");
model.addAttribute("navAppointments", true);
Appointment appointment = new Appointment(hour, petRepository.findById(petId), consult);
appointment.setClient(petRepository.findById(petId).getClient());
appointment.setBreed(petRepository.findById(petId).getBreed());
if (appointmentRepository.save(appointment) != null) {
model.addAttribute("savedClient", true);
model.addAttribute("toastMessage", "Appointment saved correctly!");
}
model.addAttribute("Appointment", appointmentRepository.findAll());
return "appointments";
}
@GetMapping("/dashboard/appointments/{id}")
public String getinfo(Model model,@PathVariable long id) {
model.addAttribute("title", VetmanagerApplication.appName + ": Clients");
model.addAttribute("navClients", true);
model.addAttribute("appointments",appointmentRepository.findOne(id));
return "appointment_view";
}
}
Loading

0 comments on commit 4592364

Please sign in to comment.