build_app
This commit is contained in:
		
							parent
							
								
									e69201cd5d
								
							
						
					
					
						commit
						4568d776d2
					
				| @ -69,6 +69,21 @@ public class BuilderService { | ||||
| 		executeDump(true); | ||||
| 
 | ||||
| 		// ADD OTHER SERVICE | ||||
| addCustomMenu( "Types","Types",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Product","Product",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Manufacturer","Manufacturer",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Deployment_type","Deployment_type",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Customer_information","Customer_information",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("dashboard and menu inserted..."); | ||||
| 
 | ||||
|  | ||||
| @ -0,0 +1,195 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Customer_information; | ||||
| import com.realnet.basicp1.Services.Customer_informationService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Customer_information") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class Customer_informationController { | ||||
| 	@Autowired | ||||
| 	private Customer_informationService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Customer_information") | ||||
| 		  public Customer_information Savedata(@RequestBody Customer_information data) { | ||||
| 		Customer_information save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Customer_information/{id}") | ||||
| 	public  Customer_information update(@RequestBody Customer_information data,@PathVariable Integer id ) { | ||||
| 		Customer_information update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Customer_information/getall/page") | ||||
| 	public Page<Customer_information> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Customer_information> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Customer_information") | ||||
| 	public List<Customer_information> getdetails() { | ||||
| 		 List<Customer_information> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Customer_information") | ||||
| 	public List<Customer_information> getallwioutsec() { | ||||
| 		 List<Customer_information> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Customer_information/{id}") | ||||
| 	public  Customer_information  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Customer_information  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Customer_information/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Deployment_type; | ||||
| import com.realnet.basicp1.Services.Deployment_typeService ; | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Deployment_type") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class Deployment_typeController { | ||||
| 	@Autowired | ||||
| 	private Deployment_typeService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Deployment_type") | ||||
| 		  public Deployment_type Savedata(@RequestBody Deployment_type data) { | ||||
| 		Deployment_type save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Deployment_type/{id}") | ||||
| 	public  Deployment_type update(@RequestBody Deployment_type data,@PathVariable Integer id ) { | ||||
| 		Deployment_type update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Deployment_type/getall/page") | ||||
| 	public Page<Deployment_type> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Deployment_type> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Deployment_type") | ||||
| 	public List<Deployment_type> getdetails() { | ||||
| 		 List<Deployment_type> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Deployment_type") | ||||
| 	public List<Deployment_type> getallwioutsec() { | ||||
| 		 List<Deployment_type> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Deployment_type/{id}") | ||||
| 	public  Deployment_type  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Deployment_type  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Deployment_type/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Deployment_type_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Deployment_type_ListFilter1Service ; | ||||
| @RequestMapping(value = "/Deployment_type_ListFilter1") | ||||
| @RestController | ||||
| public class Deployment_type_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Deployment_type_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Deployment_type_ListFilter1") | ||||
| 	public List<Deployment_type_ListFilter1> getlist() { | ||||
| 		 List<Deployment_type_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Deployment_type_ListFilter11") | ||||
| 	public List<Deployment_type_ListFilter1> getlistwithparam( ) { | ||||
| 		 List<Deployment_type_ListFilter1> get = Service.getlistbuilderparam( );		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Manufacturer; | ||||
| import com.realnet.basicp1.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<Manufacturer> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Manufacturer> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Manufacturer") | ||||
| 	public List<Manufacturer> getdetails() { | ||||
| 		 List<Manufacturer> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Manufacturer") | ||||
| 	public List<Manufacturer> getallwioutsec() { | ||||
| 		 List<Manufacturer> 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); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Manufacturer_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Manufacturer_ListFilter1Service ; | ||||
| @RequestMapping(value = "/Manufacturer_ListFilter1") | ||||
| @RestController | ||||
| public class Manufacturer_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Manufacturer_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Manufacturer_ListFilter1") | ||||
| 	public List<Manufacturer_ListFilter1> getlist() { | ||||
| 		 List<Manufacturer_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Manufacturer_ListFilter11") | ||||
| 	public List<Manufacturer_ListFilter1> getlistwithparam( ) { | ||||
| 		 List<Manufacturer_ListFilter1> get = Service.getlistbuilderparam( );		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Product; | ||||
| import com.realnet.basicp1.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<Product> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Product> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Product") | ||||
| 	public List<Product> getdetails() { | ||||
| 		 List<Product> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Product") | ||||
| 	public List<Product> getallwioutsec() { | ||||
| 		 List<Product> 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); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Product_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Product_ListFilter1Service ; | ||||
| @RequestMapping(value = "/Product_ListFilter1") | ||||
| @RestController | ||||
| public class Product_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Product_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Product_ListFilter1") | ||||
| 	public List<Product_ListFilter1> getlist() { | ||||
| 		 List<Product_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Product_ListFilter11/{item}") | ||||
| 	public List<Product_ListFilter1> getlistwithparam(  @PathVariable String item) { | ||||
| 		 List<Product_ListFilter1> get = Service.getlistbuilderparam(  item);		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Types; | ||||
| import com.realnet.basicp1.Services.TypesService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Types") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class TypesController { | ||||
| 	@Autowired | ||||
| 	private TypesService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Types") | ||||
| 		  public Types Savedata(@RequestBody Types data) { | ||||
| 		Types save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Types/{id}") | ||||
| 	public  Types update(@RequestBody Types data,@PathVariable Integer id ) { | ||||
| 		Types update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Types/getall/page") | ||||
| 	public Page<Types> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Types> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Types") | ||||
| 	public List<Types> getdetails() { | ||||
| 		 List<Types> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Types") | ||||
| 	public List<Types> getallwioutsec() { | ||||
| 		 List<Types> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Types/{id}") | ||||
| 	public  Types  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Types  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Types/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Types_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Types_ListFilter1Service ; | ||||
| @RequestMapping(value = "/Types_ListFilter1") | ||||
| @RestController | ||||
| public class Types_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Types_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Types_ListFilter1") | ||||
| 	public List<Types_ListFilter1> getlist() { | ||||
| 		 List<Types_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Types_ListFilter11/{item}") | ||||
| 	public List<Types_ListFilter1> getlistwithparam(  @PathVariable String item) { | ||||
| 		 List<Types_ListFilter1> get = Service.getlistbuilderparam(  item);		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,195 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Customer_information; | ||||
| import com.realnet.basicp1.Services.Customer_informationService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/token/Customer_information") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class tokenFree_Customer_informationController { | ||||
| 	@Autowired | ||||
| 	private Customer_informationService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Customer_information") | ||||
| 		  public Customer_information Savedata(@RequestBody Customer_information data) { | ||||
| 		Customer_information save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Customer_information/{id}") | ||||
| 	public  Customer_information update(@RequestBody Customer_information data,@PathVariable Integer id ) { | ||||
| 		Customer_information update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Customer_information/getall/page") | ||||
| 	public Page<Customer_information> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Customer_information> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Customer_information") | ||||
| 	public List<Customer_information> getdetails() { | ||||
| 		 List<Customer_information> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Customer_information") | ||||
| 	public List<Customer_information> getallwioutsec() { | ||||
| 		 List<Customer_information> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Customer_information/{id}") | ||||
| 	public  Customer_information  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Customer_information  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Customer_information/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Deployment_type; | ||||
| import com.realnet.basicp1.Services.Deployment_typeService ; | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/token/Deployment_type") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class tokenFree_Deployment_typeController { | ||||
| 	@Autowired | ||||
| 	private Deployment_typeService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Deployment_type") | ||||
| 		  public Deployment_type Savedata(@RequestBody Deployment_type data) { | ||||
| 		Deployment_type save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Deployment_type/{id}") | ||||
| 	public  Deployment_type update(@RequestBody Deployment_type data,@PathVariable Integer id ) { | ||||
| 		Deployment_type update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Deployment_type/getall/page") | ||||
| 	public Page<Deployment_type> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Deployment_type> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Deployment_type") | ||||
| 	public List<Deployment_type> getdetails() { | ||||
| 		 List<Deployment_type> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Deployment_type") | ||||
| 	public List<Deployment_type> getallwioutsec() { | ||||
| 		 List<Deployment_type> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Deployment_type/{id}") | ||||
| 	public  Deployment_type  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Deployment_type  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Deployment_type/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Deployment_type_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Deployment_type_ListFilter1Service ; | ||||
| @RequestMapping(value = "/token/Deployment_type_ListFilter1") | ||||
| @RestController | ||||
| public class tokenFree_Deployment_type_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Deployment_type_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Deployment_type_ListFilter1") | ||||
| 	public List<Deployment_type_ListFilter1> getlist() { | ||||
| 		 List<Deployment_type_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Deployment_type_ListFilter11") | ||||
| 	public List<Deployment_type_ListFilter1> getlistwithparam( ) { | ||||
| 		 List<Deployment_type_ListFilter1> get = Service.getlistbuilderparam( );		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Manufacturer; | ||||
| import com.realnet.basicp1.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<Manufacturer> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Manufacturer> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Manufacturer") | ||||
| 	public List<Manufacturer> getdetails() { | ||||
| 		 List<Manufacturer> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Manufacturer") | ||||
| 	public List<Manufacturer> getallwioutsec() { | ||||
| 		 List<Manufacturer> 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); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Manufacturer_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Manufacturer_ListFilter1Service ; | ||||
| @RequestMapping(value = "/token/Manufacturer_ListFilter1") | ||||
| @RestController | ||||
| public class tokenFree_Manufacturer_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Manufacturer_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Manufacturer_ListFilter1") | ||||
| 	public List<Manufacturer_ListFilter1> getlist() { | ||||
| 		 List<Manufacturer_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Manufacturer_ListFilter11") | ||||
| 	public List<Manufacturer_ListFilter1> getlistwithparam( ) { | ||||
| 		 List<Manufacturer_ListFilter1> get = Service.getlistbuilderparam( );		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Product; | ||||
| import com.realnet.basicp1.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<Product> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Product> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Product") | ||||
| 	public List<Product> getdetails() { | ||||
| 		 List<Product> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Product") | ||||
| 	public List<Product> getallwioutsec() { | ||||
| 		 List<Product> 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); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Product_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Product_ListFilter1Service ; | ||||
| @RequestMapping(value = "/token/Product_ListFilter1") | ||||
| @RestController | ||||
| public class tokenFree_Product_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Product_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Product_ListFilter1") | ||||
| 	public List<Product_ListFilter1> getlist() { | ||||
| 		 List<Product_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Product_ListFilter11/{item}") | ||||
| 	public List<Product_ListFilter1> getlistwithparam(  @PathVariable String item) { | ||||
| 		 List<Product_ListFilter1> get = Service.getlistbuilderparam(  item);		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Types; | ||||
| import com.realnet.basicp1.Services.TypesService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/token/Types") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| public class tokenFree_TypesController { | ||||
| 	@Autowired | ||||
| 	private TypesService Service; | ||||
| 
 | ||||
| @Value("${projectPath}") | ||||
| 	private String projectPath; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Types") | ||||
| 		  public Types Savedata(@RequestBody Types data) { | ||||
| 		Types save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| 	  } | ||||
| @PutMapping("/Types/{id}") | ||||
| 	public  Types update(@RequestBody Types data,@PathVariable Integer id ) { | ||||
| 		Types update = Service.update(data,id); | ||||
| 		System.out.println("data update..." + update); | ||||
| 		return update; | ||||
| 	}	  | ||||
| //	get all with pagination | ||||
| 	@GetMapping("/Types/getall/page") | ||||
| 	public Page<Types> getall(@RequestParam(value = "page", required = false) Integer page, | ||||
| 			@RequestParam(value = "size", required = false) Integer size) { | ||||
| 		Pageable paging = PageRequest.of(page, size); | ||||
| 		Page<Types> get = Service.getAllWithPagination(paging); | ||||
| 
 | ||||
| 		return get; | ||||
| 
 | ||||
| 	}	 | ||||
| 	@GetMapping("/Types") | ||||
| 	public List<Types> getdetails() { | ||||
| 		 List<Types> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| // get all without authentication  | ||||
| 
 | ||||
| 	@GetMapping("/token/Types") | ||||
| 	public List<Types> getallwioutsec() { | ||||
| 		 List<Types> get = Service.getdetails();		 | ||||
| 		return get; | ||||
| } | ||||
| @GetMapping("/Types/{id}") | ||||
| 	public  Types  getdetailsbyId(@PathVariable Integer id ) { | ||||
| 		Types  get = Service.getdetailsbyId(id); | ||||
| 		return get; | ||||
| 	} | ||||
| @DeleteMapping("/Types/{id}") | ||||
| 	public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) { | ||||
| 	Service.delete_by_id(id); | ||||
| 			return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); | ||||
| 	 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Controllers; | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  import org.springframework.web.bind.annotation.*; | ||||
| import com.realnet.basicp1.Entity.Types_ListFilter1; | ||||
| import com.realnet.basicp1.Services.Types_ListFilter1Service ; | ||||
| @RequestMapping(value = "/token/Types_ListFilter1") | ||||
| @RestController | ||||
| public class tokenFree_Types_ListFilter1Controller { | ||||
| 	 | ||||
| 	@Autowired | ||||
| 	private Types_ListFilter1Service Service; | ||||
| 
 | ||||
| 		@GetMapping("/Types_ListFilter1") | ||||
| 	public List<Types_ListFilter1> getlist() { | ||||
| 		 List<Types_ListFilter1> get = Service.getlistbuilder();		 | ||||
| 		return get; | ||||
| } | ||||
| 		@GetMapping("/Types_ListFilter11/{item}") | ||||
| 	public List<Types_ListFilter1> getlistwithparam(  @PathVariable String item) { | ||||
| 		 List<Types_ListFilter1> get = Service.getlistbuilderparam(  item);		 | ||||
| 		return get; | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,144 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
| import com.realnet.WhoColumn.Entity.Extension;  | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Customer_information extends Extension {  | ||||
|  /** | ||||
| 	 *  | ||||
| 	 */ | ||||
| 	private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
|  @Id | ||||
|  @GeneratedValue(strategy = GenerationType.IDENTITY) | ||||
|  private Integer id; | ||||
| 
 | ||||
| private String  company_name; | ||||
| 
 | ||||
| @Column(length = 2000) | ||||
| private String contact_person; | ||||
| 
 | ||||
| private String manufacturer; | ||||
| private String manufactureridentifier; | ||||
| 
 | ||||
| private String type; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| private String product; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| private String email_address; | ||||
| 
 | ||||
| 
 | ||||
| @Column(length = 2000) | ||||
| private String customer_address; | ||||
| 
 | ||||
| private String deployment_type; | ||||
| private String deployment_typeidentifier; | ||||
| 
 | ||||
| 
 | ||||
|    | ||||
|   | ||||
| private Boolean dg_monitoring___with_fule; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean active_energy; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean dg_monitoring___without_fule; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean ups_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean water_management_stp_etp; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean apfc_panel_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean busbar_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean lt_panel_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean ht_panel_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean compressed_air__gag_monitoring; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean compressed_air___lpg_n2_o2_co2; | ||||
|     | ||||
| 
 | ||||
|   | ||||
| private Boolean water_management_water_monitoring; | ||||
|     | ||||
| 
 | ||||
| 
 | ||||
| private int quantity; | ||||
| 
 | ||||
| private int price; | ||||
| 
 | ||||
| private String total; | ||||
| 
 | ||||
| 
 | ||||
| @Column(length = 2000) | ||||
| private String description; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  private String phone_number; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
| import com.realnet.WhoColumn.Entity.Extension;  | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Deployment_type extends Extension {  | ||||
|  /** | ||||
| 	 *  | ||||
| 	 */ | ||||
| 	private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
|  @Id | ||||
|  @GeneratedValue(strategy = GenerationType.IDENTITY) | ||||
|  private Integer id; | ||||
| 
 | ||||
| private String  deployment_type; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
|  @Data | ||||
|  public class    Deployment_type_ListFilter1 {  | ||||
| 
 | ||||
|  private Integer id; | ||||
| 
 | ||||
| 
 | ||||
|  private String deployment_type; | ||||
| } | ||||
| @ -0,0 +1,30 @@ | ||||
| package com.realnet.basicp1.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  manufacturer_name; | ||||
| 
 | ||||
| 
 | ||||
| @Column(length = 2000) | ||||
| private String description; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
|  @Data | ||||
|  public class    Manufacturer_ListFilter1 {  | ||||
| 
 | ||||
|  private Integer id; | ||||
| 
 | ||||
| 
 | ||||
|  private String manufacturer_name; | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| package com.realnet.basicp1.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_name; | ||||
| 
 | ||||
| private String  type_name; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
|  @Data | ||||
|  public class    Product_ListFilter1 {  | ||||
| 
 | ||||
|  private Integer id; | ||||
| 
 | ||||
| 
 | ||||
|  private String product_name; | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
| import com.realnet.WhoColumn.Entity.Extension;  | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Types extends Extension {  | ||||
|  /** | ||||
| 	 *  | ||||
| 	 */ | ||||
| 	private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
|  @Id | ||||
|  @GeneratedValue(strategy = GenerationType.IDENTITY) | ||||
|  private Integer id; | ||||
| 
 | ||||
| private String  type_name; | ||||
| 
 | ||||
| private String  manufacturer; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| package com.realnet.basicp1.Entity; | ||||
|  import lombok.*; | ||||
|  import javax.persistence.*; | ||||
|  import java.time.LocalDateTime; | ||||
|  import java.util.*; | ||||
| 
 | ||||
|  @Data | ||||
|  public class    Types_ListFilter1 {  | ||||
| 
 | ||||
|  private Integer id; | ||||
| 
 | ||||
| 
 | ||||
|  private String type_name; | ||||
| } | ||||
| @ -0,0 +1,54 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Customer_information; | ||||
| 
 | ||||
| @Repository | ||||
| public interface  Customer_informationRepository  extends  JpaRepository<Customer_information, Integer>  {  | ||||
| 
 | ||||
| @Query(value = "select * from customer_information where  created_by=?1", nativeQuery = true) | ||||
| 	List<Customer_information> findAll(Long creayedBy); | ||||
| 
 | ||||
| @Query(value = "select * from customer_information where  created_by=?1", nativeQuery = true) | ||||
| 	Page<Customer_information> findAll(Pageable page, Long creayedBy); | ||||
| } | ||||
| @ -0,0 +1,26 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Deployment_type; | ||||
| 
 | ||||
| @Repository | ||||
| public interface  Deployment_typeRepository  extends  JpaRepository<Deployment_type, Integer>  {  | ||||
| 
 | ||||
| @Query(value = "select * from deployment_type where  created_by=?1", nativeQuery = true) | ||||
| 	List<Deployment_type> findAll(Long creayedBy); | ||||
| 
 | ||||
| @Query(value = "select * from deployment_type where  created_by=?1", nativeQuery = true) | ||||
| 	Page<Deployment_type> findAll(Pageable page, Long creayedBy); | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Manufacturer; | ||||
| 
 | ||||
| @Repository | ||||
| public interface  ManufacturerRepository  extends  JpaRepository<Manufacturer, Integer>  {  | ||||
| 
 | ||||
| @Query(value = "select * from manufacturer where  created_by=?1", nativeQuery = true) | ||||
| 	List<Manufacturer> findAll(Long creayedBy); | ||||
| 
 | ||||
| @Query(value = "select * from manufacturer where  created_by=?1", nativeQuery = true) | ||||
| 	Page<Manufacturer> findAll(Pageable page, Long creayedBy); | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Product; | ||||
| 
 | ||||
| @Repository | ||||
| public interface  ProductRepository  extends  JpaRepository<Product, Integer>  {  | ||||
| 
 | ||||
| @Query(value = "select * from product where  created_by=?1", nativeQuery = true) | ||||
| 	List<Product> findAll(Long creayedBy); | ||||
| 
 | ||||
| @Query(value = "select * from product where  created_by=?1", nativeQuery = true) | ||||
| 	Page<Product> findAll(Pageable page, Long creayedBy); | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| package com.realnet.basicp1.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.basicp1.Entity.Types; | ||||
| 
 | ||||
| @Repository | ||||
| public interface  TypesRepository  extends  JpaRepository<Types, Integer>  {  | ||||
| 
 | ||||
| @Query(value = "select * from types where  created_by=?1", nativeQuery = true) | ||||
| 	List<Types> findAll(Long creayedBy); | ||||
| 
 | ||||
| @Query(value = "select * from types where  created_by=?1", nativeQuery = true) | ||||
| 	Page<Types> findAll(Pageable page, Long creayedBy); | ||||
| } | ||||
| @ -0,0 +1,313 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import com.realnet.basicp1.Repository.Customer_informationRepository; | ||||
| import com.realnet.basicp1.Entity.Customer_information | ||||
| ;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.basicp1.Entity.Manufacturer; | ||||
| import com.realnet.basicp1.Services.ManufacturerService; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| import com.realnet.basicp1.Entity.Deployment_type; | ||||
| import com.realnet.basicp1.Services.Deployment_typeService; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
|  public class Customer_informationService { | ||||
| @Autowired | ||||
| private Customer_informationRepository Repository; | ||||
| 	@Autowired | ||||
| 	private AppUserServiceImpl userService;  | ||||
| @Autowired | ||||
| 	private RealmService realmService; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @Autowired | ||||
| 	private ManufacturerService manufacturerserv; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @Autowired | ||||
| 	private Deployment_typeService deployment_typeserv; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| public Customer_information Savedata(Customer_information data) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| if (data.getManufacturer() != null) { | ||||
| 		try {	 | ||||
|   int manufacturerId = Integer.valueOf(data.getManufacturer()); | ||||
| Manufacturer get =  manufacturerserv.getdetailsbyId(manufacturerId); | ||||
| 			if (get != null) { | ||||
| 
 | ||||
| 			data.setManufactureridentifier(get.getManufacturer_name()); | ||||
| } | ||||
| } catch (NumberFormatException e) { | ||||
| 				System.out.println(" manufacturerId is not integer.."); | ||||
| 				// Invalid integer string — ignore or log | ||||
| 			} | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| if (data.getDeployment_type() != null) { | ||||
| 		try {	 | ||||
|   int deployment_typeId = Integer.valueOf(data.getDeployment_type()); | ||||
| Deployment_type get =  deployment_typeserv.getdetailsbyId(deployment_typeId); | ||||
| 			if (get != null) { | ||||
| 
 | ||||
| 			data.setDeployment_typeidentifier(get.getDeployment_type()); | ||||
| } | ||||
| } catch (NumberFormatException e) { | ||||
| 				System.out.println(" deployment_typeId is not integer.."); | ||||
| 				// Invalid integer string — ignore or log | ||||
| 			} | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| Customer_information save = Repository.save(data); | ||||
| 				return save;	 | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| //	get all with pagination | ||||
| 	public Page<Customer_information> getAllWithPagination(Pageable page) { | ||||
| 		return Repository.findAll(page, getUser().getUserId()); | ||||
| 	}			 | ||||
| public List<Customer_information> getdetails() {   | ||||
| 		List<Realm> realm = realmService.findByUserId(getUser().getUserId()); | ||||
| List<Customer_information> all = Repository.findAll(getUser().getUserId()); | ||||
| 		 | ||||
| 		return all ;		} | ||||
| 
 | ||||
| 
 | ||||
| public Customer_information getdetailsbyId(Integer id) { | ||||
| 	return Repository.findById(id).get(); | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| 	public void delete_by_id(Integer id) { | ||||
|  Repository.deleteById(id); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| public Customer_information update(Customer_information data,Integer id) { | ||||
| 	Customer_information old = Repository.findById(id).get(); | ||||
| old.setCompany_name(data.getCompany_name()); | ||||
| 
 | ||||
| old.setContact_person(data.getContact_person()); | ||||
| 
 | ||||
| old.setManufacturer(data.getManufacturer()); | ||||
| 
 | ||||
| old.setType(data.getType()); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| old.setProduct(data.getProduct()); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| old.setEmail_address(data.getEmail_address()); | ||||
| 
 | ||||
| old.setCustomer_address(data.getCustomer_address()); | ||||
| 
 | ||||
| old.setDeployment_type(data.getDeployment_type()); | ||||
| 
 | ||||
|    | ||||
|   | ||||
| old.setBusbar_monitoring(data.getBusbar_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setActive_energy(data.getActive_energy()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setDg_monitoring___with_fule(data.getDg_monitoring___with_fule()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setDg_monitoring___without_fule(data.getDg_monitoring___without_fule()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setUps_monitoring(data.getUps_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setApfc_panel_monitoring(data.getApfc_panel_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setLt_panel_monitoring(data.getLt_panel_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setHt_panel_monitoring(data.getHt_panel_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setWater_management_stp_etp(data.getWater_management_stp_etp()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setCompressed_air__gag_monitoring(data.getCompressed_air__gag_monitoring()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setCompressed_air___lpg_n2_o2_co2(data.getCompressed_air___lpg_n2_o2_co2()); | ||||
|     | ||||
| 
 | ||||
|   | ||||
| old.setWater_management_water_monitoring(data.getWater_management_water_monitoring()); | ||||
|     | ||||
| 
 | ||||
| 
 | ||||
|    | ||||
| 
 | ||||
| old.setQuantity(data.getQuantity()); | ||||
| 
 | ||||
| old.setPrice(data.getPrice()); | ||||
| 
 | ||||
| old.setTotal(data.getTotal()); | ||||
| 
 | ||||
| old.setDescription(data.getDescription()); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| old.setPhone_number(data.getPhone_number()); | ||||
| 
 | ||||
| final Customer_information test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
| 
 | ||||
| 	}} | ||||
| @ -0,0 +1,73 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import com.realnet.basicp1.Repository.Deployment_typeRepository; | ||||
| import com.realnet.basicp1.Entity.Deployment_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 Deployment_typeService { | ||||
| @Autowired | ||||
| private Deployment_typeRepository Repository; | ||||
| 	@Autowired | ||||
| 	private AppUserServiceImpl userService;  | ||||
| @Autowired | ||||
| 	private RealmService realmService; | ||||
| 
 | ||||
| public Deployment_type Savedata(Deployment_type data) { | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| Deployment_type save = Repository.save(data); | ||||
| 				return save;	 | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| //	get all with pagination | ||||
| 	public Page<Deployment_type> getAllWithPagination(Pageable page) { | ||||
| 		return Repository.findAll(page, getUser().getUserId()); | ||||
| 	}			 | ||||
| public List<Deployment_type> getdetails() {   | ||||
| 		List<Realm> realm = realmService.findByUserId(getUser().getUserId()); | ||||
| List<Deployment_type> all = Repository.findAll(getUser().getUserId()); | ||||
| 		 | ||||
| 		return all ;		} | ||||
| 
 | ||||
| 
 | ||||
| public Deployment_type getdetailsbyId(Integer id) { | ||||
| 	return Repository.findById(id).get(); | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| 	public void delete_by_id(Integer id) { | ||||
|  Repository.deleteById(id); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| public Deployment_type update(Deployment_type data,Integer id) { | ||||
| 	Deployment_type old = Repository.findById(id).get(); | ||||
| old.setDeployment_type(data.getDeployment_type()); | ||||
| 
 | ||||
| final Deployment_type test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
| 
 | ||||
| 	}} | ||||
| @ -0,0 +1,47 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import java.util.*; | ||||
| import com.realnet.basicp1.Repository.Deployment_typeRepository; | ||||
| import com.realnet.basicp1.Entity.Deployment_type; | ||||
| 
 | ||||
| import com.realnet.basicp1.Entity.Deployment_type_ListFilter1; | ||||
| import java.util.List; | ||||
| 
 | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
|  public class Deployment_type_ListFilter1Service { | ||||
| @Autowired | ||||
| private Deployment_typeRepository Repository; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Deployment_type_ListFilter1>   getlistbuilder() { | ||||
| 	List<Deployment_type> list= Repository.findAll(); | ||||
| 		ArrayList<Deployment_type_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Deployment_type data : list) { | ||||
| {	 | ||||
| Deployment_type_ListFilter1 dummy = new Deployment_type_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setDeployment_type(data.getDeployment_type()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Deployment_type_ListFilter1>   getlistbuilderparam( ) { | ||||
| 	List<Deployment_type> list= Repository.findAll(); | ||||
| 		ArrayList<Deployment_type_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Deployment_type data : list) { | ||||
| {	 | ||||
| Deployment_type_ListFilter1 dummy = new Deployment_type_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setDeployment_type(data.getDeployment_type()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import com.realnet.basicp1.Repository.ManufacturerRepository; | ||||
| import com.realnet.basicp1.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<Manufacturer> getAllWithPagination(Pageable page) { | ||||
| 		return Repository.findAll(page, getUser().getUserId()); | ||||
| 	}			 | ||||
| public List<Manufacturer> getdetails() {   | ||||
| 		List<Realm> realm = realmService.findByUserId(getUser().getUserId()); | ||||
| List<Manufacturer> 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.setManufacturer_name(data.getManufacturer_name()); | ||||
| 
 | ||||
| old.setDescription(data.getDescription()); | ||||
| 
 | ||||
| final Manufacturer test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
| 
 | ||||
| 	}} | ||||
| @ -0,0 +1,47 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import java.util.*; | ||||
| import com.realnet.basicp1.Repository.ManufacturerRepository; | ||||
| import com.realnet.basicp1.Entity.Manufacturer; | ||||
| 
 | ||||
| import com.realnet.basicp1.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<Manufacturer_ListFilter1>   getlistbuilder() { | ||||
| 	List<Manufacturer> list= Repository.findAll(); | ||||
| 		ArrayList<Manufacturer_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Manufacturer data : list) { | ||||
| {	 | ||||
| Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setManufacturer_name(data.getManufacturer_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Manufacturer_ListFilter1>   getlistbuilderparam( ) { | ||||
| 	List<Manufacturer> list= Repository.findAll(); | ||||
| 		ArrayList<Manufacturer_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Manufacturer data : list) { | ||||
| {	 | ||||
| Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setManufacturer_name(data.getManufacturer_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import com.realnet.basicp1.Repository.ProductRepository; | ||||
| import com.realnet.basicp1.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<Product> getAllWithPagination(Pageable page) { | ||||
| 		return Repository.findAll(page, getUser().getUserId()); | ||||
| 	}			 | ||||
| public List<Product> getdetails() {   | ||||
| 		List<Realm> realm = realmService.findByUserId(getUser().getUserId()); | ||||
| List<Product> 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_name(data.getProduct_name()); | ||||
| 
 | ||||
| old.setType_name(data.getType_name()); | ||||
| 
 | ||||
| final Product test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
| 
 | ||||
| 	}} | ||||
| @ -0,0 +1,53 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import java.util.*; | ||||
| import com.realnet.basicp1.Repository.ProductRepository; | ||||
| import com.realnet.basicp1.Entity.Product; | ||||
| 
 | ||||
| import com.realnet.basicp1.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<Product_ListFilter1>   getlistbuilder() { | ||||
| 	List<Product> list= Repository.findAll(); | ||||
| 		ArrayList<Product_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Product data : list) { | ||||
| String Type_name = data.getType_name(); | ||||
|  System.out.println(Type_name + "\n"); | ||||
| 
 | ||||
| 			if ("item".equals(Type_name)){	 | ||||
| Product_ListFilter1 dummy = new Product_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setProduct_name(data.getProduct_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Product_ListFilter1>   getlistbuilderparam(  String item) { | ||||
| 	List<Product> list= Repository.findAll(); | ||||
| 		ArrayList<Product_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Product data : list) { | ||||
| String Type_name = data.getType_name(); | ||||
|  System.out.println(Type_name + "\n"); | ||||
| 
 | ||||
| 			if (item.equals(Type_name)){	 | ||||
| Product_ListFilter1 dummy = new Product_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setProduct_name(data.getProduct_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import com.realnet.basicp1.Repository.TypesRepository; | ||||
| import com.realnet.basicp1.Entity.Types | ||||
| ;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 TypesService { | ||||
| @Autowired | ||||
| private TypesRepository Repository; | ||||
| 	@Autowired | ||||
| 	private AppUserServiceImpl userService;  | ||||
| @Autowired | ||||
| 	private RealmService realmService; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| public Types Savedata(Types data) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| Types save = Repository.save(data); | ||||
| 				return save;	 | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| //	get all with pagination | ||||
| 	public Page<Types> getAllWithPagination(Pageable page) { | ||||
| 		return Repository.findAll(page, getUser().getUserId()); | ||||
| 	}			 | ||||
| public List<Types> getdetails() {   | ||||
| 		List<Realm> realm = realmService.findByUserId(getUser().getUserId()); | ||||
| List<Types> all = Repository.findAll(getUser().getUserId()); | ||||
| 		 | ||||
| 		return all ;		} | ||||
| 
 | ||||
| 
 | ||||
| public Types getdetailsbyId(Integer id) { | ||||
| 	return Repository.findById(id).get(); | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| 	public void delete_by_id(Integer id) { | ||||
|  Repository.deleteById(id); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| public Types update(Types data,Integer id) { | ||||
| 	Types old = Repository.findById(id).get(); | ||||
| old.setType_name(data.getType_name()); | ||||
| 
 | ||||
| old.setManufacturer(data.getManufacturer()); | ||||
| 
 | ||||
| final Types test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
| 
 | ||||
| 	}} | ||||
| @ -0,0 +1,53 @@ | ||||
| package com.realnet.basicp1.Services; | ||||
| import java.util.*; | ||||
| import com.realnet.basicp1.Repository.TypesRepository; | ||||
| import com.realnet.basicp1.Entity.Types; | ||||
| 
 | ||||
| import com.realnet.basicp1.Entity.Types_ListFilter1; | ||||
| import java.util.List; | ||||
| 
 | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
|  public class Types_ListFilter1Service { | ||||
| @Autowired | ||||
| private TypesRepository Repository; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Types_ListFilter1>   getlistbuilder() { | ||||
| 	List<Types> list= Repository.findAll(); | ||||
| 		ArrayList<Types_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Types data : list) { | ||||
| String Manufacturer = data.getManufacturer(); | ||||
|  System.out.println(Manufacturer + "\n"); | ||||
| 
 | ||||
| 			if ("item".equals(Manufacturer)){	 | ||||
| Types_ListFilter1 dummy = new Types_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setType_name(data.getType_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public   List<Types_ListFilter1>   getlistbuilderparam(  String item) { | ||||
| 	List<Types> list= Repository.findAll(); | ||||
| 		ArrayList<Types_ListFilter1> l = new ArrayList<>(); | ||||
| 		for (Types data : list) { | ||||
| String Manufacturer = data.getManufacturer(); | ||||
|  System.out.println(Manufacturer + "\n"); | ||||
| 
 | ||||
| 			if (item.equals(Manufacturer)){	 | ||||
| Types_ListFilter1 dummy = new Types_ListFilter1(); | ||||
| 			dummy.setId(data.getId()); | ||||
|   dummy.setType_name(data.getType_name()); | ||||
| 	l.add(dummy); | ||||
| }  | ||||
| } 		 | ||||
| return l;} | ||||
| } | ||||
| @ -2,14 +2,14 @@ | ||||
| 
 | ||||
| export const LoginEnvironment = { | ||||
| 
 | ||||
|         "templateNo": "<templateNo>", | ||||
|         "loginHeading": "<loginHeading>", | ||||
|         "loginHeading2": "<loginHeading2>", | ||||
|         "isSignup": "<isSignup>", | ||||
|         "loginSignup": "<loginSignup> ", | ||||
|         "loginSignup2": "<loginSignup2>", | ||||
|         "loginForgotpass": "<loginForgotpass>", | ||||
|         "loginImage": "<loginImage>", | ||||
|         "loginImageURL": "<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" | ||||
|      | ||||
| } | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -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; | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,77 @@ | ||||
| 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 Customer_informationservice{ | ||||
|   private baseURL = "Customer_information/Customer_information" ;  constructor( | ||||
|     private http: HttpClient, | ||||
|     private apiRequest: ApiRequestService, | ||||
|   ) { } | ||||
|   getAll(page?: number, size?: number): Observable<any> { | ||||
|     return this.apiRequest.get(this.baseURL); | ||||
|   } | ||||
|   getById(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.get(_http); | ||||
|   } | ||||
|   create(data: any): Observable<any> { | ||||
|     return this.apiRequest.post(this.baseURL, data); | ||||
|   } | ||||
|   update(id: number, data: any): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.put(_http, data); | ||||
|   } | ||||
|   delete(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.delete(_http); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| getAllmanufacturer(): Observable<any> {    | ||||
| return this.apiRequest.get("Manufacturer_ListFilter1/Manufacturer_ListFilter1");  } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   gettypeDependent(field: string): Observable<any> { | ||||
|     return this.apiRequest.get("Types_ListFilter1/Types_ListFilter11/" + field); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   getproductDependent(field: string): Observable<any> { | ||||
|     return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| getAlldeployment_type(): Observable<any> {    | ||||
| return this.apiRequest.get("Deployment_type_ListFilter1/Deployment_type_ListFilter1");  } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -0,0 +1,4 @@ | ||||
| export const Customer_informationcardvariable = { | ||||
|     "cardButton": false, | ||||
|     "cardmodeldata": `` | ||||
| } | ||||
| @ -0,0 +1,315 @@ | ||||
| <ol class="breadcrumb breadcrumb-arrow font-trirong"> | ||||
|   <li><a href="javascript://"> Deployment type</a></li> | ||||
| </ol> | ||||
| <div class="dg-wrapper"> | ||||
|   <div class="clr-row"> | ||||
|     <div class="clr-col-8"> | ||||
|       <h3>Deployment type </h3> | ||||
|     </div> | ||||
|     <div class="clr-col-4" style="text-align: right;"> | ||||
|  <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" > | ||||
|         <clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon>    <clr-icon *ngIf="isCardview" shape="bars"></clr-icon> | ||||
|       </button> | ||||
|         <!-- button --> | ||||
|      <button id="add" class="btn btn-primary" (click)="goToAdd(product)" > | ||||
|         <clr-icon shape="plus"></clr-icon>ADD | ||||
|       </button> | ||||
|     </div></div> | ||||
|   <ng-container *ngIf="!isCardview">   <!-- GET ALL -->     <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected"> | ||||
|     <clr-dg-placeholder> | ||||
|         <ng-template #loadingSpinner> | ||||
|             <clr-spinner>Loading ... </clr-spinner> | ||||
|         </ng-template> | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'deployment_type'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Deployment Type | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
|  <!-- who column --> | ||||
|       <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}"> | ||||
|         <clr-icon shape="bars"></clr-icon> Action | ||||
|       </ng-container></clr-dg-column> | ||||
|       <!-- end -->  | ||||
| 
 | ||||
|  <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user"> | ||||
| 
 | ||||
| <clr-dg-cell>{{user.deployment_type }}</clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| <clr-dg-cell> | ||||
|   <clr-signpost> | ||||
|    <span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span> | ||||
|    <clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen> | ||||
|      <h5 style="margin-top: 0">Who Column</h5> | ||||
|            <div>Account ID: <code class="clr-code">{{user.accountId}}</code></div> | ||||
|            <div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div> | ||||
|            <div>Created By: <code class="clr-code">{{user.createdBy}}</code></div> | ||||
|            <div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div> | ||||
|            <div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div> | ||||
|    </clr-signpost-content> | ||||
|  </clr-signpost> | ||||
|  </clr-dg-cell> | ||||
|   | ||||
|  <!-- who colmn -->  | ||||
|   | ||||
|  <clr-dg-action-overflow> | ||||
|         <button class="action-item" (click)="onEdit(user)">Edit</button> | ||||
|         <button class="action-item" (click)="onDelete(user)">Delete</button> | ||||
|       </clr-dg-action-overflow> | ||||
|          </clr-dg-row> | ||||
|     <clr-dg-footer> | ||||
|       <clr-dg-pagination #pagination [clrDgPageSize]="10"> | ||||
|         <clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size> | ||||
|         {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} | ||||
|         of {{pagination.totalItems}} users | ||||
|       </clr-dg-pagination> | ||||
|     </clr-dg-footer> | ||||
|   </clr-datagrid> </ng-container> | ||||
| <ng-template #showInfo> | ||||
|   <div class="alert alert-info" role="alert"> | ||||
|       <div class="alert-items"> | ||||
|           <div class="alert-item static"> | ||||
|               <span class="alert-text"> | ||||
|                 <clr-icon class="alert-icon" shape="info-circle"></clr-icon> | ||||
|                     Data could be found. Loading.. | ||||
|                   <clr-spinner [clrMedium]="true">Loading ...</clr-spinner> | ||||
|               </span> | ||||
|           </div> | ||||
|       </div> | ||||
|   </div> | ||||
| </ng-template><ng-container *ngIf="isCardview"> | ||||
|   <div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start"> | ||||
|     <div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" > | ||||
|       <div class="clr-row"> | ||||
|         <div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;"> | ||||
|   <div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'"> | ||||
|     <div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;"> | ||||
|       <ng-container *ngFor="let item of dashboardArray"> | ||||
|         <div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1" | ||||
|           [style.gridRowEnd]="item.y + item.rows + 1"> | ||||
|           <div *ngIf="item.name === 'textField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"     	 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|            {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] }} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'dateField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] | date}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
|           <div *ngIf="item.name === 'numberField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ]}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'Line'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"> | ||||
|           <hr> | ||||
|           </div> | ||||
| 
 | ||||
|            | ||||
|           <div *ngIf="item.name === 'Icon'" class="icon-card" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           > | ||||
|             <clr-icon [attr.shape]="item.iconName"></clr-icon> | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name == 'Image'" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">			 <img id="filePreview" [src]="item.imageURL" alt="File Preview" | ||||
|             [style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'" | ||||
|             [style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div> | ||||
|         </div> | ||||
|       </ng-container> | ||||
|     </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </ng-container> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Deployment type | ||||
|  <!--update button --> | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| <!-- button --> | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Deployment Type</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.deployment_type" name="deployment_type" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|     <br> | ||||
|     <hr> | ||||
|     <div class="clr-row"> | ||||
|       <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|         <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|           <!-- Text Input -->    <label  *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'text'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" /> | ||||
|    | ||||
|           <!-- Date Input -->    <label  *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'date'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-input" /> | ||||
|    | ||||
|           <!-- Textarea -->    <label  *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|           <textarea *ngSwitchCase="'textarea'"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  col="10" row="2"></textarea> | ||||
|    | ||||
|           <!-- Checkbox -->    <label  *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|           <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-checkbox" /> | ||||
|         </ng-container> | ||||
|   </div> | ||||
|   </div> | ||||
| </div> | ||||
| 
 | ||||
|   <!-- form code end -->  <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button> | ||||
|       <button type="submit" class="btn btn-primary"  (click)="onUpdate(rowSelected.id)">Update</button> | ||||
|       </div> | ||||
|     </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h1 class="delete">Are You Sure Want to delete?</h1> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
|     <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button> | ||||
|     <button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button> | ||||
|     </div> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <!-- ADD FORM ..... --> | ||||
| <clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Add Deployment type  | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
|             | ||||
|     <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" | ||||
|       class="tooltip tooltip-sm tooltip-bottom-left"> | ||||
|       <a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Deployment_type_formCode' }"> | ||||
|         <clr-icon shape="airplane" size="32"></clr-icon> | ||||
|       </a> | ||||
|       <span class="tooltip-content">Form Extension</span> | ||||
|     </a> </h3> | ||||
|   <div class="modal-body"> | ||||
|      <form [formGroup]="entryForm" > | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Deployment Type</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="deployment_type" />        | ||||
|  </div> | ||||
| 
 | ||||
|   | ||||
|  </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
|       <div *ngIf="checkFormCode"> | ||||
|         <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|         <br> | ||||
|         <hr> | ||||
|         <div class="clr-row"> | ||||
|           <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|             <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|               <!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|               <textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea> | ||||
|               <!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|               <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-checkbox" /> | ||||
|             </ng-container> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <!-- form code end --> <div class="modal-footer"> | ||||
| <button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button> | ||||
|         <button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button> | ||||
|         </div> | ||||
| </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,225 @@ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { ToastrService } from 'ngx-toastr'; | ||||
| import { AlertService } from 'src/app/services/alert.service'; | ||||
| import { Deployment_typeservice} from './Deployment_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 { Deployment_typecardvariable } from './Deployment_type_cardvariable'; | ||||
| import { UserInfoService } from 'src/app/services/user-info.service'; | ||||
| declare var JsBarcode: any;  | ||||
| @Component({ | ||||
|   selector: 'app-Deployment_type', | ||||
|   templateUrl: './Deployment_type.component.html', | ||||
|   styleUrls: ['./Deployment_type.component.scss'] | ||||
| }) | ||||
| export class Deployment_typeComponent implements OnInit { | ||||
|   cardButton = Deployment_typecardvariable.cardButton; | ||||
|   cardmodeldata = Deployment_typecardvariable.cardmodeldata; | ||||
|   public dashboardArray: DashboardContentModel2[]; | ||||
|   isCardview = Deployment_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 = 'Deployment_type_formCode' | ||||
| tableName = 'Deployment_type';  checkFormCode; selected: any[] = []; constructor( | ||||
|     private extensionService: ExtensionService, | ||||
| private userInfoService:UserInfoService, | ||||
|     private mainService:Deployment_typeservice, | ||||
|     private alertService: AlertService, | ||||
|     private toastr: ToastrService, | ||||
|     private _fb: FormBuilder, | ||||
|   ) { } | ||||
|   private editInterval: any; | ||||
| // 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({ | ||||
| deployment_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 === "Deployment_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 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
|     if (this.editInterval) { | ||||
|       clearInterval(this.editInterval); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
|       console.log(data); | ||||
|       this.product = data; | ||||
| this.product = [...this.product].reverse(); 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(); | ||||
| 
 | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| 
 | ||||
| @ -0,0 +1,35 @@ | ||||
| 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 Deployment_typeservice{ | ||||
|   private baseURL = "Deployment_type/Deployment_type" ;  constructor( | ||||
|     private http: HttpClient, | ||||
|     private apiRequest: ApiRequestService, | ||||
|   ) { } | ||||
|   getAll(page?: number, size?: number): Observable<any> { | ||||
|     return this.apiRequest.get(this.baseURL); | ||||
|   } | ||||
|   getById(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.get(_http); | ||||
|   } | ||||
|   create(data: any): Observable<any> { | ||||
|     return this.apiRequest.post(this.baseURL, data); | ||||
|   } | ||||
|   update(id: number, data: any): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.put(_http, data); | ||||
|   } | ||||
|   delete(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.delete(_http); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -0,0 +1,4 @@ | ||||
| export const Deployment_typecardvariable = { | ||||
|     "cardButton": false, | ||||
|     "cardmodeldata": `` | ||||
| } | ||||
| @ -0,0 +1,347 @@ | ||||
| <ol class="breadcrumb breadcrumb-arrow font-trirong"> | ||||
|   <li><a href="javascript://"> Manufacturer</a></li> | ||||
| </ol> | ||||
| <div class="dg-wrapper"> | ||||
|   <div class="clr-row"> | ||||
|     <div class="clr-col-8"> | ||||
|       <h3>Manufacturer </h3> | ||||
|     </div> | ||||
|     <div class="clr-col-4" style="text-align: right;"> | ||||
|  <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" > | ||||
|         <clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon>    <clr-icon *ngIf="isCardview" shape="bars"></clr-icon> | ||||
|       </button> | ||||
|         <!-- button --> | ||||
|      <button id="add" class="btn btn-primary" (click)="goToAdd(product)" > | ||||
|         <clr-icon shape="plus"></clr-icon>ADD | ||||
|       </button> | ||||
|     </div></div> | ||||
|   <ng-container *ngIf="!isCardview">   <!-- GET ALL -->     <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected"> | ||||
|     <clr-dg-placeholder> | ||||
|         <ng-template #loadingSpinner> | ||||
|             <clr-spinner>Loading ... </clr-spinner> | ||||
|         </ng-template> | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'manufacturer_name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Manufacturer name | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
|  <!-- who column --> | ||||
|       <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}"> | ||||
|         <clr-icon shape="bars"></clr-icon> Action | ||||
|       </ng-container></clr-dg-column> | ||||
|       <!-- end -->  | ||||
| 
 | ||||
|  <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user"> | ||||
| 
 | ||||
| <clr-dg-cell>{{user.manufacturer_name }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell (click)="goToReplaceStringdescription(user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon></clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| <clr-dg-cell> | ||||
|   <clr-signpost> | ||||
|    <span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span> | ||||
|    <clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen> | ||||
|      <h5 style="margin-top: 0">Who Column</h5> | ||||
|            <div>Account ID: <code class="clr-code">{{user.accountId}}</code></div> | ||||
|            <div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div> | ||||
|            <div>Created By: <code class="clr-code">{{user.createdBy}}</code></div> | ||||
|            <div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div> | ||||
|            <div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div> | ||||
|    </clr-signpost-content> | ||||
|  </clr-signpost> | ||||
|  </clr-dg-cell> | ||||
|   | ||||
|  <!-- who colmn -->  | ||||
|   | ||||
|  <clr-dg-action-overflow> | ||||
|         <button class="action-item" (click)="onEdit(user)">Edit</button> | ||||
|         <button class="action-item" (click)="onDelete(user)">Delete</button> | ||||
|       </clr-dg-action-overflow> | ||||
|          </clr-dg-row> | ||||
|     <clr-dg-footer> | ||||
|       <clr-dg-pagination #pagination [clrDgPageSize]="10"> | ||||
|         <clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size> | ||||
|         {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} | ||||
|         of {{pagination.totalItems}} users | ||||
|       </clr-dg-pagination> | ||||
|     </clr-dg-footer> | ||||
|   </clr-datagrid> </ng-container> | ||||
| <ng-template #showInfo> | ||||
|   <div class="alert alert-info" role="alert"> | ||||
|       <div class="alert-items"> | ||||
|           <div class="alert-item static"> | ||||
|               <span class="alert-text"> | ||||
|                 <clr-icon class="alert-icon" shape="info-circle"></clr-icon> | ||||
|                     Data could be found. Loading.. | ||||
|                   <clr-spinner [clrMedium]="true">Loading ...</clr-spinner> | ||||
|               </span> | ||||
|           </div> | ||||
|       </div> | ||||
|   </div> | ||||
| </ng-template><ng-container *ngIf="isCardview"> | ||||
|   <div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start"> | ||||
|     <div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" > | ||||
|       <div class="clr-row"> | ||||
|         <div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;"> | ||||
|   <div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'"> | ||||
|     <div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;"> | ||||
|       <ng-container *ngFor="let item of dashboardArray"> | ||||
|         <div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1" | ||||
|           [style.gridRowEnd]="item.y + item.rows + 1"> | ||||
|           <div *ngIf="item.name === 'textField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"     	 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|            {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] }} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'dateField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] | date}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
|           <div *ngIf="item.name === 'numberField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ]}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'Line'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"> | ||||
|           <hr> | ||||
|           </div> | ||||
| 
 | ||||
|            | ||||
|           <div *ngIf="item.name === 'Icon'" class="icon-card" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           > | ||||
|             <clr-icon [attr.shape]="item.iconName"></clr-icon> | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name == 'Image'" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">			 <img id="filePreview" [src]="item.imageURL" alt="File Preview" | ||||
|             [style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'" | ||||
|             [style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div> | ||||
|         </div> | ||||
|       </ng-container> | ||||
|     </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </ng-container> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true"> | ||||
| 						  <div class="modal-body"> | ||||
| 						    <textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea> | ||||
| 						  </div></clr-modal> | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Manufacturer | ||||
|  <!--update button --> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| <!-- button --> | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Manufacturer name</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.manufacturer_name" name="manufacturer_name" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">          | ||||
| <label> Description</label> | ||||
| 	        <input id="name"  type="Text" class="form-control" style="border: none; outline: none; height:33px !important;" [(ngModel)]="rowSelected.description" name=" description " />       </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|     <br> | ||||
|     <hr> | ||||
|     <div class="clr-row"> | ||||
|       <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|         <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|           <!-- Text Input -->    <label  *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'text'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" /> | ||||
|    | ||||
|           <!-- Date Input -->    <label  *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'date'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-input" /> | ||||
|    | ||||
|           <!-- Textarea -->    <label  *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|           <textarea *ngSwitchCase="'textarea'"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  col="10" row="2"></textarea> | ||||
|    | ||||
|           <!-- Checkbox -->    <label  *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|           <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-checkbox" /> | ||||
|         </ng-container> | ||||
|   </div> | ||||
|   </div> | ||||
| </div> | ||||
| 
 | ||||
|   <!-- form code end -->  <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button> | ||||
|       <button type="submit" class="btn btn-primary"  (click)="onUpdate(rowSelected.id)">Update</button> | ||||
|       </div> | ||||
|     </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h1 class="delete">Are You Sure Want to delete?</h1> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
|     <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button> | ||||
|     <button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button> | ||||
|     </div> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <!-- ADD FORM ..... --> | ||||
| <clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Add Manufacturer  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
|             | ||||
|     <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" | ||||
|       class="tooltip tooltip-sm tooltip-bottom-left"> | ||||
|       <a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Manufacturer_formCode' }"> | ||||
|         <clr-icon shape="airplane" size="32"></clr-icon> | ||||
|       </a> | ||||
|       <span class="tooltip-content">Form Extension</span> | ||||
|     </a> </h3> | ||||
|   <div class="modal-body"> | ||||
|      <form [formGroup]="entryForm" > | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Manufacturer name</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="manufacturer_name" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">         | ||||
|  <label>Description</label>       | ||||
|    <input class="form-control" type="Text" formControlName="description" style="border: none; outline: none; height:33px !important;" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   | ||||
|  </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
|       <div *ngIf="checkFormCode"> | ||||
|         <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|         <br> | ||||
|         <hr> | ||||
|         <div class="clr-row"> | ||||
|           <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|             <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|               <!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|               <textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea> | ||||
|               <!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|               <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-checkbox" /> | ||||
|             </ng-container> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <!-- form code end --> <div class="modal-footer"> | ||||
| <button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button> | ||||
|         <button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button> | ||||
|         </div> | ||||
| </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,251 @@ | ||||
| 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, | ||||
|   ) { } | ||||
|   private editInterval: any; | ||||
| // 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({ | ||||
| manufacturer_name : [null], | ||||
| 
 | ||||
| description : [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 === "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 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
|     if (this.editInterval) { | ||||
|       clearInterval(this.editInterval); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
|       console.log(data); | ||||
|       this.product = data; | ||||
| this.product = [...this.product].reverse(); 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
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -0,0 +1,37 @@ | ||||
| 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<any> { | ||||
|     return this.apiRequest.get(this.baseURL); | ||||
|   } | ||||
|   getById(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.get(_http); | ||||
|   } | ||||
|   create(data: any): Observable<any> { | ||||
|     return this.apiRequest.post(this.baseURL, data); | ||||
|   } | ||||
|   update(id: number, data: any): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.put(_http, data); | ||||
|   } | ||||
|   delete(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.delete(_http); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -0,0 +1,4 @@ | ||||
| export const Manufacturercardvariable = { | ||||
|     "cardButton": false, | ||||
|     "cardmodeldata": `` | ||||
| } | ||||
| @ -0,0 +1,344 @@ | ||||
| <ol class="breadcrumb breadcrumb-arrow font-trirong"> | ||||
|   <li><a href="javascript://"> Product</a></li> | ||||
| </ol> | ||||
| <div class="dg-wrapper"> | ||||
|   <div class="clr-row"> | ||||
|     <div class="clr-col-8"> | ||||
|       <h3>Product </h3> | ||||
|     </div> | ||||
|     <div class="clr-col-4" style="text-align: right;"> | ||||
|  <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" > | ||||
|         <clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon>    <clr-icon *ngIf="isCardview" shape="bars"></clr-icon> | ||||
|       </button> | ||||
|         <!-- button --> | ||||
|      <button id="add" class="btn btn-primary" (click)="goToAdd(product)" > | ||||
|         <clr-icon shape="plus"></clr-icon>ADD | ||||
|       </button> | ||||
|     </div></div> | ||||
|   <ng-container *ngIf="!isCardview">   <!-- GET ALL -->     <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected"> | ||||
|     <clr-dg-placeholder> | ||||
|         <ng-template #loadingSpinner> | ||||
|             <clr-spinner>Loading ... </clr-spinner> | ||||
|         </ng-template> | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'product_name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Product Name | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'type_name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Type name | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
|  <!-- who column --> | ||||
|       <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}"> | ||||
|         <clr-icon shape="bars"></clr-icon> Action | ||||
|       </ng-container></clr-dg-column> | ||||
|       <!-- end -->  | ||||
| 
 | ||||
|  <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user"> | ||||
| 
 | ||||
| <clr-dg-cell>{{user.product_name }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.type_name }}</clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| <clr-dg-cell> | ||||
|   <clr-signpost> | ||||
|    <span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span> | ||||
|    <clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen> | ||||
|      <h5 style="margin-top: 0">Who Column</h5> | ||||
|            <div>Account ID: <code class="clr-code">{{user.accountId}}</code></div> | ||||
|            <div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div> | ||||
|            <div>Created By: <code class="clr-code">{{user.createdBy}}</code></div> | ||||
|            <div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div> | ||||
|            <div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div> | ||||
|    </clr-signpost-content> | ||||
|  </clr-signpost> | ||||
|  </clr-dg-cell> | ||||
|   | ||||
|  <!-- who colmn -->  | ||||
|   | ||||
|  <clr-dg-action-overflow> | ||||
|         <button class="action-item" (click)="onEdit(user)">Edit</button> | ||||
|         <button class="action-item" (click)="onDelete(user)">Delete</button> | ||||
|       </clr-dg-action-overflow> | ||||
|          </clr-dg-row> | ||||
|     <clr-dg-footer> | ||||
|       <clr-dg-pagination #pagination [clrDgPageSize]="10"> | ||||
|         <clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size> | ||||
|         {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} | ||||
|         of {{pagination.totalItems}} users | ||||
|       </clr-dg-pagination> | ||||
|     </clr-dg-footer> | ||||
|   </clr-datagrid> </ng-container> | ||||
| <ng-template #showInfo> | ||||
|   <div class="alert alert-info" role="alert"> | ||||
|       <div class="alert-items"> | ||||
|           <div class="alert-item static"> | ||||
|               <span class="alert-text"> | ||||
|                 <clr-icon class="alert-icon" shape="info-circle"></clr-icon> | ||||
|                     Data could be found. Loading.. | ||||
|                   <clr-spinner [clrMedium]="true">Loading ...</clr-spinner> | ||||
|               </span> | ||||
|           </div> | ||||
|       </div> | ||||
|   </div> | ||||
| </ng-template><ng-container *ngIf="isCardview"> | ||||
|   <div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start"> | ||||
|     <div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" > | ||||
|       <div class="clr-row"> | ||||
|         <div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;"> | ||||
|   <div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'"> | ||||
|     <div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;"> | ||||
|       <ng-container *ngFor="let item of dashboardArray"> | ||||
|         <div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1" | ||||
|           [style.gridRowEnd]="item.y + item.rows + 1"> | ||||
|           <div *ngIf="item.name === 'textField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"     	 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|            {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] }} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'dateField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] | date}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
|           <div *ngIf="item.name === 'numberField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ]}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'Line'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"> | ||||
|           <hr> | ||||
|           </div> | ||||
| 
 | ||||
|            | ||||
|           <div *ngIf="item.name === 'Icon'" class="icon-card" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           > | ||||
|             <clr-icon [attr.shape]="item.iconName"></clr-icon> | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name == 'Image'" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">			 <img id="filePreview" [src]="item.imageURL" alt="File Preview" | ||||
|             [style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'" | ||||
|             [style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div> | ||||
|         </div> | ||||
|       </ng-container> | ||||
|     </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </ng-container> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Product | ||||
|  <!--update button --> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| <!-- button --> | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Product Name</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.product_name" name="product_name" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Type name</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.type_name" name="type_name" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|     <br> | ||||
|     <hr> | ||||
|     <div class="clr-row"> | ||||
|       <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|         <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|           <!-- Text Input -->    <label  *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'text'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" /> | ||||
|    | ||||
|           <!-- Date Input -->    <label  *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'date'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-input" /> | ||||
|    | ||||
|           <!-- Textarea -->    <label  *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|           <textarea *ngSwitchCase="'textarea'"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  col="10" row="2"></textarea> | ||||
|    | ||||
|           <!-- Checkbox -->    <label  *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|           <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-checkbox" /> | ||||
|         </ng-container> | ||||
|   </div> | ||||
|   </div> | ||||
| </div> | ||||
| 
 | ||||
|   <!-- form code end -->  <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button> | ||||
|       <button type="submit" class="btn btn-primary"  (click)="onUpdate(rowSelected.id)">Update</button> | ||||
|       </div> | ||||
|     </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h1 class="delete">Are You Sure Want to delete?</h1> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
|     <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button> | ||||
|     <button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button> | ||||
|     </div> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <!-- ADD FORM ..... --> | ||||
| <clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Add Product  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
|             | ||||
|     <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" | ||||
|       class="tooltip tooltip-sm tooltip-bottom-left"> | ||||
|       <a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Product_formCode' }"> | ||||
|         <clr-icon shape="airplane" size="32"></clr-icon> | ||||
|       </a> | ||||
|       <span class="tooltip-content">Form Extension</span> | ||||
|     </a> </h3> | ||||
|   <div class="modal-body"> | ||||
|      <form [formGroup]="entryForm" > | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Product Name</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="product_name" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Type name</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="type_name" />        | ||||
|  </div> | ||||
| 
 | ||||
|   | ||||
|  </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
|       <div *ngIf="checkFormCode"> | ||||
|         <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|         <br> | ||||
|         <hr> | ||||
|         <div class="clr-row"> | ||||
|           <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|             <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|               <!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|               <textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea> | ||||
|               <!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|               <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-checkbox" /> | ||||
|             </ng-container> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <!-- form code end --> <div class="modal-footer"> | ||||
| <button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button> | ||||
|         <button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button> | ||||
|         </div> | ||||
| </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,249 @@ | ||||
| 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, | ||||
|   ) { } | ||||
|   private editInterval: any; | ||||
| // 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_name : [null], | ||||
| 
 | ||||
| type_name : [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 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
|     if (this.editInterval) { | ||||
|       clearInterval(this.editInterval); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
|       console.log(data); | ||||
|       this.product = data; | ||||
| this.product = [...this.product].reverse(); 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(); | ||||
| 
 | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -0,0 +1,37 @@ | ||||
| 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<any> { | ||||
|     return this.apiRequest.get(this.baseURL); | ||||
|   } | ||||
|   getById(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.get(_http); | ||||
|   } | ||||
|   create(data: any): Observable<any> { | ||||
|     return this.apiRequest.post(this.baseURL, data); | ||||
|   } | ||||
|   update(id: number, data: any): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.put(_http, data); | ||||
|   } | ||||
|   delete(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.delete(_http); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -0,0 +1,4 @@ | ||||
| export const Productcardvariable = { | ||||
|     "cardButton": false, | ||||
|     "cardmodeldata": `` | ||||
| } | ||||
| @ -0,0 +1,344 @@ | ||||
| <ol class="breadcrumb breadcrumb-arrow font-trirong"> | ||||
|   <li><a href="javascript://"> Types</a></li> | ||||
| </ol> | ||||
| <div class="dg-wrapper"> | ||||
|   <div class="clr-row"> | ||||
|     <div class="clr-col-8"> | ||||
|       <h3>Types </h3> | ||||
|     </div> | ||||
|     <div class="clr-col-4" style="text-align: right;"> | ||||
|  <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" > | ||||
|         <clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon>    <clr-icon *ngIf="isCardview" shape="bars"></clr-icon> | ||||
|       </button> | ||||
|         <!-- button --> | ||||
|      <button id="add" class="btn btn-primary" (click)="goToAdd(product)" > | ||||
|         <clr-icon shape="plus"></clr-icon>ADD | ||||
|       </button> | ||||
|     </div></div> | ||||
|   <ng-container *ngIf="!isCardview">   <!-- GET ALL -->     <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected"> | ||||
|     <clr-dg-placeholder> | ||||
|         <ng-template #loadingSpinner> | ||||
|             <clr-spinner>Loading ... </clr-spinner> | ||||
|         </ng-template> | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'type_name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Type Name | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'manufacturer'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Manufacturer | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
|  <!-- who column --> | ||||
|       <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}"> | ||||
|         <clr-icon shape="bars"></clr-icon> Action | ||||
|       </ng-container></clr-dg-column> | ||||
|       <!-- end -->  | ||||
| 
 | ||||
|  <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user"> | ||||
| 
 | ||||
| <clr-dg-cell>{{user.type_name }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.manufacturer }}</clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| <clr-dg-cell> | ||||
|   <clr-signpost> | ||||
|    <span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span> | ||||
|    <clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen> | ||||
|      <h5 style="margin-top: 0">Who Column</h5> | ||||
|            <div>Account ID: <code class="clr-code">{{user.accountId}}</code></div> | ||||
|            <div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div> | ||||
|            <div>Created By: <code class="clr-code">{{user.createdBy}}</code></div> | ||||
|            <div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div> | ||||
|            <div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div> | ||||
|    </clr-signpost-content> | ||||
|  </clr-signpost> | ||||
|  </clr-dg-cell> | ||||
|   | ||||
|  <!-- who colmn -->  | ||||
|   | ||||
|  <clr-dg-action-overflow> | ||||
|         <button class="action-item" (click)="onEdit(user)">Edit</button> | ||||
|         <button class="action-item" (click)="onDelete(user)">Delete</button> | ||||
|       </clr-dg-action-overflow> | ||||
|          </clr-dg-row> | ||||
|     <clr-dg-footer> | ||||
|       <clr-dg-pagination #pagination [clrDgPageSize]="10"> | ||||
|         <clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size> | ||||
|         {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} | ||||
|         of {{pagination.totalItems}} users | ||||
|       </clr-dg-pagination> | ||||
|     </clr-dg-footer> | ||||
|   </clr-datagrid> </ng-container> | ||||
| <ng-template #showInfo> | ||||
|   <div class="alert alert-info" role="alert"> | ||||
|       <div class="alert-items"> | ||||
|           <div class="alert-item static"> | ||||
|               <span class="alert-text"> | ||||
|                 <clr-icon class="alert-icon" shape="info-circle"></clr-icon> | ||||
|                     Data could be found. Loading.. | ||||
|                   <clr-spinner [clrMedium]="true">Loading ...</clr-spinner> | ||||
|               </span> | ||||
|           </div> | ||||
|       </div> | ||||
|   </div> | ||||
| </ng-template><ng-container *ngIf="isCardview"> | ||||
|   <div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start"> | ||||
|     <div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" > | ||||
|       <div class="clr-row"> | ||||
|         <div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;"> | ||||
|   <div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'"> | ||||
|     <div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;"> | ||||
|       <ng-container *ngFor="let item of dashboardArray"> | ||||
|         <div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1" | ||||
|           [style.gridRowEnd]="item.y + item.rows + 1"> | ||||
|           <div *ngIf="item.name === 'textField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"     	 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|            {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] }} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'dateField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ] | date}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
|           <div *ngIf="item.name === 'numberField'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> | ||||
|           {{beforeText(item.fieldtext)}} | ||||
|           {{ app[transform(item.fieldtext) ]}} | ||||
|           {{afterText(item.fieldtext)}} | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name === 'Line'" class="title-card card-title" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"> | ||||
|           <hr> | ||||
|           </div> | ||||
| 
 | ||||
|            | ||||
|           <div *ngIf="item.name === 'Icon'" class="icon-card" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           > | ||||
|             <clr-icon [attr.shape]="item.iconName"></clr-icon> | ||||
|           </div> | ||||
| 
 | ||||
|           <div *ngIf="item.name == 'Image'" | ||||
|           [style.text-align]="item.alignment !== '' ? item.alignment : 'left'" | ||||
|           [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'" | ||||
|           [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'" | ||||
|           [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'" | ||||
|           [style.font-style]="item.italic == true ? 'Italic' : 'normal'" | ||||
|           [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :  | ||||
|           (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))" | ||||
|           [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'" | ||||
|           [style.color]="item.textcolor !== '' ? item.textcolor : 'black'" | ||||
|           [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor" | ||||
|           [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">			 <img id="filePreview" [src]="item.imageURL" alt="File Preview" | ||||
|             [style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'" | ||||
|             [style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div> | ||||
|         </div> | ||||
|       </ng-container> | ||||
|     </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </div> | ||||
|   </ng-container> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Types | ||||
|  <!--update button --> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| <!-- button --> | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Type Name</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.type_name" name="type_name" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>Manufacturer</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.manufacturer" name="manufacturer" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|     <br> | ||||
|     <hr> | ||||
|     <div class="clr-row"> | ||||
|       <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|         <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|           <!-- Text Input -->    <label  *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'text'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" /> | ||||
|    | ||||
|           <!-- Date Input -->    <label  *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|           <input *ngSwitchCase="'date'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-input" /> | ||||
|    | ||||
|           <!-- Textarea -->    <label  *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|           <textarea *ngSwitchCase="'textarea'"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  col="10" row="2"></textarea> | ||||
|    | ||||
|           <!-- Checkbox -->    <label  *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|           <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-checkbox" /> | ||||
|         </ng-container> | ||||
|   </div> | ||||
|   </div> | ||||
| </div> | ||||
| 
 | ||||
|   <!-- form code end -->  <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button> | ||||
|       <button type="submit" class="btn btn-primary"  (click)="onUpdate(rowSelected.id)">Update</button> | ||||
|       </div> | ||||
|     </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h1 class="delete">Are You Sure Want to delete?</h1> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
|     <div class="modal-footer"> | ||||
|       <button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button> | ||||
|     <button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button> | ||||
|     </div> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| <!-- ADD FORM ..... --> | ||||
| <clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Add Types  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
|             | ||||
|     <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" | ||||
|       class="tooltip tooltip-sm tooltip-bottom-left"> | ||||
|       <a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Types_formCode' }"> | ||||
|         <clr-icon shape="airplane" size="32"></clr-icon> | ||||
|       </a> | ||||
|       <span class="tooltip-content">Form Extension</span> | ||||
|     </a> </h3> | ||||
|   <div class="modal-body"> | ||||
|      <form [formGroup]="entryForm" > | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Type Name</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="type_name" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  Manufacturer</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="manufacturer" />        | ||||
|  </div> | ||||
| 
 | ||||
|   | ||||
|  </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
|       <div *ngIf="checkFormCode"> | ||||
|         <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
|         <br> | ||||
|         <hr> | ||||
|         <div class="clr-row"> | ||||
|           <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend"> | ||||
|             <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType"> | ||||
|               <!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label> | ||||
|               <input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-input" /> | ||||
|               <!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label> | ||||
|               <textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea> | ||||
|               <!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br> | ||||
|               <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue" | ||||
|                 class="clr-checkbox" /> | ||||
|             </ng-container> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <!-- form code end --> <div class="modal-footer"> | ||||
| <button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button> | ||||
|         <button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button> | ||||
|         </div> | ||||
| </form> | ||||
|   </div> | ||||
| </clr-modal> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,249 @@ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { ToastrService } from 'ngx-toastr'; | ||||
| import { AlertService } from 'src/app/services/alert.service'; | ||||
| import { Typesservice} from './Types.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 { Typescardvariable } from './Types_cardvariable'; | ||||
| import { UserInfoService } from 'src/app/services/user-info.service'; | ||||
| declare var JsBarcode: any;  | ||||
| @Component({ | ||||
|   selector: 'app-Types', | ||||
|   templateUrl: './Types.component.html', | ||||
|   styleUrls: ['./Types.component.scss'] | ||||
| }) | ||||
| export class TypesComponent implements OnInit { | ||||
|   cardButton = Typescardvariable.cardButton; | ||||
|   cardmodeldata = Typescardvariable.cardmodeldata; | ||||
|   public dashboardArray: DashboardContentModel2[]; | ||||
|   isCardview = Typescardvariable.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 = 'Types_formCode' | ||||
| tableName = 'Types';  checkFormCode; selected: any[] = []; constructor( | ||||
|     private extensionService: ExtensionService, | ||||
| private userInfoService:UserInfoService, | ||||
|     private mainService:Typesservice, | ||||
|     private alertService: AlertService, | ||||
|     private toastr: ToastrService, | ||||
|     private _fb: FormBuilder, | ||||
|   ) { } | ||||
|   private editInterval: any; | ||||
| // 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_name : [null], | ||||
| 
 | ||||
| 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 === "Types_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 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
|     if (this.editInterval) { | ||||
|       clearInterval(this.editInterval); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
|       console.log(data); | ||||
|       this.product = data; | ||||
| this.product = [...this.product].reverse(); 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(); | ||||
| 
 | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -0,0 +1,37 @@ | ||||
| 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 Typesservice{ | ||||
|   private baseURL = "Types/Types" ;  constructor( | ||||
|     private http: HttpClient, | ||||
|     private apiRequest: ApiRequestService, | ||||
|   ) { } | ||||
|   getAll(page?: number, size?: number): Observable<any> { | ||||
|     return this.apiRequest.get(this.baseURL); | ||||
|   } | ||||
|   getById(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.get(_http); | ||||
|   } | ||||
|   create(data: any): Observable<any> { | ||||
|     return this.apiRequest.post(this.baseURL, data); | ||||
|   } | ||||
|   update(id: number, data: any): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.put(_http, data); | ||||
|   } | ||||
|   delete(id: number): Observable<any> { | ||||
|     const _http = this.baseURL + "/" + id; | ||||
|     return this.apiRequest.delete(_http); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -0,0 +1,4 @@ | ||||
| export const Typescardvariable = { | ||||
|     "cardButton": false, | ||||
|     "cardmodeldata": `` | ||||
| } | ||||
| @ -1,3 +1,8 @@ | ||||
| import { TypesComponent } from './BuilderComponents/basicp1/Types/Types.component'; | ||||
| import { ProductComponent } from './BuilderComponents/basicp1/Product/Product.component'; | ||||
| import { ManufacturerComponent } from './BuilderComponents/basicp1/Manufacturer/Manufacturer.component'; | ||||
| import { Deployment_typeComponent } from './BuilderComponents/basicp1/Deployment_type/Deployment_type.component'; | ||||
| import { Customer_informationComponent } from './BuilderComponents/basicp1/Customer_information/Customer_information.component'; | ||||
| 
 | ||||
| import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; | ||||
| import { Component, NgModule } from '@angular/core'; | ||||
| @ -256,6 +261,21 @@ const routes: Routes = [ | ||||
| 
 | ||||
| 
 | ||||
|       // buildercomponents
 | ||||
| {path:'Types',component:TypesComponent}, | ||||
| 
 | ||||
| 
 | ||||
| {path:'Product',component:ProductComponent}, | ||||
| 
 | ||||
| 
 | ||||
| {path:'Manufacturer',component:ManufacturerComponent}, | ||||
| 
 | ||||
| 
 | ||||
| {path:'Deployment_type',component:Deployment_typeComponent}, | ||||
| 
 | ||||
| 
 | ||||
| {path:'Customer_information',component:Customer_informationComponent}, | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,3 +1,8 @@ | ||||
| import { TypesComponent } from './BuilderComponents/basicp1/Types/Types.component'; | ||||
| import { ProductComponent } from './BuilderComponents/basicp1/Product/Product.component'; | ||||
| import { ManufacturerComponent } from './BuilderComponents/basicp1/Manufacturer/Manufacturer.component'; | ||||
| import { Deployment_typeComponent } from './BuilderComponents/basicp1/Deployment_type/Deployment_type.component'; | ||||
| import { Customer_informationComponent } from './BuilderComponents/basicp1/Customer_information/Customer_information.component'; | ||||
| 
 | ||||
| 
 | ||||
| import { CommonModule } from '@angular/common'; | ||||
| @ -129,6 +134,21 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S | ||||
| 
 | ||||
| 
 | ||||
|     // buildercomponents
 | ||||
| TypesComponent, | ||||
| 
 | ||||
| 
 | ||||
| ProductComponent, | ||||
| 
 | ||||
| 
 | ||||
| ManufacturerComponent, | ||||
| 
 | ||||
| 
 | ||||
| Deployment_typeComponent, | ||||
| 
 | ||||
| 
 | ||||
| Customer_informationComponent, | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -226,10 +226,37 @@ | ||||
|   "MENU_ACTION_LINK": "Menu Action Link", | ||||
|   "STATUS": "Status", | ||||
|   "SUB_MENU": "Sub Menu", | ||||
|   "Active": "Active", | ||||
|   "Types": "Types", | ||||
|   "LT_Panel_Monitoring": "LT_Panel_Monitoring", | ||||
|   "Description": "Description", | ||||
|   "Fileupload_Field": "Fileupload_Field", | ||||
|   "Test22": "Test22", | ||||
|   "Test11": "Test11", | ||||
|   "Name": "Name" | ||||
|   "Contact_Person": "Contact_Person", | ||||
|   "Product": "Product", | ||||
|   "Compressed_Air_-_LPG/N2/O2/CO2": "Compressed_Air_-_LPG/N2/O2/CO2", | ||||
|   "Phone_Number": "Phone_Number", | ||||
|   "Manufacturer_name": "Manufacturer_name", | ||||
|   "total": "total", | ||||
|   "Water_Management-STP/ETP": "Water_Management-STP/ETP", | ||||
|   "Order_Summary": "Order_Summary", | ||||
|   "Manufacturer": "Manufacturer", | ||||
|   "Deployment_Type": "Deployment_Type", | ||||
|   "Compressed_Air_-Gag_Monitoring": "Compressed_Air_-Gag_Monitoring", | ||||
|   "APFC_Panel_Monitoring": "APFC_Panel_Monitoring", | ||||
|   "Active_Energy": "Active_Energy", | ||||
|   "Type_Name": "Type_Name", | ||||
|   "HT_Panel_Monitoring": "HT_Panel_Monitoring", | ||||
|   "Email_Address": "Email_Address", | ||||
|   "Customer_information": "Customer_information", | ||||
|   "DG_Monitoring_-_with_fule": "DG_Monitoring_-_with_fule", | ||||
|   "Quantity": "Quantity", | ||||
|   "Product_Name": "Product_Name", | ||||
|   "UPS_Monitoring": "UPS_Monitoring", | ||||
|   "Deployment_type": "Deployment_type", | ||||
|   "Water_Management-water_Monitoring": "Water_Management-water_Monitoring", | ||||
|   "Type": "Type", | ||||
|   "Type_name": "Type_name", | ||||
|   "DG_Monitoring_-_without_fule": "DG_Monitoring_-_without_fule", | ||||
|   "Price": "Price", | ||||
|   "Busbar_Monitoring": "Busbar_Monitoring", | ||||
|   "Company_Name": "Company_Name", | ||||
|   "Customer_Address": "Customer_Address" | ||||
| } | ||||
							
								
								
									
										10
									
								
								orderformtest002-visadb-d/authsec_mysql/mysql/wf_table/wf_table.sql
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								orderformtest002-visadb-d/authsec_mysql/mysql/wf_table/wf_table.sql
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,10 @@ | ||||
| CREATE TABLE visadb.Customer_information(id BIGINT NOT NULL AUTO_INCREMENT, lt_panel_monitoring bit(1), description VARCHAR(400), contact_person VARCHAR(400), product VARCHAR(400), compressed_air_-_lpg/n2/o2/co2 bit(1), phone_number VARCHAR(400), total VARCHAR(400), water_management-stp/etp bit(1), order_summary VARCHAR(400), manufacturer int, deployment_type int, compressed_air_-gag_monitoring bit(1), apfc_panel_monitoring bit(1), active_energy bit(1), ht_panel_monitoring bit(1), email_address VARCHAR(400), dg_monitoring_-_with_fule bit(1), quantity int, ups_monitoring bit(1), water_management-water_monitoring bit(1), type VARCHAR(400), dg_monitoring_-_without_fule bit(1), price int, busbar_monitoring bit(1), company_name VARCHAR(400), customer_address VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE visadb.Deployment_type(id BIGINT NOT NULL AUTO_INCREMENT, deployment_type VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE visadb.Manufacturer(id BIGINT NOT NULL AUTO_INCREMENT, description VARCHAR(400), manufacturer_name VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE visadb.Product(id BIGINT NOT NULL AUTO_INCREMENT, type_name VARCHAR(400), product_name VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE visadb.Types(id BIGINT NOT NULL AUTO_INCREMENT, type_name VARCHAR(400), manufacturer VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user