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 @@
-
-
-
-
-
-
-
-
-->
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 @@
-
+
ADD CATEGORY
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
+
+
+