Skip to content
Merged

Arun #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public List<Borrow> getBorrowHistory(Integer pageNo, Integer pageSize, String so
@Override
@Transactional
// @Scheduled(cron="* */1 * * * * ")
@Scheduled(cron = "0 0 12 * * ?")
@Scheduled(cron = "0 0 12 * * ?")
public void sendMails() {
System.out.println("Email sent successfully");

Expand Down
2 changes: 2 additions & 0 deletions FrontEnd/Library/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { ForgotpasswordComponent } from './forgotpassword/forgotpassword.compone
import { Sidenav2Component } from './sidenav2/sidenav2.component';
import { Navbar2Component } from './navbar2/navbar2.component';
import { AdminNavbarComponent } from './admin-navbar/admin-navbar.component';
import { HomepageComponent } from './homepage/homepage.component';
import { UserDetailviewComponent } from './user-detailview/user-detailview.component';

const routes: Routes = [
Expand Down Expand Up @@ -65,6 +66,7 @@ const routes: Routes = [
{path:'navbar2',component:Navbar2Component,canActivate: [HomeguardGuard]},
{path:'sidenav2',component:Sidenav2Component,canActivate: [HomeguardGuard]},
{path:'admin-navbar',component:AdminNavbarComponent,canActivate: [HomeguardGuard]},
{path:'homepage',component:HomepageComponent,canActivate:[HomeguardGuard]}
{path:'user-detailview',component:UserDetailviewComponent,canActivate: [HomeguardGuard]}
];

Expand Down
2 changes: 2 additions & 0 deletions FrontEnd/Library/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {Chart} from 'chart.js';
import { Sidenav2Component } from './sidenav2/sidenav2.component';
import { Navbar2Component } from './navbar2/navbar2.component';
import { AdminNavbarComponent } from './admin-navbar/admin-navbar.component';
import { HomepageComponent } from './homepage/homepage.component';
import { UserDetailviewComponent } from './user-detailview/user-detailview.component';

// import {MatIconModule} from '@angular/material/icon';
Expand Down Expand Up @@ -98,6 +99,7 @@ import { UserDetailviewComponent } from './user-detailview/user-detailview.compo
Sidenav2Component,
Navbar2Component,
AdminNavbarComponent,
HomepageComponent,
UserDetailviewComponent,
// Chart

Expand Down
110 changes: 52 additions & 58 deletions FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.html
Original file line number Diff line number Diff line change
@@ -1,65 +1,59 @@
<app-sidenav2></app-sidenav2>
<router-outlet></router-outlet>
<!-- <p>
<br><input type="button" style = "position:absolute; left:1200px; top:20px;" class="btnhome" name="HomE" value="HomE" (click)="home()"><br><br>
</p> -->
<div class="text-center">
<form>
<div class="card-box">
<div class="row">
<div class="table-responsive"><br>
<h1 style="text-align:center ;">Books Details</h1>

<div class="text-center">
<form>
<div class="card-box">
<div class="row">
<div class="table-responsive"><br>
<h1 style="text-align:center;color:white;">Books Details</h1>

<table class="table table-striped" align="center" class="table-bordered" id="datatable" role="grid" >

<thead class="bg-primary text-white">
<tr role="row">

<th (click)="sortfn('booksName')">Book Name</th>
<th (click)="sortfn('category.categoryName')">Category-Name</th>
<th (click)="sortfn('publication')">Publication</th>
<th (click)="sortfn('auther')">Auther</th>
<th (click)="sortfn('booksCopies')">Book Copies</th>
<th>Book Cover</th>
<th>Action</th>

</tr>
</thead>
<tbody>
<tr *ngFor="let books of data | paginate
: {
itemsPerPage: tableSize,
currentPage: page,
totalItems: count
};


">

<td>{{books.booksName}}</td>
<td>{{books.category.categoryName}}</td>
<td>{{books.publication}}</td>
<td>{{books.auther}}</td>
<td>{{books.booksCopies}}</td>
<td align="right"><img src="../../assets/BooksImage/item_pics/{{books.image}}" width="70" height="100"></td>

<td>

<button type ="button" class="btnn2" (click)="requestBook(books)">Request Book</button>
<!-- <button mat-icon-button>
<i class="material-icons" style="color:rgb(18, 52, 247)" (click)="requestBook(books)">done</i>
<table class="table table-striped w-auto" style="margin-left: 100px; height: 250px;width: 300px;">

<thead>
<tr role="row">
<th (click)="sortfn('booksName')">Book Name
<button mat-icon-button *ngIf="this.direction==1"> <i class="material-icons"
style="color:rgb(23, 23, 26)">arrow_drop_up</i></button>
<button mat-icon-button *ngIf="this.direction==-1"> <i class="material-icons"
style="color:rgb(23, 23, 26)">arrow_drop_down</i></button>
</th>
<th (click)="sortfn('category.categoryName')">Category-Name</th>
<th (click)="sortfn('publication')">Publication</th>
<th (click)="sortfn('auther')">Auther</th>
<th (click)="sortfn('booksCopies')">Book Copies</th>
<th>Book cover</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let books of data | paginate
: {
itemsPerPage: tableSize,
currentPage: page,
totalItems: count
};

</button> -->
</td>
</tr>

</tbody>
</table>
<div class="d-flex justify-content-center">
<pagination-controls (pageChange)="onTableDataChange(page=$event)">
</pagination-controls>
</div>
</div>
</div>
</div>
">

<td>{{books.booksName}}</td>
<td>{{books.category.categoryName}}</td>
<td>{{books.publication}}</td>
<td>{{books.auther}}</td>
<td>{{books.booksCopies}}</td>
<td align="right"><img src="../../assets/BooksImage/item_pics/{{books.image}}" width="70" height="100">
</td>

<td>

<button type="button" class="btnn2" (click)="requestBook(books)">Request</button>
</tbody>
</table>
<div class="d-flex justify-content-center">
<pagination-controls (pageChange)="onTableDataChange(page=$event)">
</pagination-controls>
</div>


2 changes: 1 addition & 1 deletion FrontEnd/Library/src/app/borrow/borrow.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h2 style="text-align:center ;">Borrow Details</h2>
<button mat-button (click)="acceptRequest(post)" color="primary" *ngIf="post.status=='REQUESTED' " >Accept</button>
<button mat-button (click)="rejectRequest(post)" color="warn" *ngIf="post.status=='REQUESTED' " >Reject</button>
<button mat-button (click)="bookReturn(post)" color="accent" *ngIf="post.status!='RETURNED' && post.status=='APPROVED' ">Return</button>

</td>
<td>
<button mat-icon-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1 style="text-align:center ;">Borrow Details</h1>
<!-- fliter starts -->
<div><input type="button" (click)="clearFilter()" value="CLEAR FILTER"
style="position:absolute; left:915px; top:103px;"> </div>
style="position:absolute; left:915px; top:95px;"> </div>

<div>
START DATE &nbsp;&nbsp; <input type="date" formControlName="date1" value="date1"
Expand Down
19 changes: 19 additions & 0 deletions FrontEnd/Library/src/app/homepage/homepage.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.home img
{
width: 100%;
height: 574px;
object-position: center;

}
.homecontent
{
position: absolute;
top:50%;
left: 70%;
transform: translate(-50%,-50%);
}
.homecontent h1
{
color: rgb(243, 246, 248);
font-size: 30px;
}
9 changes: 9 additions & 0 deletions FrontEnd/Library/src/app/homepage/homepage.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<app-sidenav2></app-sidenav2>
<section class="home">
<img src="../../assets/wp6974333-bookstore-wallpapers.jpg" >
<div class="homecontent">
<h1>start reading for bright future</h1>
<a href="findby-category" class="btn btn-lg btn-light">Explore books</a> &nbsp;
<a href="booksdisplay" class="btn btn-lg btn-primary">Book now</a>
</div>
</section>
23 changes: 23 additions & 0 deletions FrontEnd/Library/src/app/homepage/homepage.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { HomepageComponent } from './homepage.component';

describe('HomepageComponent', () => {
let component: HomepageComponent;
let fixture: ComponentFixture<HomepageComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HomepageComponent ]
})
.compileComponents();

fixture = TestBed.createComponent(HomepageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions FrontEnd/Library/src/app/homepage/homepage.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-homepage',
templateUrl: './homepage.component.html',
styleUrls: ['./homepage.component.css']
})
export class HomepageComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}
5 changes: 1 addition & 4 deletions FrontEnd/Library/src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export class LoginComponent implements OnInit {
constructor(private router:Router, private service:UserserviceService,private toast : NgToastService )
{
}



loginForm:FormGroup=new FormGroup(
{
email:new FormControl('',[Validators.required]),
Expand All @@ -44,7 +41,7 @@ export class LoginComponent implements OnInit {
if(result.role==2){
localStorage.setItem('token',this.responsedata.accessToken.value)
this.toast.info({detail:'Hello User ',summary:'LogIn Successfull',duration:5000});
this.router.navigate(['/sidenav2'])
this.router.navigate(['/homepage'])
}


Expand Down
4 changes: 2 additions & 2 deletions FrontEnd/Library/src/app/navbar2/navbar2.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="nav">
<input type="checkbox" id="nav-check">
<div class="nav-header">
<div class="nav-title">
<div class="nav-title" style="margin-top: 10px;">
LIBRARY
</div>
</div>
Expand All @@ -16,7 +16,7 @@

<div class="nav-links">
<a href="view-profile">
<i class="fa fa-user fa-2x" style="position:absolute;left: 1240px;"></i>
<i class="fa fa-user fa-1x" style="position:absolute;left: 1257px;top: 35px;"></i>

</a>

Expand Down
2 changes: 1 addition & 1 deletion FrontEnd/Library/src/app/sidenav2/sidenav2.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ul>
<br><br><br>
<li>
<a href="sidenav2">
<a href="homepage">
<i class="fa fa-home fa-2x" ></i>
<span class="nav-text">
HOME
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.