From 804ad0fbe2b25b448fd70b241dd156ad16947e9f Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Fri, 27 Jun 2025 06:46:14 +0000 Subject: [PATCH] build_app --- .../Builders/Services/BuilderService.java | 12 + .../Controllers/ManufacturerController.java | 99 ++ .../Manufacturer_ListFilter1Controller.java | 24 + .../Order_estimationController.java | 171 +++ .../Controllers/ProductController.java | 107 ++ .../Product_ListFilter1Controller.java | 24 + .../Controllers/TypeController.java | 107 ++ .../Type_ListFilter1Controller.java | 24 + .../tokenFree_ManufacturerController.java | 99 ++ ...ee_Manufacturer_ListFilter1Controller.java | 24 + .../tokenFree_Order_estimationController.java | 171 +++ .../tokenFree_ProductController.java | 107 ++ ...kenFree_Product_ListFilter1Controller.java | 24 + .../Controllers/tokenFree_TypeController.java | 107 ++ .../tokenFree_Type_ListFilter1Controller.java | 24 + .../order_estimation/Entity/Manufacturer.java | 33 + .../Entity/Manufacturer_ListFilter1.java | 14 + .../Entity/Order_estimation.java | 132 ++ .../order_estimation/Entity/Product.java | 37 + .../Entity/Product_ListFilter1.java | 14 + .../realnet/order_estimation/Entity/Type.java | 37 + .../Entity/Type_ListFilter1.java | 14 + .../Repository/ManufacturerRepository.java | 30 + .../Order_estimationRepository.java | 48 + .../Repository/ProductRepository.java | 32 + .../Repository/TypeRepository.java | 32 + .../Services/ManufacturerService.java | 93 ++ .../Manufacturer_ListFilter1Service.java | 51 + .../Services/Order_estimationService.java | 265 ++++ .../Services/ProductService.java | 103 ++ .../Services/Product_ListFilter1Service.java | 57 + .../Services/TypeService.java | 103 ++ .../Services/Type_ListFilter1Service.java | 57 + .../authsec_mysql/mysql/wf_table/wf_table.sql | 8 + .../login/login-page/login_environment.ts | 18 +- .../Manufacturer/Manufacturer.component.html | 376 ++++++ .../Manufacturer/Manufacturer.component.scss | 78 ++ .../Manufacturer/Manufacturer.component.ts | 270 ++++ .../Manufacturer/Manufacturer.service.ts | 39 + .../Manufacturer/Manufacturer_cardvariable.ts | 4 + .../Order_estimation.component.html | 1110 +++++++++++++++++ .../Order_estimation.component.scss | 78 ++ .../Order_estimation.component.ts | 750 +++++++++++ .../Order_estimation.service.ts | 70 ++ .../Order_estimation_cardvariable.ts | 4 + .../Product/Product.component.html | 405 ++++++ .../Product/Product.component.scss | 78 ++ .../Product/Product.component.ts | 294 +++++ .../Product/Product.service.ts | 41 + .../Product/Product_cardvariable.ts | 4 + .../order_estimation/Type/Type.component.html | 405 ++++++ .../order_estimation/Type/Type.component.scss | 78 ++ .../order_estimation/Type/Type.component.ts | 294 +++++ .../order_estimation/Type/Type.service.ts | 41 + .../Type/Type_cardvariable.ts | 4 + .../app/modules/main/main-routing.module.ts | 16 + .../src/app/modules/main/main.module.ts | 16 + .../src/assets/i18n/en.json | 37 +- 58 files changed, 6780 insertions(+), 14 deletions(-) create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ManufacturerController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Manufacturer_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Order_estimationController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ProductController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Product_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/TypeController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Type_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ManufacturerController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Order_estimationController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ProductController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Product_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_TypeController.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Type_ListFilter1Controller.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer_ListFilter1.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Order_estimation.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product_ListFilter1.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type_ListFilter1.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ManufacturerRepository.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/Order_estimationRepository.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ProductRepository.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/TypeRepository.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ManufacturerService.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Manufacturer_ListFilter1Service.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Order_estimationService.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ProductService.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Product_ListFilter1Service.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/TypeService.java create mode 100644 orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Type_ListFilter1Service.java create mode 100755 orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.html create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.scss create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.service.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer_cardvariable.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.html create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.scss create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.service.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation_cardvariable.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.html create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.scss create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.service.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product_cardvariable.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.html create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.scss create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.service.ts create mode 100644 orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type_cardvariable.ts diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index f9801fb..1cff1bb 100644 --- a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,18 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Order_estimation","Order_estimation", "Transcations"); + + +addCustomMenu( "Product","Product", "Transcations"); + + +addCustomMenu( "Type","Type", "Transcations"); + + +addCustomMenu( "Manufacturer","Manufacturer", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ManufacturerController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ManufacturerController.java new file mode 100644 index 0000000..f8c8378 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ManufacturerController.java @@ -0,0 +1,99 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Manufacturer; +import com.realnet.order_estimation.Services.ManufacturerService ; + + + + + + +@RequestMapping(value = "/Manufacturer") + @CrossOrigin("*") +@RestController +public class ManufacturerController { + @Autowired + private ManufacturerService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Manufacturer") + public Manufacturer Savedata(@RequestBody Manufacturer data) { + Manufacturer save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Manufacturer/{id}") + public Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) { + Manufacturer update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Manufacturer/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Manufacturer") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Manufacturer") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Manufacturer/{id}") + public Manufacturer getdetailsbyId(@PathVariable Integer id ) { + Manufacturer get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Manufacturer/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Manufacturer_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Manufacturer_ListFilter1Controller.java new file mode 100644 index 0000000..bfc4e3b --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Manufacturer_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1; +import com.realnet.order_estimation.Services.Manufacturer_ListFilter1Service ; +@RequestMapping(value = "/Manufacturer_ListFilter1") +@RestController +public class Manufacturer_ListFilter1Controller { + + @Autowired + private Manufacturer_ListFilter1Service Service; + + @GetMapping("/Manufacturer_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Manufacturer_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Order_estimationController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Order_estimationController.java new file mode 100644 index 0000000..d14b371 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Order_estimationController.java @@ -0,0 +1,171 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Order_estimation; +import com.realnet.order_estimation.Services.Order_estimationService ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Order_estimation") + @CrossOrigin("*") +@RestController +public class Order_estimationController { + @Autowired + private Order_estimationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Order_estimation") + public Order_estimation Savedata(@RequestBody Order_estimation data) { + Order_estimation save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Order_estimation/{id}") + public Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) { + Order_estimation update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Order_estimation/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Order_estimation") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Order_estimation") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Order_estimation/{id}") + public Order_estimation getdetailsbyId(@PathVariable Integer id ) { + Order_estimation get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Order_estimation/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ProductController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ProductController.java new file mode 100644 index 0000000..845599c --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/ProductController.java @@ -0,0 +1,107 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Product; +import com.realnet.order_estimation.Services.ProductService ; + + + + + + + + +@RequestMapping(value = "/Product") + @CrossOrigin("*") +@RestController +public class ProductController { + @Autowired + private ProductService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Product") + public Product Savedata(@RequestBody Product data) { + Product save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Product/{id}") + public Product update(@RequestBody Product data,@PathVariable Integer id ) { + Product update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Product/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Product") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Product") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Product/{id}") + public Product getdetailsbyId(@PathVariable Integer id ) { + Product get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Product/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Product_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Product_ListFilter1Controller.java new file mode 100644 index 0000000..61848dc --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Product_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Product_ListFilter1; +import com.realnet.order_estimation.Services.Product_ListFilter1Service ; +@RequestMapping(value = "/Product_ListFilter1") +@RestController +public class Product_ListFilter1Controller { + + @Autowired + private Product_ListFilter1Service Service; + + @GetMapping("/Product_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Product_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/TypeController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/TypeController.java new file mode 100644 index 0000000..61d6a3f --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/TypeController.java @@ -0,0 +1,107 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Type; +import com.realnet.order_estimation.Services.TypeService ; + + + + + + + + +@RequestMapping(value = "/Type") + @CrossOrigin("*") +@RestController +public class TypeController { + @Autowired + private TypeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Type") + public Type Savedata(@RequestBody Type data) { + Type save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Type/{id}") + public Type update(@RequestBody Type data,@PathVariable Integer id ) { + Type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Type/{id}") + public Type getdetailsbyId(@PathVariable Integer id ) { + Type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Type_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Type_ListFilter1Controller.java new file mode 100644 index 0000000..6f40ea5 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/Type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Type_ListFilter1; +import com.realnet.order_estimation.Services.Type_ListFilter1Service ; +@RequestMapping(value = "/Type_ListFilter1") +@RestController +public class Type_ListFilter1Controller { + + @Autowired + private Type_ListFilter1Service Service; + + @GetMapping("/Type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Type_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ManufacturerController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ManufacturerController.java new file mode 100644 index 0000000..b66b960 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ManufacturerController.java @@ -0,0 +1,99 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Manufacturer; +import com.realnet.order_estimation.Services.ManufacturerService ; + + + + + + +@RequestMapping(value = "/token/Manufacturer") + @CrossOrigin("*") +@RestController +public class tokenFree_ManufacturerController { + @Autowired + private ManufacturerService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Manufacturer") + public Manufacturer Savedata(@RequestBody Manufacturer data) { + Manufacturer save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Manufacturer/{id}") + public Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) { + Manufacturer update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Manufacturer/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Manufacturer") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Manufacturer") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Manufacturer/{id}") + public Manufacturer getdetailsbyId(@PathVariable Integer id ) { + Manufacturer get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Manufacturer/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java new file mode 100644 index 0000000..31f979b --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1; +import com.realnet.order_estimation.Services.Manufacturer_ListFilter1Service ; +@RequestMapping(value = "/token/Manufacturer_ListFilter1") +@RestController +public class tokenFree_Manufacturer_ListFilter1Controller { + + @Autowired + private Manufacturer_ListFilter1Service Service; + + @GetMapping("/Manufacturer_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Manufacturer_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Order_estimationController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Order_estimationController.java new file mode 100644 index 0000000..192263f --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Order_estimationController.java @@ -0,0 +1,171 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Order_estimation; +import com.realnet.order_estimation.Services.Order_estimationService ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Order_estimation") + @CrossOrigin("*") +@RestController +public class tokenFree_Order_estimationController { + @Autowired + private Order_estimationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Order_estimation") + public Order_estimation Savedata(@RequestBody Order_estimation data) { + Order_estimation save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Order_estimation/{id}") + public Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) { + Order_estimation update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Order_estimation/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Order_estimation") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Order_estimation") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Order_estimation/{id}") + public Order_estimation getdetailsbyId(@PathVariable Integer id ) { + Order_estimation get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Order_estimation/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ProductController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ProductController.java new file mode 100644 index 0000000..cc298e3 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_ProductController.java @@ -0,0 +1,107 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Product; +import com.realnet.order_estimation.Services.ProductService ; + + + + + + + + +@RequestMapping(value = "/token/Product") + @CrossOrigin("*") +@RestController +public class tokenFree_ProductController { + @Autowired + private ProductService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Product") + public Product Savedata(@RequestBody Product data) { + Product save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Product/{id}") + public Product update(@RequestBody Product data,@PathVariable Integer id ) { + Product update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Product/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Product") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Product") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Product/{id}") + public Product getdetailsbyId(@PathVariable Integer id ) { + Product get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Product/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Product_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Product_ListFilter1Controller.java new file mode 100644 index 0000000..4ec05cd --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Product_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Product_ListFilter1; +import com.realnet.order_estimation.Services.Product_ListFilter1Service ; +@RequestMapping(value = "/token/Product_ListFilter1") +@RestController +public class tokenFree_Product_ListFilter1Controller { + + @Autowired + private Product_ListFilter1Service Service; + + @GetMapping("/Product_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Product_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_TypeController.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_TypeController.java new file mode 100644 index 0000000..c508a20 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_TypeController.java @@ -0,0 +1,107 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.order_estimation.Entity.Type; +import com.realnet.order_estimation.Services.TypeService ; + + + + + + + + +@RequestMapping(value = "/token/Type") + @CrossOrigin("*") +@RestController +public class tokenFree_TypeController { + @Autowired + private TypeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Type") + public Type Savedata(@RequestBody Type data) { + Type save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Type/{id}") + public Type update(@RequestBody Type data,@PathVariable Integer id ) { + Type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Type/{id}") + public Type getdetailsbyId(@PathVariable Integer id ) { + Type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Type_ListFilter1Controller.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Type_ListFilter1Controller.java new file mode 100644 index 0000000..b356876 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Controllers/tokenFree_Type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.order_estimation.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.order_estimation.Entity.Type_ListFilter1; +import com.realnet.order_estimation.Services.Type_ListFilter1Service ; +@RequestMapping(value = "/token/Type_ListFilter1") +@RestController +public class tokenFree_Type_ListFilter1Controller { + + @Autowired + private Type_ListFilter1Service Service; + + @GetMapping("/Type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Type_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer.java new file mode 100644 index 0000000..cae02e1 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer.java @@ -0,0 +1,33 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Manufacturer extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String manufacture; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer_ListFilter1.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer_ListFilter1.java new file mode 100644 index 0000000..50f71dd --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Manufacturer_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Manufacturer_ListFilter1 { + + private Integer id; + + + private String manufacture; +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Order_estimation.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Order_estimation.java new file mode 100644 index 0000000..6f4a1b3 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Order_estimation.java @@ -0,0 +1,132 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Order_estimation extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String customer_name; + +@Column(length = 2000) +private String contact_person; + + private String phone_number; + +@Column(length = 2000) +private String customer_address; + +private String deployment_type; + + + + +private boolean ups_monitoring; + + + +private boolean active_energy; + + + +private boolean water_management__stp_etp; + + + +private boolean dg_monitoring___with_fuel; + + + +private boolean dg_monitoring___without_fuel; + + + +private boolean apfc_panel_monitoring; + + + +private boolean busbar_monitoring; + + + +private boolean lt_panel_monitoring; + + + +private boolean ht_panel_monitoring; + + + +private boolean compressed_air__gas_monotoring; + + + +private boolean compress_air___lpg_o2_n2_co2; + + + +private boolean water_management__water_quality; + + + +private boolean water_management___water_monitoring; + + + +private String manufacturer; +private String manufacturername; + +private String type; + + + + + +private String product; + + + + + +private int price; + +private int quantity; + +private String total; + + +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product.java new file mode 100644 index 0000000..44c138d --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product.java @@ -0,0 +1,37 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Product extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String product; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String type; + + +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product_ListFilter1.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product_ListFilter1.java new file mode 100644 index 0000000..7e51467 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Product_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Product_ListFilter1 { + + private Integer id; + + + private String product; +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type.java new file mode 100644 index 0000000..e2d23ea --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type.java @@ -0,0 +1,37 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Type extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String type; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String manufacturer; + + +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type_ListFilter1.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type_ListFilter1.java new file mode 100644 index 0000000..1098e0d --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Entity/Type_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.order_estimation.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Type_ListFilter1 { + + private Integer id; + + + private String type; +} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ManufacturerRepository.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ManufacturerRepository.java new file mode 100644 index 0000000..91f1e81 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ManufacturerRepository.java @@ -0,0 +1,30 @@ +package com.realnet.order_estimation.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.order_estimation.Entity.Manufacturer; + +@Repository +public interface ManufacturerRepository extends JpaRepository { + +@Query(value = "select * from manufacturer where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from manufacturer where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/Order_estimationRepository.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/Order_estimationRepository.java new file mode 100644 index 0000000..9396a63 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/Order_estimationRepository.java @@ -0,0 +1,48 @@ +package com.realnet.order_estimation.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.order_estimation.Entity.Order_estimation; + +@Repository +public interface Order_estimationRepository extends JpaRepository { + +@Query(value = "select * from order_estimation where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from order_estimation where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ProductRepository.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ProductRepository.java new file mode 100644 index 0000000..b30e528 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/ProductRepository.java @@ -0,0 +1,32 @@ +package com.realnet.order_estimation.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + +import com.realnet.order_estimation.Entity.Product; + +@Repository +public interface ProductRepository extends JpaRepository { + +@Query(value = "select * from product where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from product where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/TypeRepository.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/TypeRepository.java new file mode 100644 index 0000000..16173ee --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Repository/TypeRepository.java @@ -0,0 +1,32 @@ +package com.realnet.order_estimation.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + +import com.realnet.order_estimation.Entity.Type; + +@Repository +public interface TypeRepository extends JpaRepository { + +@Query(value = "select * from type where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from type where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ManufacturerService.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ManufacturerService.java new file mode 100644 index 0000000..b3a0699 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ManufacturerService.java @@ -0,0 +1,93 @@ +package com.realnet.order_estimation.Services; +import com.realnet.order_estimation.Repository.ManufacturerRepository; +import com.realnet.order_estimation.Entity.Manufacturer +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class ManufacturerService { +@Autowired +private ManufacturerRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Manufacturer Savedata(Manufacturer data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Manufacturer save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Manufacturer getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Manufacturer update(Manufacturer data,Integer id) { + Manufacturer old = Repository.findById(id).get(); +old.setManufacture(data.getManufacture()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Manufacturer test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Manufacturer_ListFilter1Service.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Manufacturer_ListFilter1Service.java new file mode 100644 index 0000000..f05fd72 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Manufacturer_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.order_estimation.Services; +import java.util.*; +import com.realnet.order_estimation.Repository.ManufacturerRepository; +import com.realnet.order_estimation.Entity.Manufacturer; + +import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Manufacturer_ListFilter1Service { +@Autowired +private ManufacturerRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Manufacturer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setManufacture(data.getManufacture()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Manufacturer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setManufacture(data.getManufacture()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Order_estimationService.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Order_estimationService.java new file mode 100644 index 0000000..c8ec325 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Order_estimationService.java @@ -0,0 +1,265 @@ +package com.realnet.order_estimation.Services; +import com.realnet.order_estimation.Repository.Order_estimationRepository; +import com.realnet.order_estimation.Entity.Order_estimation +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + +import com.realnet.order_estimation.Entity.Manufacturer; +import com.realnet.order_estimation.Services.ManufacturerService; + + + + + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Order_estimationService { +@Autowired +private Order_estimationRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + +@Autowired + private ManufacturerService manufacturerserv; + + + + + + + + + + + +public Order_estimation Savedata(Order_estimation data) { + + + + + + + + + + + + + + +if (data.getManufacturer() != null) { + try { + int manufacturerId = Integer.valueOf(data.getManufacturer()); +Manufacturer get = manufacturerserv.getdetailsbyId(manufacturerId); + if (get != null) { + + data.setManufacturername(get.getManufacture()); +} +} catch (NumberFormatException e) { + System.out.println(" manufacturerId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Order_estimation save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Order_estimation getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Order_estimation update(Order_estimation data,Integer id) { + Order_estimation old = Repository.findById(id).get(); +old.setCustomer_name(data.getCustomer_name()); + +old.setContact_person(data.getContact_person()); + +old.setPhone_number(data.getPhone_number()); + +old.setCustomer_address(data.getCustomer_address()); + +old.setDeployment_type(data.getDeployment_type()); + + + +old.setActive_energy(data.isActive_energy()); + + + +old.setDg_monitoring___with_fuel(data.isDg_monitoring___with_fuel()); + + + +old.setDg_monitoring___without_fuel(data.isDg_monitoring___without_fuel()); + + + +old.setUps_monitoring(data.isUps_monitoring()); + + + +old.setWater_management__water_quality(data.isWater_management__water_quality()); + + + +old.setApfc_panel_monitoring(data.isApfc_panel_monitoring()); + + + +old.setBusbar_monitoring(data.isBusbar_monitoring()); + + + +old.setLt_panel_monitoring(data.isLt_panel_monitoring()); + + + +old.setHt_panel_monitoring(data.isHt_panel_monitoring()); + + + +old.setWater_management__stp_etp(data.isWater_management__stp_etp()); + + + +old.setCompressed_air__gas_monotoring(data.isCompressed_air__gas_monotoring()); + + + +old.setCompress_air___lpg_o2_n2_co2(data.isCompress_air___lpg_o2_n2_co2()); + + + +old.setWater_management___water_monitoring(data.isWater_management___water_monitoring()); + + + + + +old.setManufacturer(data.getManufacturer()); + +old.setType(data.getType()); + + + + +old.setProduct(data.getProduct()); + + + + +old.setPrice(data.getPrice()); + +old.setQuantity(data.getQuantity()); + +old.setTotal(data.getTotal()); + +final Order_estimation test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ProductService.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ProductService.java new file mode 100644 index 0000000..a0addaf --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/ProductService.java @@ -0,0 +1,103 @@ +package com.realnet.order_estimation.Services; +import com.realnet.order_estimation.Repository.ProductRepository; +import com.realnet.order_estimation.Entity.Product +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class ProductService { +@Autowired +private ProductRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Product Savedata(Product data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Product save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Product getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Product update(Product data,Integer id) { + Product old = Repository.findById(id).get(); +old.setProduct(data.getProduct()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setType(data.getType()); + +final Product test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Product_ListFilter1Service.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Product_ListFilter1Service.java new file mode 100644 index 0000000..22357c9 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Product_ListFilter1Service.java @@ -0,0 +1,57 @@ +package com.realnet.order_estimation.Services; +import java.util.*; +import com.realnet.order_estimation.Repository.ProductRepository; +import com.realnet.order_estimation.Entity.Product; + +import com.realnet.order_estimation.Entity.Product_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Product_ListFilter1Service { +@Autowired +private ProductRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Product data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Type = data.getType(); + System.out.println(Type + "\n"); + + if ("item".equals(Type)){ +Product_ListFilter1 dummy = new Product_ListFilter1(); + dummy.setId(data.getId()); + dummy.setProduct(data.getProduct()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( String item) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Product data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Type = data.getType(); + System.out.println(Type + "\n"); + + if (item.equals(Type)){ +Product_ListFilter1 dummy = new Product_ListFilter1(); + dummy.setId(data.getId()); + dummy.setProduct(data.getProduct()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/TypeService.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/TypeService.java new file mode 100644 index 0000000..f1708f2 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/TypeService.java @@ -0,0 +1,103 @@ +package com.realnet.order_estimation.Services; +import com.realnet.order_estimation.Repository.TypeRepository; +import com.realnet.order_estimation.Entity.Type +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class TypeService { +@Autowired +private TypeRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Type Savedata(Type data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Type save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Type getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Type update(Type data,Integer id) { + Type old = Repository.findById(id).get(); +old.setType(data.getType()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setManufacturer(data.getManufacturer()); + +final Type test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Type_ListFilter1Service.java b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Type_ListFilter1Service.java new file mode 100644 index 0000000..9e9ec82 --- /dev/null +++ b/orderestimation02-oback-b/authsec_springboot/backend/src/main/java/com/realnet/order_estimation/Services/Type_ListFilter1Service.java @@ -0,0 +1,57 @@ +package com.realnet.order_estimation.Services; +import java.util.*; +import com.realnet.order_estimation.Repository.TypeRepository; +import com.realnet.order_estimation.Entity.Type; + +import com.realnet.order_estimation.Entity.Type_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Type_ListFilter1Service { +@Autowired +private TypeRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Type data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Manufacturer = data.getManufacturer(); + System.out.println(Manufacturer + "\n"); + + if ("item".equals(Manufacturer)){ +Type_ListFilter1 dummy = new Type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setType(data.getType()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( String item) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Type data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Manufacturer = data.getManufacturer(); + System.out.println(Manufacturer + "\n"); + + if (item.equals(Manufacturer)){ +Type_ListFilter1 dummy = new Type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setType(data.getType()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql b/orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..c7a5ea7 --- /dev/null +++ b/orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,8 @@ +CREATE TABLE odb.Manufacturer(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), manufacture VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE odb.Type(id BIGINT NOT NULL AUTO_INCREMENT, type VARCHAR(400), active VARCHAR(400), description VARCHAR(400), manufacturer VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE odb.Product(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), type VARCHAR(400), description VARCHAR(400), product VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE odb.Order_estimation(id BIGINT NOT NULL AUTO_INCREMENT, dg_monitoring_-_without_fuel bit(1), lt_panel_monitoring bit(1), customer_name VARCHAR(400), active_energy bit(1), ht_panel_monitoring bit(1), water_management_-_water_monitoring bit(1), product VARCHAR(400), quantity int, phone_number VARCHAR(400), compressed_air_-gas_monotoring_ bit(1), contact_person VARCHAR(400), ups_monitoring bit(1), water_management_-stp/etp bit(1), type VARCHAR(400), apfc_panel_monitoring__ bit(1), price int, busbar_monitoring bit(1), compress_air_-_lpg/o2/n2/co2 bit(1), total VARCHAR(400), manufacturer int, customer_address VARCHAR(400), deployment_type VARCHAR(400), dg_monitoring_-_with_fuel bit(1), water_management-_water_quality bit(1), PRIMARY KEY (id)); + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..fdff417 100644 --- a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts @@ -2,14 +2,14 @@ export const LoginEnvironment = { - "templateNo": "", - "loginHeading": "", - "loginHeading2": "", - "isSignup": "", - "loginSignup": " ", - "loginSignup2": "", - "loginForgotpass": "", - "loginImage": "", - "loginImageURL": "" + "templateNo": "Template 1", + "loginHeading": "Welcome to", + "loginHeading2": "io8.dev", + "isSignup": "true", + "loginSignup": "Use your ID to sign in OR ", + "loginSignup2": "create one now", + "loginForgotpass": "FORGOT PASSWORD?", + "loginImage": "[]", + "loginImageURL": "null" } diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.html b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.html new file mode 100644 index 0000000..b01aff9 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.html @@ -0,0 +1,376 @@ + +
+
+
+

Manufacturer

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Manufacture + + + + Description + + + + Active + + + + + + Action + + + + + +{{user.manufacture }} + + + + + + +{{user.active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.scss b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.ts new file mode 100644 index 0000000..336744a --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.component.ts @@ -0,0 +1,270 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Manufacturerservice} from './Manufacturer.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Manufacturercardvariable } from './Manufacturer_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Manufacturer', + templateUrl: './Manufacturer.component.html', + styleUrls: ['./Manufacturer.component.scss'] +}) +export class ManufacturerComponent implements OnInit { + cardButton = Manufacturercardvariable.cardButton; + cardmodeldata = Manufacturercardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Manufacturercardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Manufacturer_formCode' +tableName = 'Manufacturer'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Manufacturerservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// component button + ngOnInit(): void { + if(this.cardmodeldata !== ''){ + this.cardmodal = JSON.parse(this.cardmodeldata); + this.dashboardArray = this.cardmodal.dashboard.slice(); + console.log(this.dashboardArray) + } + this.userrole=this.userInfoService.getRoles(); + this.getData(); + this.entryForm = this._fb.group({ +manufacture : [null], + +description : [null], + +active : [true], + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Manufacturer_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + } + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + +// updateaction +} + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.service.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.service.ts new file mode 100644 index 0000000..fbdeb30 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Manufacturerservice{ + private baseURL = "Manufacturer/Manufacturer" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +// updateaction +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer_cardvariable.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer_cardvariable.ts new file mode 100644 index 0000000..d57ae46 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Manufacturer/Manufacturer_cardvariable.ts @@ -0,0 +1,4 @@ +export const Manufacturercardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.html b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.html new file mode 100644 index 0000000..6c7bf86 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.html @@ -0,0 +1,1110 @@ + +
+
+
+

Order Estimation

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Customer Name + + + + Contact person + + + + Phone Number + + + + Customer Address + + + + Deployment Type + + + + + + dg monitoring - without fuel + + + + + active energy + + + + + dg monitoring - with fuel + + + + + water management -stp/etp + + + + + water management- water quality + + + + + ups monitoring + + + + + apfc panel monitoring + + + + + busbar monitoring + + + + + lt panel monitoring + + + + + ht panel monitoring + + + + + compressed air -gas monotoring + + + + + compress air - lpg/o2/n2/co2 + + + + + water management - water monitoring + + + + + + + Manufacturer + + + + Type + + + + Product + + + + Price + + + + Quantity + + + + + + + + Action + + + + + +{{user.customer_name }} + + + + + + +{{user.phone_number }} + + + + + + +{{user.deployment_type }} + + + + +{{user.ups_monitoring}} + + + +{{user.active_energy}} + + + +{{user.dg_monitoring___with_fuel}} + + + +{{user.dg_monitoring___without_fuel}} + + + +{{user.apfc_panel_monitoring}} + + + +{{user.busbar_monitoring}} + + + +{{user.lt_panel_monitoring}} + + + +{{user.ht_panel_monitoring}} + + + +{{user.compressed_air__gas_monotoring}} + + + +{{user.water_management__stp_etp}} + + + +{{user.compress_air___lpg_o2_n2_co2}} + + + +{{user.water_management__water_quality}} + + + +{{user.water_management___water_monitoring}} + + + + + +{{user. manufacturername }} + + +{{user.type }} + + +{{user.product }} + + +{{user.price }} + + +{{user.quantity }} + + + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.scss b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.ts new file mode 100644 index 0000000..0c1660e --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.component.ts @@ -0,0 +1,750 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Order_estimationservice} from './Order_estimation.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Order_estimationcardvariable } from './Order_estimation_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Order_estimation', + templateUrl: './Order_estimation.component.html', + styleUrls: ['./Order_estimation.component.scss'] +}) +export class Order_estimationComponent implements OnInit { + cardButton = Order_estimationcardvariable.cardButton; + cardmodeldata = Order_estimationcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Order_estimationcardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Order_estimation_formCode' +tableName = 'Order_estimation'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Order_estimationservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// component button + ngOnInit(): void { + if(this.cardmodeldata !== ''){ + this.cardmodal = JSON.parse(this.cardmodeldata); + this.dashboardArray = this.cardmodal.dashboard.slice(); + console.log(this.dashboardArray) + } + this.userrole=this.userInfoService.getRoles(); + this.getData(); + this.entryForm = this._fb.group({ +customer_name : [null], + +contact_person : [null], + +phone_number: ['+91'], + +customer_address : [null], + +deployment_type : [null], + + + +ups_monitoring:[false], + + + +active_energy:[false], + + + +dg_monitoring___with_fuel:[false], + + + +water_management__water_quality:[false], + + + +dg_monitoring___without_fuel:[false], + + + +apfc_panel_monitoring:[false], + + + +busbar_monitoring:[false], + + + +lt_panel_monitoring:[false], + + + +ht_panel_monitoring:[false], + + + +compressed_air__gas_monotoring:[false], + + + +compress_air___lpg_o2_n2_co2:[false], + + + +water_management___water_monitoring:[false], + + + +water_management__stp_etp:[false], + + + +manufacturer : [null], + +type : [null], + + +product : [null], + + +price : [null,[Validators.required]], + +quantity : [null,[Validators.required]], + + + + + + + + + + + + + + + + + + + + + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Order_estimation_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + + + + + +this.getallmanufacturer(); + + + // Listen for country changes + + + this.entryForm.get('manufacturer')?.valueChanges.subscribe((item) => { + + + if (item) { + this.dependet2type(item); + } else { + this.typedependentData = []; + this.entryForm.get('type')?.setValue(null); // clear state + } + }); + + + + // Listen for country changes + + + this.entryForm.get('type')?.valueChanges.subscribe((item) => { + + + if (item) { + this.dependet2product(item); + } else { + this.productdependentData = []; + this.entryForm.get('product')?.setValue(null); // clear state + } + }); + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + + + + + +// Dependemt Dropdown field start +this.dependet2type(row.dependentDD); + // Dependemt Dropdown field end + +// Dependemt Dropdown field start +this.dependet2product(row.dependentDD); + // Dependemt Dropdown field end + + + + + +//calculated field start + + + this.totalprice= row.price; + + + + this.totalquantity= row.quantity; + + +//calculated field end + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + + + + + + + + + + + + + + + + +//calculated field start + + +this.rowSelected.price= this.totalprice; + + + +this.rowSelected.quantity= this.totalquantity; + + +this.onInputChangetotal (); + //calculated field end + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + + + + + + + + + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + + + + + + + + + + + + + + + + +//calculated field start + + +this.entryForm.value.price = this.totalprice ; + + + +this.entryForm.value.quantity = this.totalquantity ; + + +//calculated field end + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + + + + + + + + + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + + + + + + + + + + + + + + + + //calculated field start + + + + this.totalprice = ''; + + + + this.totalquantity = ''; + + + + + this.totaltotal = ''; + + //calculated field end + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModalcontact_person = false; +goToReplaceStringcontact_person(row){ +this.rowSelected = row; this.rsModalcontact_person =true; } + +isValidPhone_number(phone: string): boolean { + const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; + return phonePattern.test(phone); +} + +rsModalcustomer_address = false; +goToReplaceStringcustomer_address(row){ +this.rowSelected = row; this.rsModalcustomer_address =true; } + + + + + +selectmanufacturer ; +getallmanufacturer() { + this.mainService.getAllmanufacturer().subscribe(data=>{ +this.selectmanufacturer = data; +console.log(data); +},(error) => { console.log(error); }); } + +// Dependemt Dropdown field start + + + typedependentData: any; +dependet2type (item){ + this.mainService.gettypeDependent(item).subscribe( (data) => { + console.log(data); + this.typedependentData = data; + },(error) => { console.log(error); }); + } + + + // DependemtDropdown field end + +// Dependemt Dropdown field start + + + productdependentData: any; +dependet2product (item){ + this.mainService.getproductDependent(item).subscribe( (data) => { + console.log(data); + this.productdependentData = data; + },(error) => { console.log(error); }); + } + + + // DependemtDropdown field end + + + + + + // calculated field code start + + + totalprice; + + + + totalquantity; + + + totaltotal ; + totalcalculateOperators = "product_list" +onInputChangetotal() { +const lastObj = 0 +const lastObjstring = '' + + + + const price= this.totalprice|| ''; + + const priceValue = parseFloat(this.totalprice) || 0; + + + + + + const quantity= this.totalquantity|| ''; + + const quantityValue = parseFloat(this.totalquantity) || 0; + + + +if (this.totalcalculateOperators =="Addition") { + this.totaltotal = ( + + + priceValue + + + + + quantityValue + + + lastObj).toString(); +} +if (this.totalcalculateOperators == "Subtraction") { + this.totaltotal = ( + + + priceValue - + + + + quantityValue - + + + lastObj).toString(); +} +if (this.totalcalculateOperators =="Multiplication") { + this.totaltotal = ( + + + + priceValue * + + + + quantityValue * + + +lastObj).toString(); +} +if (this.totalcalculateOperators =="Division") { + + this.totaltotal = ( + + +priceValue / + + + +quantityValue / + + +lastObj).toString(); + +} +if (this.totalcalculateOperators =="Concatination") { + this.totaltotal = + + +price+ ' '+ + + + +quantity+ ' '+ + + lastObjstring +} +} + +// updateaction +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.service.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.service.ts new file mode 100644 index 0000000..8c3cd84 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation.service.ts @@ -0,0 +1,70 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Order_estimationservice{ + private baseURL = "Order_estimation/Order_estimation" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + + + + + +getAllmanufacturer(): Observable { +return this.apiRequest.get("Manufacturer_ListFilter1/Manufacturer_ListFilter1"); } + + + + gettypeDependent(field: string): Observable { + return this.apiRequest.get("Type_ListFilter1/Type_ListFilter11/" + field); + } + + + + + + getproductDependent(field: string): Observable { + return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field); + } + + + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation_cardvariable.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation_cardvariable.ts new file mode 100644 index 0000000..00b5008 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Order_estimation/Order_estimation_cardvariable.ts @@ -0,0 +1,4 @@ +export const Order_estimationcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.html b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.html new file mode 100644 index 0000000..8c31df8 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.html @@ -0,0 +1,405 @@ + +
+
+
+

Product

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Product + + + + Description + + + + Active + + + + Type + + + + + + Action + + + + + +{{user.product }} + + + + + + +{{user.active }} + + +{{user.type }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.scss b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.ts new file mode 100644 index 0000000..7e47a0c --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.component.ts @@ -0,0 +1,294 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Productservice} from './Product.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Productcardvariable } from './Product_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Product', + templateUrl: './Product.component.html', + styleUrls: ['./Product.component.scss'] +}) +export class ProductComponent implements OnInit { + cardButton = Productcardvariable.cardButton; + cardmodeldata = Productcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Productcardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Product_formCode' +tableName = 'Product'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Productservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// component button + ngOnInit(): void { + if(this.cardmodeldata !== ''){ + this.cardmodal = JSON.parse(this.cardmodeldata); + this.dashboardArray = this.cardmodal.dashboard.slice(); + console.log(this.dashboardArray) + } + this.userrole=this.userInfoService.getRoles(); + this.getData(); + this.entryForm = this._fb.group({ +product : [null], + +description : [null], + +active : [true], + +type : [null], + + + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Product_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + + + } + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + + + +// updateaction +} + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.service.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.service.ts new file mode 100644 index 0000000..9e151c1 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product.service.ts @@ -0,0 +1,41 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Productservice{ + private baseURL = "Product/Product" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product_cardvariable.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product_cardvariable.ts new file mode 100644 index 0000000..d01e2f1 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Product/Product_cardvariable.ts @@ -0,0 +1,4 @@ +export const Productcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.html b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.html new file mode 100644 index 0000000..493c945 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.html @@ -0,0 +1,405 @@ + +
+
+
+

Type

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Type + + + + Description + + + + Active + + + + Manufacturer + + + + + + Action + + + + + +{{user.type }} + + + + + + +{{user.active }} + + +{{user.manufacturer }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.scss b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.ts new file mode 100644 index 0000000..12f99eb --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.component.ts @@ -0,0 +1,294 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Typeservice} from './Type.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Typecardvariable } from './Type_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Type', + templateUrl: './Type.component.html', + styleUrls: ['./Type.component.scss'] +}) +export class TypeComponent implements OnInit { + cardButton = Typecardvariable.cardButton; + cardmodeldata = Typecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Typecardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Type_formCode' +tableName = 'Type'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Typeservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// component button + ngOnInit(): void { + if(this.cardmodeldata !== ''){ + this.cardmodal = JSON.parse(this.cardmodeldata); + this.dashboardArray = this.cardmodal.dashboard.slice(); + console.log(this.dashboardArray) + } + this.userrole=this.userInfoService.getRoles(); + this.getData(); + this.entryForm = this._fb.group({ +type : [null], + +description : [null], + +active : [true], + +manufacturer : [null], + + + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Type_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + + + } + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + + + +// updateaction +} + + + + + + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.service.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.service.ts new file mode 100644 index 0000000..ab2c091 --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type.service.ts @@ -0,0 +1,41 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Typeservice{ + private baseURL = "Type/Type" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type_cardvariable.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type_cardvariable.ts new file mode 100644 index 0000000..0d6180d --- /dev/null +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/order_estimation/Type/Type_cardvariable.ts @@ -0,0 +1,4 @@ +export const Typecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 7377c69..9e030d6 100644 --- a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,7 @@ +import { Order_estimationComponent } from './BuilderComponents/order_estimation/Order_estimation/Order_estimation.component'; +import { ProductComponent } from './BuilderComponents/order_estimation/Product/Product.component'; +import { TypeComponent } from './BuilderComponents/order_estimation/Type/Type.component'; +import { ManufacturerComponent } from './BuilderComponents/order_estimation/Manufacturer/Manufacturer.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; @@ -256,6 +260,18 @@ const routes: Routes = [ // buildercomponents +{path:'Order_estimation',component:Order_estimationComponent}, + + +{path:'Product',component:ProductComponent}, + + +{path:'Type',component:TypeComponent}, + + +{path:'Manufacturer',component:ManufacturerComponent}, + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index ecbab3d..86c495e 100644 --- a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,7 @@ +import { Order_estimationComponent } from './BuilderComponents/order_estimation/Order_estimation/Order_estimation.component'; +import { ProductComponent } from './BuilderComponents/order_estimation/Product/Product.component'; +import { TypeComponent } from './BuilderComponents/order_estimation/Type/Type.component'; +import { ManufacturerComponent } from './BuilderComponents/order_estimation/Manufacturer/Manufacturer.component'; import { CommonModule } from '@angular/common'; @@ -129,6 +133,18 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S // buildercomponents +Order_estimationComponent, + + +ProductComponent, + + +TypeComponent, + + +ManufacturerComponent, + + diff --git a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index ee15955..b86a029 100644 --- a/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/orderestimation02-ofront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,10 +226,37 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Active": "Active", "Description": "Description", - "Fileupload_Field": "Fileupload_Field", - "Test22": "Test22", - "Test11": "Test11", - "Name": "Name" + "DG_Monitoring_-_without_fuel": "DG_Monitoring_-_without_fuel", + "LT_Panel_Monitoring": "LT_Panel_Monitoring", + "Customer_Name": "Customer_Name", + "Water_Management_-_Water_Monitoring": "Water_Management_-_Water_Monitoring", + "Final_Total": "Final_Total", + "Product": "Product", + "Phone_Number": "Phone_Number", + "Compressed_Air_-Gas_Monotoring_": "Compressed_Air_-Gas_Monotoring_", + "Contact_person": "Contact_person", + "Water_Management_-STP/ETP": "Water_Management_-STP/ETP", + "Manufacturer": "Manufacturer", + "Deployment_Type": "Deployment_Type", + "Active_Energy": "Active_Energy", + "OneToManyExtension": "OneToManyExtension", + "HT_Panel_Monitoring": "HT_Panel_Monitoring", + "Quantity": "Quantity", + "UPS_Monitoring": "UPS_Monitoring", + "Active": "Active", + "Type": "Type", + "APFC_Panel_Monitoring__": "APFC_Panel_Monitoring__", + "Price": "Price", + "Busbar_Monitoring": "Busbar_Monitoring", + "Compress_Air_-_LPG/O2/N2/CO2": "Compress_Air_-_LPG/O2/N2/CO2", + "Total": "Total", + "Manufacture": "Manufacture", + "Order_summary": "Order_summary", + "Customer_Address": "Customer_Address", + "Order_estimation": "Order_estimation", + "Quantitys": "Quantitys", + "DG_Monitoring_-_with_fuel": "DG_Monitoring_-_with_fuel", + "Water_Management-_Water_Quality": "Water_Management-_Water_Quality", + "Unit_Price": "Unit_Price" } \ No newline at end of file