Skip to content

Commit

Permalink
Merge pull request #146 from cvazquezlos/carlos
Browse files Browse the repository at this point in the history
Release changes.
  • Loading branch information
cvazquezlos authored Apr 23, 2017
2 parents f0673f3 + 78d2a58 commit e0c1a00
Show file tree
Hide file tree
Showing 26 changed files with 151 additions and 29 deletions.
160 changes: 132 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BREMS - Book Reserve Management System

### About the contributors
## About the contributors
+ Blay González, Sergio
- [Github account](https://github.com/Blay93).
- Email: s.blay@alumnos.urjc.es
Expand All @@ -14,12 +14,12 @@
- [Github account](https://github.com/cvazquezlos).
- Email: c.vazquezlos@alumnos.urjc.es

### About this web application
## About this web application
Online management of resources (books and magazines) in a library. Each resource has a copy which a reader can reserve. This resource will be taken by a reader for 30 days (in case of a books) and for 2 days (in case of magazines).
An administrator will manage the resource loans, resource stock and resource copies.
Web functionality deppends on type of user (administrator o reader).
Web functionality deppends on type of user (administrator o reader). [Link](https://www.youtube.com/watch?v=qlVj2XOEnFA) to explicative video about BREMS (spanish).

#### Users: Readers
### Users: Readers
A reader is an user who can reserve a resource through BREMS app. Those functionalities are public:
+ List of resources.
+ Search resources using a *title*, *author* y/o *resource name*.
Expand All @@ -29,7 +29,7 @@ A reader is an user who can reserve a resource through BREMS app. Those function
+ List of fines.
+ Sing-up.

#### Users: Administrator
### Users: Administrator
An administrator is an user who can manage resource data and the loans. Those functionalities are private:
+ Manage resources (books and magazines).
- Modify resources.
Expand All @@ -43,7 +43,7 @@ An administrator is an user who can manage resource data and the loans. Those fu
- Unsubscribe a user.
- Modify user's information.

#### Entities of BREMS' App
### Entities of BREMS' App
In our App, we use these entities: *User*, *fine*, *resource*, *loan* and *copy*.

| Entity | Description | Secondary entities |
Expand All @@ -54,55 +54,64 @@ In our App, we use these entities: *User*, *fine*, *resource*, *loan* and *copy*
| Loan | Action through a reader can reserve a copy. | ActionType and Token |
| Copy | Limited number of resource number which can be reserved by a reader. | - |

#### Tasks management
### Tasks management
We use [Trello](https://trello.com/b/3hdFhIap/brems) and SCRUM because we think is the best way to work in a group.

#### Views of app
This app contains views (each page which makes this website useful). As a library, the home page contains a list of all books and magazines avaible. This design is originally made by @annyCS.
### App views
Backend contains views (each page which makes this website useful). As a library, the home page contains a list of all books and magazines avaible. This design is originally made by @annyCS.

##### Index page
#### Index page
![index][index]

##### About page
#### About page
![about][about]

##### Contact page
#### Contact page
![contact][contact]

##### Search page
#### Search page
![search][search]

##### Profile page
#### Profile page
![profile][profile]

##### Admin page
#### Admin page
![admin][admin]

##### Admin resources page
###### Resources general view
#### Admin resources page
##### Resources general view
![admin-resources][admin-resources]

###### Edit resource page
##### Edit resource page
![admin-resources-edit][admin-resources-edit]

###### Add resource page
##### Add resource page
![admin-resources-add][admin-resources-add]

##### Admin loans page
###### Loans general view
#### Admin loans page
##### Loans general view
![admin-loans][admin-loans]

###### Add loans page
##### Add loans page
![admin-loans-add][admin-loans-add]

##### Admin users page
###### Users general view
#### Admin users page
##### Users general view
![admin-users][admin-users]

###### Add user page
##### Add user page
![admin-users-add][admin-users-add]

#### App controllers class diagrams
## Backend
### Running BREMS Backend
You must have MySQL installed, your conection credentials must be "root" and "1234" (user and pass) and you need to have a MySQL Schema called "BREMS".
1. Download this repository (or clone it).
2. Navigate to "backend/target".
3. Using your shell, execute `java -jar appSpring-0.0.1.jar`.
4. Using Google Chrome (any browser can be used) navigate to "https://localhost:8443".
5. Enjoy it!
### Backend diagrams
#### Backend controllers class diagrams
##### AdminController and services relationships
![admin-controller-and-services][admin-controller-and-services]

Expand All @@ -118,7 +127,7 @@ This app contains views (each page which makes this website useful). As a librar
##### UserController and services relationships
![user-controller-and-services][user-controller-and-services]

#### App services class diagrams
#### Backend services class diagrams
##### LogicService class diagrams
###### LogicService and services relationships
![logic-service-and-services][logic-service-and-services]
Expand Down Expand Up @@ -148,6 +157,80 @@ This app contains views (each page which makes this website useful). As a librar
##### UserRestController and services relationships
![user-rest-controller][user-rest-controller]

## Frontend
### Running BREMS Frontend
1. Download this repository (or clone it).
2. Navigate to "frontend".
3. Using your shell, execute `npm install` and then `ng serve`.
4. Using Google Chrome (any browser can be used) navigate to "http://localhost:4200".
5. Enjoy it!
### Frontend diagrams
#### Frontend services
##### ActionService
![action-service][action-service]

##### FileService
![file-service][file-service]

##### FineService
![fine-service][fine-service]

##### GenreService
![genre-service][genre-service]

##### ResourceCopyService
![resource-copy-service][resource-copy-service]

##### ResourceService
![resource-service][resource-service]

##### SessionService
![session-service][session-service]

##### UserService
![user-service][user-service]

#### Public module
##### Public component
![public-component][public-component]

##### Public module
![public-module][public-module]

##### Public routing module
![public-routing-module][public-routing-module]

##### HomeComponent
![home-component][home-component]

##### ProfileComponent
![profile-component][profile-component]

#### Admin module
##### Admin component
![admin-component][admin-component]

##### Admin module
![admin-module][admin-module]

##### Admin routing module
![admin-routing-module][admin-routing-module]

##### DashboardComponent
![dashboard-component][dashboard-component]

##### ManageFinesComponent
![manage-fines-component][manage-fines-component]

##### ManageLoansComponent
![manage-loans-component][manage-loans-component]

##### ManageResourcesComponent
![manage-resources-component][manage-resources-component]

##### ManageUsersComponent
![manage-users-component][manage-users-component]

[index]: /media/README/01-homePage.png
[about]: /media/README/02-aboutPage.png
[contact]: /media/README/03-contactPage.png
Expand All @@ -174,4 +257,25 @@ This app contains views (each page which makes this website useful). As a librar
[resource-copy-rest-controller]: /media/README/24-ResourceCopyRestControllerRelationships.png
[resource-rest-controller]: /media/README/25-ResourceRestControllerRelationships.png
[resource-type-rest-controller]: /media/README/26-ResourceTypeRestControllerRelationships.png
[user-rest-controller]: /media/README/27-UserRestControllerRelationships.png
[user-rest-controller]: /media/README/27-UserRestControllerRelationships.png
[action-service]: /media/README/28-ActionService.png
[file-service]: /media/README/29-FileService.png
[fine-service]: /media/README/30-FineService.png
[genre-service]: /media/README/31-GenreService.png
[resource-copy-service]: /media/README/32-ResourceCopyService.png
[resource-service]: /media/README/33-ResourceService.png
[session-service]: /media/README/34-SessionService.png
[user-service]: /media/README/35-UserService.png
[public-component]: /media/README/36-PublicComponent.png
[public-module]: /media/README/37-PublicModule.png
[public-routing-module]: /media/README/38-PublicRoutingModule.png
[home-component]: /media/README/39-HomeComponent.png
[profile-component]: /media/README/40-ProfileComponent.png
[admin-component]: /media/README/41-AdminComponent.png
[admin-module]: /media/README/42-AdminModule.png
[admin-routing-module]: /media/README/43-AdminRoutingModule.png
[dashboard-component]: /media/README/44-DashboardComponent.png
[manage-fines-component]: /media/README/45-ManageFinesComponent.png
[manage-loans-component]: /media/README/46-ManageLoansComponent.png
[manage-resources-component]: /media/README/47-ManageResourcesComponent.png
[manage-users-component]: /media/README/48-ManageUsersComponent.png
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>
<tr>
<td>{{fine?.id}}</td>
<td>{{fine.user?.name}}</td>
<td>{{fine.resourceCopy?.title}}</td>
<td>{{fine.resourceCopy?.resource.title}}</td>
<td>Default</td>
<td>{{fine?.initDate}} - {{fine?.finishDate}}</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ export class EditResourceComponent implements OnInit {
this.errorMessage = false;
this.message = 'Recurso editado correctamente.';
this.getResource();
this.fileService.getResourceFile(this.resource.id).subscribe(
data => {
let dataRecieved: string[] = data.split('"');
this.resource.image = 'data:image/png;base64,' + dataRecieved[3];
},
error => console.log('Fail adding resource ' + this.resource.title + 'image.')
);
},
error => {
this.successMessage = false;
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/app/component/public/public.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {User} from "../../model/user.model";
export class PublicComponent {

constructor() {
if (localStorage.getItem('user') !== 'sergiob') {
localStorage.clear();
}
}

@ViewChild(ModalLogin)
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/app/component/public/user/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ export class ProfileComponent implements OnInit, DoCheck {
ngDoCheck() {
if(this.user != this.userService.getUserCompleted()){
this.ngOnInit();
this.userImage = null;
this.fileService.getUserFile(this.user.id).subscribe(
data => {
let dataRecieved: string[] = data.split('"');
this.userImage = 'data:image/png;base64,' + dataRecieved[3];
},
error => console.log("Fail trying to charge " + this.user.name + " image.")
);
}
}

Expand Down
Binary file added media/README/28-ActionService.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 media/README/29-FileService.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 media/README/30-FineService.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 media/README/31-GenreService.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 media/README/32-ResourceCopyService.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 media/README/33-ResourceService.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 media/README/34-SessionService.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 media/README/35-UserService.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 media/README/36-PublicComponent.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 media/README/37-PublicModule.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 media/README/38-PublicRoutingModule.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 media/README/39-HomeComponent.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 media/README/40-ProfileComponent.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 media/README/41-AdminComponent.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 media/README/42-AdminModule.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 media/README/43-AdminRoutingModule.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 media/README/44-DashboardComponent.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 media/README/45-ManageFinesComponent.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 media/README/46-ManageLoansComponent.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 media/README/47-ManageResourcesComponent.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 media/README/48-ManageUsersComponent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0c1a00

Please sign in to comment.