diff --git a/BackEnd/Library/item_pics/Screenshot from 2022-12-07 10-58-11.png b/BackEnd/Library/item_pics/Screenshot from 2022-12-07 10-58-11.png deleted file mode 100644 index 4e3c69a9..00000000 Binary files a/BackEnd/Library/item_pics/Screenshot from 2022-12-07 10-58-11.png and /dev/null differ diff --git a/BackEnd/Library/item_pics/Screenshot from 2022-12-07 15-08-57.png b/BackEnd/Library/item_pics/Screenshot from 2022-12-07 15-08-57.png deleted file mode 100644 index 1d0f0c0c..00000000 Binary files a/BackEnd/Library/item_pics/Screenshot from 2022-12-07 15-08-57.png and /dev/null differ diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/controller/BooksController.java b/BackEnd/Library/src/main/java/com/innovature/Library/controller/BooksController.java index 1b1772d6..e95fd05c 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/controller/BooksController.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/controller/BooksController.java @@ -1,7 +1,6 @@ package com.innovature.Library.controller; import java.io.IOException; -//import java.security.Principal; import java.util.Collection; import java.util.List; @@ -26,15 +25,12 @@ import org.springframework.web.multipart.MultipartFile; import com.innovature.Library.entity.Books; -import com.innovature.Library.entity.Borrow; -//import com.innovature.Library.entity.Category; import com.innovature.Library.form.BooksForm; import com.innovature.Library.repository.BooksRepository; import com.innovature.Library.service.BooksService; import com.innovature.Library.util.FileUtil; import com.innovature.Library.view.BooksDetailView; -//import com.innovature.Library.view.BooksListView; -//import com.innovature.Library.view.BooksListView; + @RestController @RequestMapping("/books") @@ -45,7 +41,7 @@ public class BooksController { @Autowired private BooksRepository booksRepository; - private Integer booksId; + @PostMapping @@ -114,15 +110,7 @@ public BooksDetailView update( Page list = service.getAllBooks(pageNo-1, pageSize, sortBy,direction); return new ResponseEntity>(list,new HttpHeaders(), HttpStatus.OK); - - } - - - - - - - + } @PostMapping("/save/image/{booksId}") @@ -136,8 +124,6 @@ public void saveBookImage(@RequestParam(value="image" ) MultipartFile multipart booksRepository.save(books); - // String UploadDir = "userProfile-photos/" + savedUserProfile.getUserprofileId(); - FileUtil.saveUserProfile(fileName, multipartFile); } @@ -150,7 +136,6 @@ public HttpEntity getImagePic(@PathVariable Integer booksId) { //pie - @GetMapping("admin/pie") public List getcountByCategoryId() { return service.getBookCountByCategory(); @@ -165,8 +150,7 @@ public ResponseEntity> getAllBookStockSearch( @RequestParam(defaultValue = "10") Integer pageSize, @RequestParam(defaultValue = "books_id") String sortBy, @RequestParam(defaultValue = "-1") Integer direction) { - System.out.println("paage size" + pageSize); - Page list = service.getAllBookStocks(keyword, pageNo - 1, pageSize, sortBy,direction); + Page list = service.getAllBookStocks(keyword, pageNo - 1, pageSize, sortBy,direction); return new ResponseEntity>(list, new HttpHeaders(), HttpStatus.OK); diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/controller/BorrowController.java b/BackEnd/Library/src/main/java/com/innovature/Library/controller/BorrowController.java index ead7d315..73617045 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/controller/BorrowController.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/controller/BorrowController.java @@ -5,15 +5,11 @@ import java.sql.Date; import java.util.List; import java.io.IOException; - import java.text.SimpleDateFormat; -import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import javax.validation.Valid; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -76,19 +72,6 @@ public Collection list() { } -//pagenated borrow list at admin borrow -// @GetMapping("/pagenated/") -// public ResponseEntity>getAllBorrows( -// @RequestParam(defaultValue = "1") Integer pageNo, -// @RequestParam(defaultValue = "5") Integer pageSize, -// @RequestParam(defaultValue = "id") String sortBy) -// { -// List list = bService.getAllBorrows(pageNo-1, pageSize, sortBy); -// return new ResponseEntity>(list,new HttpHeaders(), -// HttpStatus.OK); - -// } - //BORROW @ADMIN //pagenated borrow list at admin VIEW borrow single api @GetMapping("/admin/pagenated/") public ResponseEntity>getAllBorTest( @@ -104,36 +87,6 @@ public Collection list() { } -//LOAD-FILTER@ADMIN//load results of issuedate filter at Admin Borrow -// @GetMapping("/loadByIssueDate/{date1}/{date2}") -// public ResponseEntity> loadByIssueDate( -// @PathVariable("date1") Date date1, -// @PathVariable("date2") Date date2) - -// { -// List list = bService.loadtAllByIssueDate(date1, date2); -// return new ResponseEntity>(list,new HttpHeaders(), -// HttpStatus.OK); -// } - - -//GET FILTER RESULT@ADMIN//filtered pagenated borrow list [on filtering] @admin// -// @GetMapping("/{date1}/{date2}") -// public ResponseEntity>getFilterBorrow( -// // @PathVariable Date date1, @PathVariable Date date2, -// @PathVariable("date1") Date date1, -// @PathVariable("date2") Date date2, -// @RequestParam(defaultValue = "1") Integer pageNo, -// @RequestParam(defaultValue = "5") Integer pageSize, -// @RequestParam(defaultValue = "id") String sortBy) -// { - -// List list = bService.getAllBorrow(date1, date2,pageNo-1, pageSize, sortBy); -// return new ResponseEntity>(list,new HttpHeaders(), -// HttpStatus.OK); - -// } - //GET FILTER RESULT@ADMIN//filtered single api @GetMapping("/admin/{date1}/{date2}") public ResponseEntity>getTestFilterBorrow( @@ -152,7 +105,7 @@ public Collection list() { } -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + @@ -182,7 +135,6 @@ public ResponseEntity> loadByIssueDateUser( } -//////////////////////////////////////////////////////////////////////////////////// @@ -283,7 +235,7 @@ public BorrowDetailView undo( -///////////////////////////////////// + @@ -319,29 +271,11 @@ public void Exportcsv(HttpServletResponse httpServletResponse) throws IOExceptio String[] nameMapping = { "borrowId","firstName","booksName", "issueDate", "returnDate", "dueDate","bookReturnedDate","reason","dueDays","fine","status" }; csvWriter.writeHeader(csvHeader); for (Borrow rent : rents) { - // System.out.println(" :"+rent.getStatus()); - csvWriter.write(rent, nameMapping); + csvWriter.write(rent, nameMapping); } csvWriter.flush(); csvWriter.close(); } - // @GetMapping("/admin/searchUser") - // public ResponseEntity> getAllBorrowedUserSearch( - // @RequestParam(defaultValue = "") String keyword, - // @RequestParam(defaultValue = "1") Integer pageNo, - // @RequestParam(defaultValue = "10") Integer pageSize) - // // @RequestParam(defaultValue = "user_id") String sortBy) - // { - // System.out.println("paage size" + pageSize); - // Page list = bService.getAllBorrowedUserSearch(keyword, pageNo - 1, pageSize); - // return new ResponseEntity>(list, new HttpHeaders(), - // HttpStatus.OK); - - // } - - - - } diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/controller/EmailController.java b/BackEnd/Library/src/main/java/com/innovature/Library/controller/EmailController.java index f5405b82..9fbfda42 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/controller/EmailController.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/controller/EmailController.java @@ -2,11 +2,6 @@ import java.util.Random; -import javax.security.auth.Subject; -import javax.validation.Valid; - -// import java.util.Random; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -16,30 +11,26 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import com.innovature.Library.form.BorrowForm; + import com.innovature.Library.form.EmailForm; import com.innovature.Library.form.OtpForm; import com.innovature.Library.repository.EmailRepository; import com.innovature.Library.service.BorrowService; import com.innovature.Library.service.EmailService; -import com.innovature.Library.view.BorrowDetailView; + import com.innovature.Library.entity.Email; import com.innovature.Library.entity.User; -import com.innovature.Library.form.EmailForm; -import com.innovature.Library.repository.EmailRepository; import com.innovature.Library.repository.UserRepository; -import com.innovature.Library.service.EmailService; + // tgsrhyrsrthr @RestController @RequestMapping("/email") public class EmailController { - // @Autowired - // private EmailService emailService; - + @Autowired private BorrowService service; @@ -100,8 +91,7 @@ public String sendMail(@PathVariable("userId") Integer userId) { @PostMapping("verify") public boolean add(@RequestBody OtpForm form){ - System.out.println("????????????????"+form.getEmail()); - System.out.println("........."+form.getCnewPassword()+form.getNewPassword()); + return emailService.add(form); } diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/controller/UsersController.java b/BackEnd/Library/src/main/java/com/innovature/Library/controller/UsersController.java index e380d196..a9ec46b2 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/controller/UsersController.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/controller/UsersController.java @@ -52,6 +52,8 @@ public class UsersController { @Autowired private UserService userService; + + @PostMapping public UserView add(@Valid @RequestBody UserForm form) { return userService.add(form); @@ -85,6 +87,19 @@ public void deletes( userService.deletes(userId); } + // @GetMapping("/{userId}") + // public void deletes( + // @PathVariable("userId") Integer userId) { + // userService.deletes(userId); + // } + + + @GetMapping("/admin/{userId}") + public Collection getUserById( + @PathVariable("userId") Integer userId) { + return userService.getUserById(userId); +} + @GetMapping("admin/pagenated/") diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/controller/csvController.java b/BackEnd/Library/src/main/java/com/innovature/Library/controller/csvController.java index feb17fe1..fcb88f90 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/controller/csvController.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/controller/csvController.java @@ -1,19 +1,13 @@ package com.innovature.Library.controller; -import java.util.List; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.InputStreamResource; -import org.springframework.core.io.Resource; -import org.springframework.http.HttpHeaders; + import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; + import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -21,11 +15,11 @@ import org.springframework.web.servlet.support.ServletUriComponentsBuilder; -import com.innovature.Library.entity.csvUpload; + import com.innovature.Library.csv_helper.csvHelper; import com.innovature.Library.csv_helper.ResponseMessage; import com.innovature.Library.service.csvService; -// import librarymanagement.library.message.ResponseMeassage; + @Controller @RequestMapping("/csv") diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/repository/UserRepository.java b/BackEnd/Library/src/main/java/com/innovature/Library/repository/UserRepository.java index 0a7ff391..a22c9c13 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/repository/UserRepository.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/repository/UserRepository.java @@ -13,6 +13,7 @@ import org.springframework.data.jpa.repository.Query; import com.innovature.Library.entity.User; +import com.innovature.Library.view.UserView; /** * @@ -33,6 +34,8 @@ public interface UserRepository extends Repository { Collection findByUserId(Integer userId); + // UserViewfindByUserId1(Integer userId); + public Page findAll(Pageable paging); diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/service/UserService.java b/BackEnd/Library/src/main/java/com/innovature/Library/service/UserService.java index c104baf5..a17cef9d 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/service/UserService.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/service/UserService.java @@ -44,6 +44,8 @@ public interface UserService { void deletes(Integer userId); + Collection getUserById(Integer userId); + Collection listAll(); // Collection list(); 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 bd3ca36e..77b901f4 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 @@ -358,10 +358,11 @@ public void sendMail(Integer userId, String subject, String text) { // TODO Auto-generated method stub } + @Override @Transactional // @Scheduled(cron="* */1 * * * * ") - @Scheduled(cron = "0 0 12 * * ?") + @Scheduled(cron = "0 0 10 * * ?") public void fineGeneration() { System.out.println("reachllllllllllllll"); @@ -376,6 +377,7 @@ public void fineGeneration() { bor.setDueDays(due); bor.setFine(due * 5); + bor.setPaymentStatus("UNPAID"); } } diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/UserServiceImpl.java b/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/UserServiceImpl.java index 3a61ef3b..fd9ce1a8 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/UserServiceImpl.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/service/impl/UserServiceImpl.java @@ -236,5 +236,16 @@ public void deletes(Integer userId) throws NotFoundException { + @Override + public Collection getUserById(Integer userId) { + + userRepository.findById(userId); + return userRepository.findByUserId(userId); + + + } + + + } diff --git a/BackEnd/Library/src/main/java/com/innovature/Library/util/FileUtil.java b/BackEnd/Library/src/main/java/com/innovature/Library/util/FileUtil.java index 48a5fd8a..5db90d48 100644 --- a/BackEnd/Library/src/main/java/com/innovature/Library/util/FileUtil.java +++ b/BackEnd/Library/src/main/java/com/innovature/Library/util/FileUtil.java @@ -16,8 +16,8 @@ public class FileUtil { - public static final String PATH = "/home/negilbabu/Desktop/project/LibraryRepository/FrontEnd/iprjt/src/assets/BooksImage/"; - //public static final String PATH = "/home/arun/Library@dec9@12PM/Library/iprjt-07-11/iprjt/src/assets/BooksImage/"; + public static final String PATH = "/home/negilbabu/Desktop/project/LibraryRepository/FrontEnd/Library/src/assets/BooksImage/item_pics/"; + public static final String PROFILE_PIC_DIR = "item_pics/"; diff --git a/FrontEnd/Library/1.jpg b/FrontEnd/Library/1.jpg deleted file mode 100644 index efb97b1b..00000000 Binary files a/FrontEnd/Library/1.jpg and /dev/null differ diff --git a/FrontEnd/Library/a.png b/FrontEnd/Library/a.png deleted file mode 100644 index 1da30c9c..00000000 Binary files a/FrontEnd/Library/a.png and /dev/null differ diff --git a/FrontEnd/Library/c.jpg b/FrontEnd/Library/c.jpg deleted file mode 100644 index 6b63782a..00000000 Binary files a/FrontEnd/Library/c.jpg and /dev/null differ diff --git a/FrontEnd/Library/cc.jpg b/FrontEnd/Library/cc.jpg deleted file mode 100644 index 908adec1..00000000 Binary files a/FrontEnd/Library/cc.jpg and /dev/null differ diff --git a/FrontEnd/Library/img.jpg b/FrontEnd/Library/img.jpg deleted file mode 100644 index 66b32b8c..00000000 Binary files a/FrontEnd/Library/img.jpg and /dev/null differ diff --git a/FrontEnd/Library/li.jpg b/FrontEnd/Library/li.jpg deleted file mode 100644 index 3e0e3986..00000000 Binary files a/FrontEnd/Library/li.jpg and /dev/null differ diff --git a/FrontEnd/Library/lib.jpg b/FrontEnd/Library/lib.jpg deleted file mode 100644 index d03c2bb7..00000000 Binary files a/FrontEnd/Library/lib.jpg and /dev/null differ diff --git a/FrontEnd/Library/lib1.jpg b/FrontEnd/Library/lib1.jpg deleted file mode 100644 index f0b5e5f8..00000000 Binary files a/FrontEnd/Library/lib1.jpg and /dev/null differ diff --git a/FrontEnd/Library/src/app.zip b/FrontEnd/Library/src/app.zip deleted file mode 100644 index fb8eb81a..00000000 Binary files a/FrontEnd/Library/src/app.zip and /dev/null differ diff --git a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.css b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.css index bfc30380..81d3e152 100644 --- a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.css +++ b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.css @@ -2,7 +2,7 @@ p{ padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - background-image: url('../../../a.png'); + /* background-image: url('../../../a.png'); */ } diff --git a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.html b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.html index 2c861a1c..cabb0a75 100644 --- a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.html +++ b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.html @@ -9,7 +9,7 @@ -
diff --git a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.ts b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.ts index 0407cfeb..d384c8d1 100644 --- a/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.ts +++ b/FrontEnd/Library/src/app/acceptrequest/acceptrequest.component.ts @@ -27,8 +27,9 @@ export class AcceptrequestComponent implements OnInit { } ngOnInit(): void { - this.date = new Date(); +this.date = new Date(); console.log(this.date) + // this.date = new Date() // this.cValue = formatDate(this.d1, 'dd-MM-yyyy', 'en-US'); @@ -88,8 +89,7 @@ update(borrowId:any){ datas(){ this.val=this.ObjSampleForm.controls['returnDate'].value; - // alert("dsfsdf"+this.val) - // console.log("dsfadv"+this.val) + } diff --git a/FrontEnd/Library/src/app/addbooks/addbooks.component.css b/FrontEnd/Library/src/app/addbooks/addbooks.component.css index 7b9d767e..5fbd13fe 100644 --- a/FrontEnd/Library/src/app/addbooks/addbooks.component.css +++ b/FrontEnd/Library/src/app/addbooks/addbooks.component.css @@ -4,11 +4,65 @@ } */ - table{ + + .split { + height: 100%; + /* width: 50%; */ + position: fixed; + /* z-index: 1; */ + top: 0; + overflow-x: hidden; + padding-top: 20px; + } + + .left { + left: 0; + width: 18%; + z-index: 1; + background-color: #111; + } + + .right { + right: 0; width: 80%; + background-color: rgb(255, 255, 255); + } + + .centered { + position: absolute; + top: 16%; + left: 40%; + transform: translate(-50%, -50%); + text-align: center; + } +.form-control{ + width: 50vh; +} + .csvv{ + position: relative; + left: 105%; + /* top:65px; */ + } + + /* .centered{ + top: 18%; + left:45%; + } +.mat-dialog-container{ +margin-left: 20%; +} + */ + + + + + + table{ + width: 90%; border: none; text-align: center; height: 100px; + text-size-adjust: auto; } th { @@ -21,14 +75,27 @@ border: none; padding-top: 6px;padding-bottom: 6px; } - .form-control{ + /* .form-control{ width: fit-content; - } + } */ + + /* .main { + height: 100%; + overflow: hidden; + overflow-y: scroll; +} */ + +/* div{ + position: relative; + + width: 100%; +} */ +/* @import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css); @import url(https://fonts.googleapis.com/css?family=Titillium+Web:300); .fa-2x { @@ -150,4 +217,4 @@ font-weight: 300; src: local('Titillium WebLight'), local('TitilliumWeb-Light'), url(http://themes.googleusercontent.com/static/fonts/titilliumweb/v2/anMUvcNT0H1YN4FII8wpr24bNCNEoFTpS2BTjF6FB5E.woff) format('woff'); } - \ No newline at end of file + */ \ No newline at end of file diff --git a/FrontEnd/Library/src/app/addbooks/addbooks.component.html b/FrontEnd/Library/src/app/addbooks/addbooks.component.html index 5a1a3787..e8536c29 100644 --- a/FrontEnd/Library/src/app/addbooks/addbooks.component.html +++ b/FrontEnd/Library/src/app/addbooks/addbooks.component.html @@ -1,94 +1,207 @@ - - - - - -
-
+ + + + + + - + + + + + + -

-
-
-

+ + + + + + + + + + + + + - - - + + + + + + - + + -
- - +
Book Results
Category-Name + + + Publication + + + Book Name + + + Auther + + + Book Copies + + + Book Cover
Category-Name + + + Publication + + + Book Name + + + Auther + + + Book Copies + + + Book Cover
{{books.category.categoryName}}{{books.publication}}{{books.booksName}}{{books.auther}}{{books.booksCopies}}        + +  + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + unfold_more - + Pagenation Controler
- \ No newline at end of file + --> diff --git a/FrontEnd/Library/src/app/addbooks/addbooks.component.ts b/FrontEnd/Library/src/app/addbooks/addbooks.component.ts index 2b0b2549..505840b5 100644 --- a/FrontEnd/Library/src/app/addbooks/addbooks.component.ts +++ b/FrontEnd/Library/src/app/addbooks/addbooks.component.ts @@ -32,7 +32,7 @@ export class AddbooksComponent implements OnInit { data: any; page:number=1; count: any; -tableSize: number = 3; +tableSize: number = 5; ProdData: any; sortedData: any; a:any; @@ -160,7 +160,8 @@ onTableDataChange(event:any) { const dialogConfig = new MatDialogConfig(); this.dialog.open(BooksComponent, { - width:'32%',height:'70%' + // width:'32%',height:'70%' + width:'55%',height:'auto' } ); @@ -177,7 +178,7 @@ onTableDataChange(event:any) { setTimeout(() => { window.location.reload() - }, 1500); + }, 1000); }, error:(msg)=>{} }) @@ -193,7 +194,7 @@ onTableDataChange(event:any) { const dialogConfig = new MatDialogConfig(); this.dialog.open(BooksComponent, { - width:'32%',height:'70%' + width:'30%',height:'70%' } ); diff --git a/FrontEnd/Library/src/app/addcategory/addcategory.component.css b/FrontEnd/Library/src/app/addcategory/addcategory.component.css index c2f650fe..46baf45a 100644 --- a/FrontEnd/Library/src/app/addcategory/addcategory.component.css +++ b/FrontEnd/Library/src/app/addcategory/addcategory.component.css @@ -1,6 +1,6 @@ table{ - width: 28%; + width: auto; border: none; text-align: center; diff --git a/FrontEnd/Library/src/app/addcategory/addcategory.component.html b/FrontEnd/Library/src/app/addcategory/addcategory.component.html index dbf0bdb7..f79951fe 100644 --- a/FrontEnd/Library/src/app/addcategory/addcategory.component.html +++ b/FrontEnd/Library/src/app/addcategory/addcategory.component.html @@ -1,5 +1,5 @@ -

+





diff --git a/FrontEnd/Library/src/app/addcategory/addcategory.component.ts b/FrontEnd/Library/src/app/addcategory/addcategory.component.ts index 395858cf..9e79391f 100644 --- a/FrontEnd/Library/src/app/addcategory/addcategory.component.ts +++ b/FrontEnd/Library/src/app/addcategory/addcategory.component.ts @@ -6,6 +6,8 @@ import { Router } from '@angular/router'; import { CategoryService } from '../category.service'; import { HttpErrorResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; +import { NgToastService } from 'ng-angular-popup'; +import { auto } from '@popperjs/core'; @Component({ selector: 'app-addcategory', @@ -39,7 +41,11 @@ result: any; category_id: any; categoryName: any; category_name: any; - constructor(private dialog: MatDialog,private router:Router ,private service:CategoryService) { + constructor(private dialog: MatDialog, + private router:Router , + private service:CategoryService, + private toast : NgToastService + ) { this.categoryList=[]; } @@ -96,10 +102,11 @@ result: any; openDialog() { - const dialogConfig = new MatDialogConfig(); + this.dialog.open(CategoryComponent, { - width:'25%',height:'35%' + // width:'25%',height:'35%' + width:'auto+50px',height:'auto' } ); @@ -112,13 +119,14 @@ openDialog() { } editCategory(categoryId:any) { - // localStorage.setItem('flag',this.flag); + localStorage.setItem('categoryId',categoryId); - const dialogConfig = new MatDialogConfig(); + this.dialog.open(CategoryComponent, { - width:'25%',height:'35%' - + // width:'25%',height:'35%' + width:'auto',height:'auto' + } ); @@ -127,14 +135,18 @@ editCategory(categoryId:any) { -deleteCategory(categoryId:any): void{ +deleteCategory(category:any): void{ if(confirm('Are you sure want to delete?')) { - console.log(categoryId); - this.service.delete(categoryId.categoryId).subscribe({next:(res)=>{ - console.log(res); - alert("item deleted"); - window.location.reload(); + + console.log("catid=",category); + this.service.delete(category.categoryId).subscribe({next:(res)=>{ + + this.toast.error({detail:'Success',summary:'The Category '+category.categoryName+' Deleted',duration:5000}); + setTimeout(() => { + window.location.reload() + }, 1500); + }, error:(msg)=>{} }) diff --git a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.css b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.css index 3c43e176..87b7c653 100644 --- a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.css +++ b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.css @@ -1,238 +1,55 @@ - - body, html { - /* fixed */ - position: relative; - margin: 0; - /* font-family: arial; */ - height: 0vh; - background: #ccc; - } - *, *:before, *:after { - box-sizing: border-box; - } - .nav-mobile { - /* position: fixed; */ - background: #446cb3; - /* background: #9f3800; */ - color: #fff; - padding: 0; - margin: 0; - cursor: auto; - font-size: 18px; - list-style-type: none; - box-shadow: 0 5px 5px -5px #333; - } - .nav-mobile:after { - content: ""; - display: table; - clear: both; - } - - - .nav-mobile li { - width: 100%; - height: 45px; - line-height: 46px; - text-align: center; - float: left; - } - .nav-mobile li a { - display: block; - color: #333; - width: 100%; - height: 100%; - text-decoration: none; - } - /* .nav-mobile .menu-button { */ - - /* absolute */ - /* position: relative; - top: 0; - left: 0; - width: 100%; - height: 100%; - margin: 0; - cursor: pointer; - display: block; - } - .nav-mobile .menu-button:after { - opacity: 0; - top: 45px; - content: ""; - width: 100vw; - display: block; */ - /* fixed - position: relative; - height: 100vh; - background: rgba(0, 0, 0, 0.5); - content: ""; - pointer-events: none; - transition: opacity 0.2s cubic-bezier(0, 0, 0.3, 1); - transition-delay: 0.1s; - } - .nav-mobile #menu-toggle { - display: none; - } - .nav-mobile #menu-toggle.active ~ .menu-button .icon-close, .nav-mobile #menu-toggle:checked ~ .menu-button .icon-close { - display: block; - } - .nav-mobile #menu-toggle.active ~ .menu-button .icon-open, .nav-mobile #menu-toggle:checked ~ .menu-button .icon-open { - display: none; - } - .nav-mobile #menu-toggle.active ~ .menu-button:after, .nav-mobile #menu-toggle:checked ~ .menu-button:after { - opacity: 1; - pointer-events: auto; - transition: opacity 0.3s cubic-bezier(0, 0, 0.3, 1); - } - .nav-mobile #menu-toggle.active ~ .menu-sidebar, .nav-mobile #menu-toggle:checked ~ .menu-sidebar { - transform: translateX(0); - transition: transform 0.3s cubic-bezier(0, 0, 0.3, 1); - } - .nav-mobile .menu-container { - width: 65px; - float: left; - cursor: pointer; */ - /* absolute */ - /* position: absolute; - - } - .nav-mobile .menu-container .menu-sidebar { - box-shadow: 5px 0 5px -5px #333; - display: block; - width: 65vw; - bottom: 0; - background: white; - color: #333; - */ - /* fixed */ - /* position: fixed; - transform: translateX(-405px); - transition: transform 0.3s cubic-bezier(0, 0, 0.3, 1); - top: 45px; - z-index: 2; - list-style-type: none; - padding: 0; - max-width: 250px; - } - .nav-mobile .menu-container .menu-sidebar .arrow { */ - /* absolute */ - /* position: absolute; - line-height: 50px; - font-size: 32px; - color: #555; - top: 0; - z-index: 0; - } - .nav-mobile .menu-container .menu-sidebar .arrow.left { - left: 25px; - } - .nav-mobile .menu-container .menu-sidebar .arrow.right { - right: 25px; - } - .nav-mobile .menu-container .menu-sidebar li { - height: 55px; - line-height: 55px; - font-size: 16px; - text-align: left; - position: relative; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding-left: 20px; - } - .nav-mobile .menu-container .menu-sidebar li:hover { - background: rgb(244, 244, 247); - } - .nav-mobile .menu-container .menu-sidebar li .menu-sub { */ - /* fixed */ - /* position: relative; - top: 0; - right: 0; - bottom: 0; - width: 0; - overflow: hidden; - background: rgb(248, 248, 250); - visibility: hidden; - transition: all 0.3s cubic-bezier(0, 0, 0.3, 1); - border-left: 1px solid #ccc; - list-style-type: none; - padding: 0; - margin: 0; - z-index: 2; - max-width: 250px; */ - /* width side */ - /* } - .nav-mobile .menu-container .menu-sidebar li .menu-sub li { - overflow: hidden; - } - .nav-mobile .menu-container .menu-sidebar li .menu-sub .menu-sub-title { - padding-left: 50px; - } - .nav-mobile .menu-container .menu-sidebar li .submenu-label { - cursor: pointer; - width: 100%; - height: 100%; - display: block; - } - .nav-mobile .menu-container .menu-sidebar li .submenu-toggle { - display: none; - } - .nav-mobile .menu-container .menu-sidebar li .submenu-toggle.active ~ .menu-sub, .nav-mobile .menu-container .menu-sidebar li .submenu-toggle:checked ~ .menu-sub { - width: 65vw; - visibility: visible; - z-index: 1; - transition: width 0.35s cubic-bezier(0, 0, 0.3, 1); - } - - .alert { - padding: 20px; - background-color: #3b9438; - color: white; - } - - .closebtn { - margin-left: 15px; - color: white; - font-weight: bold; - float: right; - font-size: 22px; - line-height: 20px; - cursor: pointer; - transition: 0.3s; - } - - .closebtn:hover { - color: black; - } - .btnItem1{ - border: none; - padding: 0; - background: none; - font-size: 18px; - font-style: normal ; - color: rgba(238, 248, 248, 0.73); +body, html { + /* fixed */ + position: relative; + margin: 0; + font-family: arial; + height: 0vh; + background: #ccc; } - - - - nav.menu-sidebar{ - z-index: 9; + *, *:before, *:after { + box-sizing: border-box; } - .menu-sidebar{ - z-index: 9; + .nav-mobile { + position: fixed; + width: 100%; + z-index: 1; + background: #446cb3; + /* background: #9f3800; */ + color: #fff; + padding: 0; + /* border:10px; */ + /* border-color: black; */ + margin: 0; + cursor: auto; + font-size: 18px; + list-style-type: none; + /* box-shadow: 0 5px 5px -5px #333; */ + } + .nav-mobile:after { + content: ""; + display: table; + clear: both; } - - .nav-mobile{ - display: block; + + + .nav-mobile li { + width: 90%; + height: 4%; + line-height: 46px; + text-align: center; + float: right; } - */ - - - - /* edited */ -/* - .menu-sidebar{ - - display: block !important; - - } */ -/* - */ + .nav-mobile li a { + display: block; + color: #333; + width: 100%; + height: 100%; + text-decoration: none; + } + + .main { + height: 100%; + width: 100%; + overflow: hidden; + overflow-y: scroll; + } \ No newline at end of file diff --git a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.html b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.html index b2cf9aad..52748234 100644 --- a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.html +++ b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.html @@ -1,17 +1,96 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.ts b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.ts index a9e9ee0d..e664e6a4 100644 --- a/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.ts +++ b/FrontEnd/Library/src/app/admin-navbar/admin-navbar.component.ts @@ -16,7 +16,7 @@ export class AdminNavbarComponent implements OnInit { } profile() { - throw new Error('Method not implemented.'); + this.router.navigate(['/view-adminprofile']) } logout() { if (confirm('Are you sure want to Logout?')) { diff --git a/FrontEnd/Library/src/app/app-routing.module.ts b/FrontEnd/Library/src/app/app-routing.module.ts index eb61dfab..1f49a951 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 { UserDetailviewComponent } from './user-detailview/user-detailview.component'; const routes: Routes = [ {path: '',redirectTo:'login',pathMatch:'full'}, @@ -63,7 +64,8 @@ const routes: Routes = [ {path:'sidenav2',component:Sidenav2Component,canActivate: [HomeguardGuard]}, {path:'navbar2',component:Navbar2Component,canActivate: [HomeguardGuard]}, {path:'sidenav2',component:Sidenav2Component,canActivate: [HomeguardGuard]}, - {path:'admin-navbar',component:AdminNavbarComponent,canActivate: [HomeguardGuard]} + {path:'admin-navbar',component:AdminNavbarComponent,canActivate: [HomeguardGuard]}, + {path:'user-detailview',component:UserDetailviewComponent,canActivate: [HomeguardGuard]} ]; @NgModule({ diff --git a/FrontEnd/Library/src/app/app.module.ts b/FrontEnd/Library/src/app/app.module.ts index 30604399..faf493b2 100644 --- a/FrontEnd/Library/src/app/app.module.ts +++ b/FrontEnd/Library/src/app/app.module.ts @@ -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 { UserDetailviewComponent } from './user-detailview/user-detailview.component'; // import {MatIconModule} from '@angular/material/icon'; // import { MatToolbarModule } from '@angular/material'; @@ -97,6 +98,7 @@ import { AdminNavbarComponent } from './admin-navbar/admin-navbar.component'; Sidenav2Component, Navbar2Component, AdminNavbarComponent, + UserDetailviewComponent, // Chart // ModalComponent diff --git a/FrontEnd/Library/src/app/body/body.component.css b/FrontEnd/Library/src/app/body/body.component.css index e69de29b..db549c8e 100644 --- a/FrontEnd/Library/src/app/body/body.component.css +++ b/FrontEnd/Library/src/app/body/body.component.css @@ -0,0 +1,5 @@ +/* .chart-container col-md-12 mb-5{ + height:30vh; + width:50vw; + margin-left: 30px +} */ \ No newline at end of file diff --git a/FrontEnd/Library/src/app/body/body.component.html b/FrontEnd/Library/src/app/body/body.component.html index 74756449..1aaea401 100644 --- a/FrontEnd/Library/src/app/body/body.component.html +++ b/FrontEnd/Library/src/app/body/body.component.html @@ -1,23 +1,50 @@ + + Admin-Dashboard + + + + + + +


+

BOOKS BY CATEGORY

{{mychart}}
- +

ISSUE AND RETURNED CHART

{{bar}}
- \ No newline at end of file diff --git a/FrontEnd/Library/src/app/books/books.component.html b/FrontEnd/Library/src/app/books/books.component.html index 88f40006..4c509fff 100644 --- a/FrontEnd/Library/src/app/books/books.component.html +++ b/FrontEnd/Library/src/app/books/books.component.html @@ -1,3 +1,31 @@ + + Borrow + + +
diff --git a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css index 25076cfb..b3bb64ee 100644 --- a/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css +++ b/FrontEnd/Library/src/app/booksdisplay/booksdisplay.component.css @@ -2,7 +2,7 @@ p{ padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - background-image: url('../../../a.png'); + /* background-image: url('../../../a.png'); */ } diff --git a/FrontEnd/Library/src/app/borrow-detail-view/borrow-detail-view.component.css b/FrontEnd/Library/src/app/borrow-detail-view/borrow-detail-view.component.css index fd0373aa..a96ee23b 100644 --- a/FrontEnd/Library/src/app/borrow-detail-view/borrow-detail-view.component.css +++ b/FrontEnd/Library/src/app/borrow-detail-view/borrow-detail-view.component.css @@ -2,7 +2,7 @@ p{ padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - background-image: url('../../../a.png'); + /* background-image: url('../../../a.png'); */ } diff --git a/FrontEnd/Library/src/app/borrow/borrow.component.css b/FrontEnd/Library/src/app/borrow/borrow.component.css index e697fb10..8ff5235b 100644 --- a/FrontEnd/Library/src/app/borrow/borrow.component.css +++ b/FrontEnd/Library/src/app/borrow/borrow.component.css @@ -1,108 +1,54 @@ - -.btnn{ - padding-left: 10px;padding-right: 10px; - border-color: rgb(0, 0, 0); - background-color: rgba(107, 235, 48, 0.853); - font-size: 13px; -} -.btnn1{ - padding-left: 13px;padding-right: 13px; - border-color: rgb(0, 0, 0); - background-color: rgba(179, 58, 216, 0.705); - margin-left: -19px; - font-size: 13px; -} -.btnn0{ - padding-left: 10px;padding-right: 10px; - border-color: rgb(0, 0, 0); - background-color: rgba(0, 247, 49, 0.812); - font-size: 13px; - margin-left: 23px; - /* position:absolute; left:1180px; */ + .split { + height: 100%; + /* width: 50%; */ + position: fixed; + /* z-index: 1; */ + top: 5%; + overflow-x: hidden; + padding-top: 20px; + } + + .left { + left: 0; + width: 18%; + z-index: 1; + background-color: #111; + } + + .right { + right: 0; + width: 80%; + background-color: rgb(255, 255, 255); + /* overflow-x: hidden; */ + } + + .centered { + position: relative; + top: 4%; + left: 70%; + transform: translate(-50%, -50%); + text-align: center; + display: flex; + flex-wrap: nowrap; + flex-direction: row; -} -.btnn2{ - padding-left: 10px;padding-right: 10px; - border-color: rgb(0, 0, 0); - background-color: rgb(216, 40, 40); - font-size: 13px; - -} + } + .table-responsive{ + overflow-x: hidden; + } -.text-danger1{ - width: 160%; - padding: 8px 6px; - margin: 0px; - box-sizing: border-box; - border: 1px ; - background-color: #a7bdb08f; - color: rgb(0, 0, 0); - border-radius: 7px; - -} -.dropbtn{ - width: 160%; - padding: 8px 6px; - margin: 0px; - box-sizing: border-box; - border: 1px ; - background-color: #a7bdb08f; - color: rgb(0, 0, 0); - border-radius: 7px; -} -.btn{ - width: 150%; - padding: 7px 2px; - margin: 5px ; - box-sizing: border-box; - border: 2px solid rgb(250, 97, 97); - background-color:rgba(106, 215, 56, 0.682); - color: rgb(0, 0, 0); - border-radius: 7px; -} - - - .btnList{ - border: none; - padding: 1px; - background: rgb(0, 0, 0); - font-size: 13px; - font-style: italic ; - color: rgb(255, 255, 255); - border-radius: 3px; -} -/* -.table-bordered{ - border: 1px solid; -} -th { - background-color: #232524; - color: white; - width: 8%; - text-align: center; - margin-left: 5px; - margin-right: 5px; - } - td { - background-color: #a7bdb08f; - color: rgb(0, 0, 0); - width: 8%; - text-align: center; - margin-top: auto; - margin-left: 5px; - margin-right: 5px; - padding: auto; - } */ table{ - width: 80%; + width: 90%; border: none; text-align: center; + + } th { diff --git a/FrontEnd/Library/src/app/borrow/borrow.component.html b/FrontEnd/Library/src/app/borrow/borrow.component.html index 0241aacc..7dfec7d2 100644 --- a/FrontEnd/Library/src/app/borrow/borrow.component.html +++ b/FrontEnd/Library/src/app/borrow/borrow.component.html @@ -1,6 +1,37 @@ +

+ + Borrow + + + + + + + + + + +
+
@@ -8,18 +39,21 @@

Borrow Details

- -
-
-START DATE          -END DATE         +
+ +
+          + +                  
-
- - +
+ + + +
@@ -77,10 +111,7 @@

Borrow Details

- +
- - + +
+ @@ -150,6 +182,7 @@

Borrow Details

Borrow
+
@@ -157,4 +190,8 @@

Borrow Details

-
\ No newline at end of file +
+ +
+ +
\ No newline at end of file diff --git a/FrontEnd/Library/src/app/borrow/borrow.component.ts b/FrontEnd/Library/src/app/borrow/borrow.component.ts index 3870b372..12530ac9 100644 --- a/FrontEnd/Library/src/app/borrow/borrow.component.ts +++ b/FrontEnd/Library/src/app/borrow/borrow.component.ts @@ -15,7 +15,7 @@ import { NgToastService } from 'ng-angular-popup'; styleUrls: ['./borrow.component.css'] }) export class BorrowComponent implements OnInit { - + val: any; key: any; curDate= new Date() myDate:any; @@ -58,8 +58,9 @@ export class BorrowComponent implements OnInit { ngOnInit(): void { - - + this.date = new Date(); + console.log("today-",this.date) + sessionStorage.clear() this.LoadData(); @@ -124,7 +125,7 @@ export class BorrowComponent implements OnInit { } sortfilter(a:any){ - + this.sort=a; this.page=this.page; this.tableSize; @@ -144,7 +145,7 @@ export class BorrowComponent implements OnInit { getFilter() { - +console.log("d=",this.ObjSampleForm.controls['date1'].value) this.flag=1; this.service.filterBorrowPagination(this.ObjSampleForm.controls['date1'].value,this.ObjSampleForm.controls['date2'].value,this.page,this.tableSize,this.sort,this.direction1).subscribe(response=>{ this.result=response.content; @@ -225,7 +226,11 @@ export class BorrowComponent implements OnInit { } bookReturn(borrow: any) { - + console.log(borrow) + if(borrow.paymentStatus=="UNPAID"){ + alert("FINE IS NOT PAIDED") + } + else{ this.service.bookReturn(borrow.borrowId).subscribe({ next: (Response: any) => { console.log(Response); @@ -242,8 +247,13 @@ export class BorrowComponent implements OnInit { } }) this.router.navigate(['/borrow']) + } } - + datas(){ + this.val=this.ObjSampleForm.controls['date1'].value; + console.log("date=",this.val) + } + undo(borrow: any) { alert(" Are you want to undo last change?") diff --git a/FrontEnd/Library/src/app/borrowhistory/borrowhistory.component.css b/FrontEnd/Library/src/app/borrowhistory/borrowhistory.component.css index 486c4556..325b26b7 100644 --- a/FrontEnd/Library/src/app/borrowhistory/borrowhistory.component.css +++ b/FrontEnd/Library/src/app/borrowhistory/borrowhistory.component.css @@ -2,7 +2,7 @@ p{ padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - background-image: url('../../../a.png'); + /* background-image: url('../../../a.png'); */ } diff --git a/FrontEnd/Library/src/app/category/category.component.css b/FrontEnd/Library/src/app/category/category.component.css index a18723bc..efeba6ea 100644 --- a/FrontEnd/Library/src/app/category/category.component.css +++ b/FrontEnd/Library/src/app/category/category.component.css @@ -1,58 +1,5 @@ -.text-danger1{ - - width: 160%; - padding: 8px 6px; - margin: 0px; - box-sizing: border-box; - border: 1px ; - background-color: #a7bdb08f; - color: rgb(0, 0, 0); - border-radius: 7px; - -} - -.btn{ - width: 100%; - padding: 7px 2px; - margin: 5px ; - box-sizing: border-box; - border: 2px solid rgb(0, 0, 0); - background-color:rgba(106, 215, 56, 0.682); - color: rgb(0, 0, 0); - border-radius: 7px; -} -.table-bordered{ - border: 1px solid; -} -th { - background-color: #232524; - color: white; - width: 15%; - text-align: center; - } - td { - background-color: #a7bdb08f; - color: rgb(0, 0, 0); - width: 15%; - text-align: center; - margin-top: auto; - padding: auto; - } - - - .btnList{ - border: none; - padding: 1px; - background: rgb(0, 0, 0); - font-size: 13px; - font-style: italic ; - color: rgb(255, 255, 255); - border-radius: 3px; -} - - mat-dialog-content{ width: 100%; text-align: center; diff --git a/FrontEnd/Library/src/app/category/category.component.ts b/FrontEnd/Library/src/app/category/category.component.ts index 86125cb3..14b2c4bb 100644 --- a/FrontEnd/Library/src/app/category/category.component.ts +++ b/FrontEnd/Library/src/app/category/category.component.ts @@ -3,6 +3,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; import { CategoryService } from '../category.service'; import {MatDialog, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog'; +import { NgToastService } from 'ng-angular-popup'; @@ -29,7 +30,8 @@ ObjSampleForm:FormGroup; constructor( private router:Router , - private service:CategoryService, + private service:CategoryService, + private toast : NgToastService, ) { this.ObjSampleForm=new FormGroup( @@ -84,8 +86,13 @@ onSubmit(){ console.log(result); if(result.categoryId){ console.log(result); - alert("Category added"); - window.location.reload(); + this.toast.success({detail:'Success',summary:'The Category '+result.categoryName+' Added',duration:5000}); + + setTimeout(() => { + window.location.reload() + }, 1500); + + } else{ alert("category Not added"); @@ -103,12 +110,16 @@ updateCategory(categoryId:any){ this.service.update(categoryId, body).subscribe({ next: (Response: any) => { console.log(Response); - alert(" Edited successfully") - window.location.reload() + // alert(" Edited successfully") + this.toast.success({detail:'Success',summary:'The Category - '+Response.categoryName+' Edited',duration:5000}); + setTimeout(() => { + window.location.reload() + }, 1500); + // window.location.reload() }, error: (Response: any) => { console.log(Response) - alert("invalid Contact") + alert("invalid Category credentials") } }) localStorage.removeItem('categoryId'); @@ -120,10 +131,6 @@ updateCategory(categoryId:any){ window.location.reload() } - home() - { - this.router.navigate(['/sidenav']) - } } diff --git a/FrontEnd/Library/src/app/demo/demo.component.css b/FrontEnd/Library/src/app/demo/demo.component.css index c2552ce8..9da42b52 100644 --- a/FrontEnd/Library/src/app/demo/demo.component.css +++ b/FrontEnd/Library/src/app/demo/demo.component.css @@ -1,68 +1,55 @@ -/*
- -
- - - - -

Disabled Backdrop

-
- - -

- This sidenav is not showing any backdrop, where users can click on it, to close the sidenav. -

- - Close this Sidenav - -
- -
- - - -
-

- Developers can also disable the backdrop of the sidenav.
- This will disable the functionality to click outside to close the sidenav. -

- -
- - Toggle Sidenav - -
- -
- -
- -
- -
*/ - -.nav-mobile1{ - /* position: fixed; */ - background: #446cb3; - /* background: #9f3800; */ - color: #fff; - padding: 30; - margin: 0; - cursor: auto; - font-size: 18px; - /* list-style-type: none; */ - box-shadow: 0 5px 5px -5px #333; - position:fixed; -} - -@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css); body, html { - height: 100%; -} + /* fixed */ + position: relative; + margin: 0; + font-family: arial; + height: 0vh; + background: #ccc; + } + *, *:before, *:after { + box-sizing: border-box; + } + .nav-mobile { + position: fixed; + width: 100%; + z-index: 1; + background: #446cb3; + /* background: #9f3800; */ + color: #fff; + padding: 0; + /* border:10px; */ + /* border-color: black; */ + margin: 0; + cursor: auto; + font-size: 18px; + list-style-type: none; + /* box-shadow: 0 5px 5px -5px #333; */ + } + .nav-mobile:after { + content: ""; + display: table; + clear: both; + } + + + .nav-mobile li { + width: 100%; + height: 4%; + line-height: 46px; + text-align: center; + float: left; + } + .nav-mobile li a { + display: block; + color: #333; + width: 100%; + height: 100%; + text-decoration: none; + } -@media (min-width: 768px) { - aside { + .main { height: 100%; - } -} + width: 100%; + overflow: hidden; + overflow-y: scroll; + } \ No newline at end of file diff --git a/FrontEnd/Library/src/app/demo/demo.component.html b/FrontEnd/Library/src/app/demo/demo.component.html index d581869b..3fe58df1 100644 --- a/FrontEnd/Library/src/app/demo/demo.component.html +++ b/FrontEnd/Library/src/app/demo/demo.component.html @@ -1,57 +1,63 @@ - - - -
-
- - -
-
\ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/FrontEnd/Library/src/app/findby-category/findby-category.component.css b/FrontEnd/Library/src/app/findby-category/findby-category.component.css index cfe63df0..a1d7c238 100644 --- a/FrontEnd/Library/src/app/findby-category/findby-category.component.css +++ b/FrontEnd/Library/src/app/findby-category/findby-category.component.css @@ -2,7 +2,7 @@ p{ padding: 0px 0px 30px 1000px; margin: 0px; background-color: rgb(0, 0, 0); - background-image: url('../../../a.png'); + /* background-image: url('../../../a.png'); */ } diff --git a/FrontEnd/Library/src/app/fine/fine.component.css b/FrontEnd/Library/src/app/fine/fine.component.css index d1d6ed8d..d2cd3da3 100644 --- a/FrontEnd/Library/src/app/fine/fine.component.css +++ b/FrontEnd/Library/src/app/fine/fine.component.css @@ -1,6 +1,44 @@ +.split { + height: 100%; + /* width: 50%; */ + position: fixed; + /* z-index: 1; */ + top: 5%; + overflow-x: hidden; + padding-top: 20px; +} + +.left { + left: 0; + width: 18%; + z-index: 1; + background-color: #111; +} + +.right { + right: 0; + width: 80%; + background-color: rgb(255, 255, 255); + /* float:left; */ + position: relative; + left: 16%; + top:10%; +} + +.centered { + position: relative; + top: 45%; + left: 40%; + transform: translate(-50%, -50%); + text-align: center; +} + + + + table{ - width: 78%; + width: 90%; border: none; text-align: center; position:relative; @@ -10,7 +48,7 @@ table{ background-color: #ffffff; color: rgb(0, 0, 0); text-align: center; - border: none; + /* border: none; */ position:relative; } @@ -34,123 +72,11 @@ table{ - - -@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css); -@import url(https://fonts.googleapis.com/css?family=Titillium+Web:300); -.fa-2x { - font-size: 2em; - } - .fa { - position: relative; - display: table-cell; - width: 60px; - height: 36px; - text-align: center; - vertical-align: middle; - font-size:20px; - } - - .main-menu { - background:#446cb3; - border-right:0px solid #030303; - position:absolute; - top:0; - bottom:0; - height:100%; - left:0; - width:220px; - overflow:auto; - -webkit-transition:width .05s linear; - transition:width .05s linear; - -webkit-transform:translateZ(0) scale(1,1); - z-index:1000; - } - - .main-menu>ul { - margin:7px 0; - } - body{height: 0vh; - background-color: #030303; - } - .main-menu li { - position:relative; - display:block; - width:250px; - } - - .main-menu li>a { - position:relative; - display:table; - border-collapse:collapse; - border-spacing:0; - color:rgb(237, 248, 244); - font-family: arial; - font-size: 14px; - text-decoration:none; - -webkit-transform:translateZ(0) scale(1,1); - -webkit-transition:all .1s linear; - transition:all .1s linear; - } - - .main-menu .nav-icon { - position:relative; - display:table-cell; - width:60px; - height:36px; - text-align:center; - vertical-align:middle; - font-size:18px; - } - - .main-menu .nav-text { - position:relative; - display:table-cell; - vertical-align:middle; - width:190px; - font-family: 'Titillium Web', sans-serif; - } - - .main-menu>ul.logout { - position:absolute; - left:0; - bottom:0; - } - - .no-touch .scrollable.hover { +.no-touch .scrollable.hover { overflow-y:hidden; } .no-touch .scrollable.hover:hover { overflow-y:auto; overflow:visible; - } - - a:hover,a:focus { - text-decoration:none; - } - - nav { - -webkit-user-select:none; - -moz-user-select:none; - -ms-user-select:none; - -o-user-select:none; - user-select:none; - } - - nav ul,nav li { - outline:0; - margin:0; - padding:0; - } - .main-menu li:hover>a,nav.main-menu li.active>a,.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus,.no-touch .dashboard-page nav.dashboard-menu ul li:hover a,.dashboard-page nav.dashboard-menu ul li.active a { - color:rgb(243, 234, 234); - background-color:#565985; - } - @font-face { - font-family: 'Titillium Web'; - font-style: normal; - font-weight: 300; - src: local('Titillium WebLight'), local('TitilliumWeb-Light'), url(http://themes.googleusercontent.com/static/fonts/titilliumweb/v2/anMUvcNT0H1YN4FII8wpr24bNCNEoFTpS2BTjF6FB5E.woff) format('woff'); - } - \ No newline at end of file + } \ No newline at end of file diff --git a/FrontEnd/Library/src/app/fine/fine.component.html b/FrontEnd/Library/src/app/fine/fine.component.html index 629c3ec8..f06a33c9 100644 --- a/FrontEnd/Library/src/app/fine/fine.component.html +++ b/FrontEnd/Library/src/app/fine/fine.component.html @@ -1,129 +1,120 @@ - - - + -
-