diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/BorrowServiceImpl.java b/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/BorrowServiceImpl.java index 3034bf54..94297cc4 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/BorrowServiceImpl.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/BorrowServiceImpl.java @@ -294,7 +294,7 @@ public List 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() { Collection borrow = borrowRepository.findbyBorrowIdandStatus(); diff --git a/FrontEnd/Library/src/app/app-routing.module.ts b/FrontEnd/Library/src/app/app-routing.module.ts index 1f49a951..8790383e 100644 --- a/FrontEnd/Library/src/app/app-routing.module.ts +++ b/FrontEnd/Library/src/app/app-routing.module.ts @@ -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 = [ @@ -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]} ]; diff --git a/FrontEnd/Library/src/app/app.module.ts b/FrontEnd/Library/src/app/app.module.ts index faf493b2..9729a8dd 100644 --- a/FrontEnd/Library/src/app/app.module.ts +++ b/FrontEnd/Library/src/app/app.module.ts @@ -57,7 +57,10 @@ 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 {MatTableModule} from '@angular/material/table'; + // import {MatIconModule} from '@angular/material/icon'; // import { MatToolbarModule } from '@angular/material'; @@ -98,6 +101,7 @@ import { UserDetailviewComponent } from './user-detailview/user-detailview.compo Sidenav2Component, Navbar2Component, AdminNavbarComponent, + HomepageComponent, UserDetailviewComponent, // Chart @@ -123,7 +127,8 @@ import { UserDetailviewComponent } from './user-detailview/user-detailview.compo MatDialogModule, MatInputModule, MatListModule, - MatGridListModule + MatGridListModule, + MatTableModule // Chart diff --git a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css index b3bb64ee..e1bda7e5 100644 --- a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css +++ b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css @@ -1,12 +1,11 @@ -p{ +p { padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - /* background-image: url('../../../a.png'); */ - + } -.btnhome{ +.btnhome { margin-top: 20px; margin-bottom: 10px; padding: 7; @@ -14,74 +13,111 @@ p{ background-color: rgba(83, 254, 3, 0.853); font-size: 13px; border-radius: 25px; - + } -.text-danger1{ +.text-danger1 { width: 160%; padding: 8px 6px; margin: 0px; box-sizing: border-box; - border: 1px ; + border: 1px; background-color: #a7bdb08f; color: rgb(0, 0, 0); border-radius: 7px; - } - -.dropbtn{ +.dropbtn { width: 160%; padding: 8px 6px; margin: 0px; box-sizing: border-box; - border: 1px ; + border: 1px; background-color: #a7bdb08f; color: rgb(0, 0, 0); border-radius: 7px; } -.btn{ + +.btn { width: 150%; padding: 7px 2px; - margin: 5px ; + margin: 5px; box-sizing: border-box; border: 2px solid rgb(250, 97, 97); - background-color:rgba(106, 215, 56, 0.682); + background-color: rgba(106, 215, 56, 0.682); color: rgb(0, 0, 0); border-radius: 7px; } -.table-bordered{ + +.table-bordered { border: 1px solid; } + th { background-color: #232524; color: white; width: 15%; text-align: center; - } - td { +} + +/* td { background-color: #a7bdb08f; color: rgb(0, 0, 0); width: 15%; text-align: center; margin-top: auto; padding: auto; - } +} */ - .btnList{ +.btnList { border: none; padding: 1px; background: rgb(0, 0, 0); font-size: 13px; - font-style: italic ; + font-style: italic; color: rgb(255, 255, 255); border-radius: 3px; } -.btnn2{ - padding-left: 10px;padding-right: 10px; + +.btnn2 { + color: white; + padding-left: 10px; + padding-right: 10px; border-color: rgb(0, 0, 0); - background-color: rgb(64, 133, 238); + background-color: black; font-size: 13px; } +.grid { + border-width: 2px; + width: 50%; +} + +mat-grid-tile { + border-radius: 10px; + background: lightblue; + height: 100px; +} + +.table { + margin-left: 100px; +width: 300px; +height: 250px; + + +} + +.example-card { + max-width: 400px; +} + +.example-header-image { + background-image: url('https://material.angular.io/assets/img/examples/shiba1.jpg'); + background-size: cover; +} +@media only screen and (max-width: 600px) { + body { + background-color: lightblue; + } + } \ No newline at end of file diff --git a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.html b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.html index f405e060..7f24d083 100644 --- a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.html +++ b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.html @@ -1,65 +1,58 @@ - -
-
-
-
-

-

Books Details

+
+
+
+

+
+

Books Details

+ + + + + + + + + + + + + + -
Book Name + + + Category-NamePublicationAutherBook CopiesBook coverAction
- - - - - - - - - - - + + + + + + - - - - + - - - - - - - - + + +
Book NameCategory-NamePublicationAutherBook CopiesBook CoverAction{{books.booksName}}{{books.category.categoryName}}{{books.publication}}{{books.auther}}{{books.booksCopies}} +
- {{books.booksName}}{{books.category.categoryName}}{{books.publication}}{{books.auther}}{{books.booksCopies}} - - - -
+ +
+ + +
+ - - -
- - -
-
-
-
\ No newline at end of file + + \ No newline at end of file diff --git a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.ts b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.ts index 3d1c5636..e2cadc46 100644 --- a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.ts +++ b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; +import { NgToastService } from 'ng-angular-popup'; import { BooksService } from '../books.service'; import { BorrowService } from '../borrow.service'; import { CategoryService } from '../category.service'; @@ -10,7 +11,7 @@ import { CategoryService } from '../category.service'; styleUrls: ['./booksdisplay.component.css'] }) export class BooksdisplayComponent implements OnInit { - + //booksdata:any; // categoryList: any[]; categoryId:any; @@ -41,7 +42,7 @@ result: any; direction=-1; - constructor(private router:Router ,private booksservice:BooksService,private service:CategoryService,private borrowservice:BorrowService) { + constructor(private router:Router ,private booksservice:BooksService,private service:CategoryService,private borrowservice:BorrowService,private toast:NgToastService) { // this.booksList=[]; // this.categoryList=[]; } @@ -128,8 +129,10 @@ onTableDataChange(event:any) { this.borrowservice.add(data).subscribe({ next:(res)=>{ this.booksId=res.booksId; - console.log(res); - alert("Book request successfull") + console.log(res); + + // alert("Book request successfull") + this.toast.info({summary:'Booking Successfull',duration:5000}); this.router.navigate(['/borrowhistory']) }, error:(msg)=>{} diff --git a/FrontEnd/Library/src/app/borrow.service.ts b/FrontEnd/Library/src/app/borrow.service.ts index 5db805ae..0d1675f2 100644 --- a/FrontEnd/Library/src/app/borrow.service.ts +++ b/FrontEnd/Library/src/app/borrow.service.ts @@ -69,7 +69,7 @@ handleError(err: HttpErrorResponse): any { // user filer filterBorrowPagination2(date1:any,date2:any,page:any,tableSize:any,sort:any){ console.log(date1) - return this.http.get(this.apiurl + "/borrow/user/"+date1+"/"+date2+"?pageNo="+page+"&pageSize="+tableSize+"&sortBy="+sort) + return this.http.get(this.apiurl + "/borrow/user/loadByIssueDate/"+date1+"/"+date2) } ////////////// @@ -80,7 +80,7 @@ handleError(err: HttpErrorResponse): any { // return this.http.get(this.apiurl + `/users/fetching/${type}/${date1}/${date2}`, httpOptions) LoadByIssueDate(date1:any,date2:any){ - return this.http.get(this.apiurl + "/borrow/loadByIssueDate/"+date1+"/"+date2).pipe((catchError(err => this.handleError(err)))); + return this.http.get(this.apiurl + "/borrow/loadByIssueDate/"+date1+"/"+date2); } //user LoadByIssueDateUser(date1:any,date2:any){ diff --git a/FrontEnd/Library/src/app/borrow/borrow.component.html b/FrontEnd/Library/src/app/borrow/borrow.component.html index 53b9bbff..697616d9 100644 --- a/FrontEnd/Library/src/app/borrow/borrow.component.html +++ b/FrontEnd/Library/src/app/borrow/borrow.component.html @@ -113,7 +113,7 @@

Borrow Details

- +
START DATE    { - - //console.log("--------") console.log('filter',res); console.log(this.ObjSampleForm.controls['date1'].value); this.data = res; }, }); - - // } - // else { - - // this.data = this.searchData - // } } display(){ diff --git a/FrontEnd/Library/src/app/findby-category/findby-category.component.html b/FrontEnd/Library/src/app/findby-category/findby-category.component.html index 66c95cf2..33a8b33b 100644 --- a/FrontEnd/Library/src/app/findby-category/findby-category.component.html +++ b/FrontEnd/Library/src/app/findby-category/findby-category.component.html @@ -1,12 +1,12 @@ - +

- -
+
@@ -30,31 +30,31 @@ - + - + - + - - - - - - - - + + + + + + + - - + +
Book Name Category-Name PublicationAutherAuthor Book Copies Book Cover Action
{{books.booksName}}{{books.category.categoryName}}{{books.publication}}{{books.auther}}{{books.booksCopies}} - - - + {{books.booksName}}{{books.category.categoryName}}{{books.publication}}{{books.auther}}{{books.booksCopies}} + + +
\ No newline at end of file diff --git a/FrontEnd/Library/src/app/homepage/homepage.component.css b/FrontEnd/Library/src/app/homepage/homepage.component.css new file mode 100644 index 00000000..0aa062c7 --- /dev/null +++ b/FrontEnd/Library/src/app/homepage/homepage.component.css @@ -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; +} \ No newline at end of file diff --git a/FrontEnd/Library/src/app/homepage/homepage.component.html b/FrontEnd/Library/src/app/homepage/homepage.component.html new file mode 100644 index 00000000..908a0b89 --- /dev/null +++ b/FrontEnd/Library/src/app/homepage/homepage.component.html @@ -0,0 +1,9 @@ + +
+ +
+

start reading for bright future

+ Explore books   + Book now +
+
\ No newline at end of file diff --git a/FrontEnd/Library/src/app/homepage/homepage.component.spec.ts b/FrontEnd/Library/src/app/homepage/homepage.component.spec.ts new file mode 100644 index 00000000..5484c7ef --- /dev/null +++ b/FrontEnd/Library/src/app/homepage/homepage.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomepageComponent } from './homepage.component'; + +describe('HomepageComponent', () => { + let component: HomepageComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HomepageComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(HomepageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/FrontEnd/Library/src/app/homepage/homepage.component.ts b/FrontEnd/Library/src/app/homepage/homepage.component.ts new file mode 100644 index 00000000..601492b1 --- /dev/null +++ b/FrontEnd/Library/src/app/homepage/homepage.component.ts @@ -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 { + } + +} diff --git a/FrontEnd/Library/src/app/login/login.component.ts b/FrontEnd/Library/src/app/login/login.component.ts index 61d578a5..c1b49800 100644 --- a/FrontEnd/Library/src/app/login/login.component.ts +++ b/FrontEnd/Library/src/app/login/login.component.ts @@ -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]), @@ -43,7 +40,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']) } diff --git a/FrontEnd/Library/src/app/navbar2/navbar2.component.html b/FrontEnd/Library/src/app/navbar2/navbar2.component.html index 57c5c22a..487a78de 100644 --- a/FrontEnd/Library/src/app/navbar2/navbar2.component.html +++ b/FrontEnd/Library/src/app/navbar2/navbar2.component.html @@ -2,7 +2,7 @@