build_app
This commit is contained in:
		
							parent
							
								
									19c8120f99
								
							
						
					
					
						commit
						804ad0fbe2
					
				@ -69,6 +69,18 @@ public class BuilderService {
 | 
				
			|||||||
		executeDump(true);
 | 
							executeDump(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// ADD OTHER SERVICE
 | 
							// ADD OTHER SERVICE
 | 
				
			||||||
 | 
					addCustomMenu( "Order_estimation","Order_estimation",  "Transcations"); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					addCustomMenu( "Product","Product",  "Transcations"); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					addCustomMenu( "Type","Type",  "Transcations"); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					addCustomMenu( "Manufacturer","Manufacturer",  "Transcations"); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		System.out.println("dashboard and menu inserted...");
 | 
							System.out.println("dashboard and menu inserted...");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,99 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.ManufacturerService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Manufacturer")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class ManufacturerController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private ManufacturerService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Manufacturer")
 | 
				
			||||||
 | 
							  public Manufacturer Savedata(@RequestBody Manufacturer data) {
 | 
				
			||||||
 | 
							Manufacturer save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Manufacturer/{id}")
 | 
				
			||||||
 | 
						public  Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Manufacturer update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Manufacturer/getall/page")
 | 
				
			||||||
 | 
						public Page<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.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Manufacturer_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Manufacturer_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class Manufacturer_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Manufacturer_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Manufacturer_ListFilter1")
 | 
				
			||||||
 | 
						public List<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,171 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Order_estimation;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Order_estimationService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Order_estimation")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class Order_estimationController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Order_estimationService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Order_estimation")
 | 
				
			||||||
 | 
							  public Order_estimation Savedata(@RequestBody Order_estimation data) {
 | 
				
			||||||
 | 
							Order_estimation save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Order_estimation update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Order_estimation/getall/page")
 | 
				
			||||||
 | 
						public Page<Order_estimation> getall(@RequestParam(value = "page", required = false) Integer page,
 | 
				
			||||||
 | 
								@RequestParam(value = "size", required = false) Integer size) {
 | 
				
			||||||
 | 
							Pageable paging = PageRequest.of(page, size);
 | 
				
			||||||
 | 
							Page<Order_estimation> get = Service.getAllWithPagination(paging);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}	
 | 
				
			||||||
 | 
						@GetMapping("/Order_estimation")
 | 
				
			||||||
 | 
						public List<Order_estimation> getdetails() {
 | 
				
			||||||
 | 
							 List<Order_estimation> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// get all without authentication 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@GetMapping("/token/Order_estimation")
 | 
				
			||||||
 | 
						public List<Order_estimation> getallwioutsec() {
 | 
				
			||||||
 | 
							 List<Order_estimation> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@GetMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  Order_estimation  getdetailsbyId(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Order_estimation  get = Service.getdetailsbyId(id);
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					@DeleteMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
						Service.delete_by_id(id);
 | 
				
			||||||
 | 
								return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,107 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.ProductService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Product")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class ProductController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private ProductService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Product")
 | 
				
			||||||
 | 
							  public Product Savedata(@RequestBody Product data) {
 | 
				
			||||||
 | 
							Product save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Product/{id}")
 | 
				
			||||||
 | 
						public  Product update(@RequestBody Product data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Product update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Product/getall/page")
 | 
				
			||||||
 | 
						public Page<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.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Product_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Product_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class Product_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Product_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Product_ListFilter1")
 | 
				
			||||||
 | 
						public List<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,107 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.TypeService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Type")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class TypeController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private TypeService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Type")
 | 
				
			||||||
 | 
							  public Type Savedata(@RequestBody Type data) {
 | 
				
			||||||
 | 
							Type save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  Type update(@RequestBody Type data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Type update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Type/getall/page")
 | 
				
			||||||
 | 
						public Page<Type> getall(@RequestParam(value = "page", required = false) Integer page,
 | 
				
			||||||
 | 
								@RequestParam(value = "size", required = false) Integer size) {
 | 
				
			||||||
 | 
							Pageable paging = PageRequest.of(page, size);
 | 
				
			||||||
 | 
							Page<Type> get = Service.getAllWithPagination(paging);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}	
 | 
				
			||||||
 | 
						@GetMapping("/Type")
 | 
				
			||||||
 | 
						public List<Type> getdetails() {
 | 
				
			||||||
 | 
							 List<Type> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// get all without authentication 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@GetMapping("/token/Type")
 | 
				
			||||||
 | 
						public List<Type> getallwioutsec() {
 | 
				
			||||||
 | 
							 List<Type> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@GetMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  Type  getdetailsbyId(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Type  get = Service.getdetailsbyId(id);
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					@DeleteMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
						Service.delete_by_id(id);
 | 
				
			||||||
 | 
								return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Type_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/Type_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class Type_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Type_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Type_ListFilter1")
 | 
				
			||||||
 | 
						public List<Type_ListFilter1> getlist() {
 | 
				
			||||||
 | 
							 List<Type_ListFilter1> get = Service.getlistbuilder();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
							@GetMapping("/Type_ListFilter11/{item}")
 | 
				
			||||||
 | 
						public List<Type_ListFilter1> getlistwithparam(  @PathVariable String item) {
 | 
				
			||||||
 | 
							 List<Type_ListFilter1> get = Service.getlistbuilderparam(  item);		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,99 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.ManufacturerService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Manufacturer")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_ManufacturerController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private ManufacturerService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Manufacturer")
 | 
				
			||||||
 | 
							  public Manufacturer Savedata(@RequestBody Manufacturer data) {
 | 
				
			||||||
 | 
							Manufacturer save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Manufacturer/{id}")
 | 
				
			||||||
 | 
						public  Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Manufacturer update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Manufacturer/getall/page")
 | 
				
			||||||
 | 
						public Page<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.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Manufacturer_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Manufacturer_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_Manufacturer_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Manufacturer_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Manufacturer_ListFilter1")
 | 
				
			||||||
 | 
						public List<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,171 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Order_estimation;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Order_estimationService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Order_estimation")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_Order_estimationController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Order_estimationService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Order_estimation")
 | 
				
			||||||
 | 
							  public Order_estimation Savedata(@RequestBody Order_estimation data) {
 | 
				
			||||||
 | 
							Order_estimation save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Order_estimation update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Order_estimation/getall/page")
 | 
				
			||||||
 | 
						public Page<Order_estimation> getall(@RequestParam(value = "page", required = false) Integer page,
 | 
				
			||||||
 | 
								@RequestParam(value = "size", required = false) Integer size) {
 | 
				
			||||||
 | 
							Pageable paging = PageRequest.of(page, size);
 | 
				
			||||||
 | 
							Page<Order_estimation> get = Service.getAllWithPagination(paging);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}	
 | 
				
			||||||
 | 
						@GetMapping("/Order_estimation")
 | 
				
			||||||
 | 
						public List<Order_estimation> getdetails() {
 | 
				
			||||||
 | 
							 List<Order_estimation> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// get all without authentication 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@GetMapping("/token/Order_estimation")
 | 
				
			||||||
 | 
						public List<Order_estimation> getallwioutsec() {
 | 
				
			||||||
 | 
							 List<Order_estimation> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@GetMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  Order_estimation  getdetailsbyId(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Order_estimation  get = Service.getdetailsbyId(id);
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					@DeleteMapping("/Order_estimation/{id}")
 | 
				
			||||||
 | 
						public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
						Service.delete_by_id(id);
 | 
				
			||||||
 | 
								return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,107 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.ProductService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Product")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_ProductController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private ProductService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Product")
 | 
				
			||||||
 | 
							  public Product Savedata(@RequestBody Product data) {
 | 
				
			||||||
 | 
							Product save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Product/{id}")
 | 
				
			||||||
 | 
						public  Product update(@RequestBody Product data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Product update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Product/getall/page")
 | 
				
			||||||
 | 
						public Page<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.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Product_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Product_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_Product_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Product_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Product_ListFilter1")
 | 
				
			||||||
 | 
						public List<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,107 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.JsonMappingException;
 | 
				
			||||||
 | 
					import com.realnet.config.EmailService;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.*;
 | 
				
			||||||
 | 
					import com.realnet.fnd.response.EntityResponse;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.TypeService ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Type")
 | 
				
			||||||
 | 
					 @CrossOrigin("*") 
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_TypeController {
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private TypeService Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Value("${projectPath}")
 | 
				
			||||||
 | 
						private String projectPath;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@PostMapping("/Type")
 | 
				
			||||||
 | 
							  public Type Savedata(@RequestBody Type data) {
 | 
				
			||||||
 | 
							Type save = Service.Savedata(data)	;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							System.out.println("data saved..." + save);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 return save;
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
 | 
					@PutMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  Type update(@RequestBody Type data,@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Type update = Service.update(data,id);
 | 
				
			||||||
 | 
							System.out.println("data update..." + update);
 | 
				
			||||||
 | 
							return update;
 | 
				
			||||||
 | 
						}	 
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						@GetMapping("/Type/getall/page")
 | 
				
			||||||
 | 
						public Page<Type> getall(@RequestParam(value = "page", required = false) Integer page,
 | 
				
			||||||
 | 
								@RequestParam(value = "size", required = false) Integer size) {
 | 
				
			||||||
 | 
							Pageable paging = PageRequest.of(page, size);
 | 
				
			||||||
 | 
							Page<Type> get = Service.getAllWithPagination(paging);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}	
 | 
				
			||||||
 | 
						@GetMapping("/Type")
 | 
				
			||||||
 | 
						public List<Type> getdetails() {
 | 
				
			||||||
 | 
							 List<Type> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// get all without authentication 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@GetMapping("/token/Type")
 | 
				
			||||||
 | 
						public List<Type> getallwioutsec() {
 | 
				
			||||||
 | 
							 List<Type> get = Service.getdetails();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					@GetMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  Type  getdetailsbyId(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
							Type  get = Service.getdetailsbyId(id);
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					@DeleteMapping("/Type/{id}")
 | 
				
			||||||
 | 
						public  ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
 | 
				
			||||||
 | 
						Service.delete_by_id(id);
 | 
				
			||||||
 | 
								return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Controllers;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					 import org.springframework.web.bind.annotation.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type_ListFilter1;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.Type_ListFilter1Service ;
 | 
				
			||||||
 | 
					@RequestMapping(value = "/token/Type_ListFilter1")
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					public class tokenFree_Type_ListFilter1Controller {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private Type_ListFilter1Service Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@GetMapping("/Type_ListFilter1")
 | 
				
			||||||
 | 
						public List<Type_ListFilter1> getlist() {
 | 
				
			||||||
 | 
							 List<Type_ListFilter1> get = Service.getlistbuilder();		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
							@GetMapping("/Type_ListFilter11/{item}")
 | 
				
			||||||
 | 
						public List<Type_ListFilter1> getlistwithparam(  @PathVariable String item) {
 | 
				
			||||||
 | 
							 List<Type_ListFilter1> get = Service.getlistbuilderparam(  item);		
 | 
				
			||||||
 | 
							return get;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,33 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					import com.realnet.WhoColumn.Entity.Extension; 
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Entity 
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Manufacturer extends Extension { 
 | 
				
			||||||
 | 
					 /**
 | 
				
			||||||
 | 
						 * 
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Id
 | 
				
			||||||
 | 
					 @GeneratedValue(strategy = GenerationType.IDENTITY)
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  manufacture;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Column(length = 2000)
 | 
				
			||||||
 | 
					private String description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private boolean active;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Manufacturer_ListFilter1 { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private String manufacture;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,132 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					import com.realnet.WhoColumn.Entity.Extension; 
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Entity 
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Order_estimation extends Extension { 
 | 
				
			||||||
 | 
					 /**
 | 
				
			||||||
 | 
						 * 
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Id
 | 
				
			||||||
 | 
					 @GeneratedValue(strategy = GenerationType.IDENTITY)
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  customer_name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Column(length = 2000)
 | 
				
			||||||
 | 
					private String contact_person;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private String phone_number;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Column(length = 2000)
 | 
				
			||||||
 | 
					private String customer_address;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String deployment_type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean ups_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean active_energy;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean water_management__stp_etp;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean dg_monitoring___with_fuel;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean dg_monitoring___without_fuel;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean apfc_panel_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean busbar_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean lt_panel_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean ht_panel_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean compressed_air__gas_monotoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean compress_air___lpg_o2_n2_co2;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean water_management__water_quality;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					private boolean water_management___water_monitoring;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String manufacturer;
 | 
				
			||||||
 | 
					private String manufacturername;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String product;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private int price;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private int quantity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String total;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					import com.realnet.WhoColumn.Entity.Extension; 
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Entity 
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Product extends Extension { 
 | 
				
			||||||
 | 
					 /**
 | 
				
			||||||
 | 
						 * 
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Id
 | 
				
			||||||
 | 
					 @GeneratedValue(strategy = GenerationType.IDENTITY)
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  product;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Column(length = 2000)
 | 
				
			||||||
 | 
					private String description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private boolean active;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Product_ListFilter1 { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private String product;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					import com.realnet.WhoColumn.Entity.Extension; 
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Entity 
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Type extends Extension { 
 | 
				
			||||||
 | 
					 /**
 | 
				
			||||||
 | 
						 * 
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Id
 | 
				
			||||||
 | 
					 @GeneratedValue(strategy = GenerationType.IDENTITY)
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Column(length = 2000)
 | 
				
			||||||
 | 
					private String description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private boolean active;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private String  manufacturer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Entity;
 | 
				
			||||||
 | 
					 import lombok.*;
 | 
				
			||||||
 | 
					 import javax.persistence.*;
 | 
				
			||||||
 | 
					 import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					 import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 @Data
 | 
				
			||||||
 | 
					 public class    Type_ListFilter1 { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private Integer id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private String type;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.JpaRepository;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.Query;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Repository; 
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Repository
 | 
				
			||||||
 | 
					public interface  ManufacturerRepository  extends  JpaRepository<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,48 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.JpaRepository;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.Query;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Repository; 
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Order_estimation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Repository
 | 
				
			||||||
 | 
					public interface  Order_estimationRepository  extends  JpaRepository<Order_estimation, Integer>  { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Query(value = "select * from order_estimation where  created_by=?1", nativeQuery = true)
 | 
				
			||||||
 | 
						List<Order_estimation> findAll(Long creayedBy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Query(value = "select * from order_estimation where  created_by=?1", nativeQuery = true)
 | 
				
			||||||
 | 
						Page<Order_estimation> findAll(Pageable page, Long creayedBy);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.JpaRepository;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.Query;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Repository; 
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Repository
 | 
				
			||||||
 | 
					public interface  ProductRepository  extends  JpaRepository<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,32 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.JpaRepository;
 | 
				
			||||||
 | 
					import org.springframework.data.jpa.repository.Query;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Repository; 
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Repository
 | 
				
			||||||
 | 
					public interface  TypeRepository  extends  JpaRepository<Type, Integer>  { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Query(value = "select * from type where  created_by=?1", nativeQuery = true)
 | 
				
			||||||
 | 
						List<Type> findAll(Long creayedBy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Query(value = "select * from type where  created_by=?1", nativeQuery = true)
 | 
				
			||||||
 | 
						Page<Type> findAll(Pageable page, Long creayedBy);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.ManufacturerRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer
 | 
				
			||||||
 | 
					;import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import com.realnet.SequenceGenerator.Service.SequenceService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import com.realnet.realm.Entity.Realm;
 | 
				
			||||||
 | 
					import com.realnet.realm.Services.RealmService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class ManufacturerService {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private ManufacturerRepository Repository;
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private AppUserServiceImpl userService; 
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
						private RealmService realmService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Manufacturer Savedata(Manufacturer data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setCreatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setAccountId(getUser().getAccount().getAccount_id());
 | 
				
			||||||
 | 
					Manufacturer save = Repository.save(data);
 | 
				
			||||||
 | 
									return save;	
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						public Page<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.setManufacture(data.getManufacture());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setDescription(data.getDescription());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setActive (data.isActive());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final Manufacturer test = Repository.save(old);
 | 
				
			||||||
 | 
							data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
					  return test;} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public AppUser getUser() {
 | 
				
			||||||
 | 
							AppUser user = userService.getLoggedInUser();
 | 
				
			||||||
 | 
							return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}}
 | 
				
			||||||
@ -0,0 +1,51 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.ManufacturerRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer_ListFilter1;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class Manufacturer_ListFilter1Service {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private ManufacturerRepository Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Manufacturer_ListFilter1>   getlistbuilder() {
 | 
				
			||||||
 | 
						List<Manufacturer> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Manufacturer_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Manufacturer data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {{	
 | 
				
			||||||
 | 
					Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setManufacture(data.getManufacture());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Manufacturer_ListFilter1>   getlistbuilderparam( ) {
 | 
				
			||||||
 | 
						List<Manufacturer> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Manufacturer_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Manufacturer data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {{	
 | 
				
			||||||
 | 
					Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setManufacture(data.getManufacture());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,265 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.Order_estimationRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Order_estimation
 | 
				
			||||||
 | 
					;import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import com.realnet.SequenceGenerator.Service.SequenceService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import com.realnet.realm.Entity.Realm;
 | 
				
			||||||
 | 
					import com.realnet.realm.Services.RealmService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Manufacturer;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Services.ManufacturerService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class Order_estimationService {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private Order_estimationRepository Repository;
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private AppUserServiceImpl userService; 
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
						private RealmService realmService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
						private ManufacturerService manufacturerserv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Order_estimation Savedata(Order_estimation data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					if (data.getManufacturer() != null) {
 | 
				
			||||||
 | 
							try {	
 | 
				
			||||||
 | 
					  int manufacturerId = Integer.valueOf(data.getManufacturer());
 | 
				
			||||||
 | 
					Manufacturer get =  manufacturerserv.getdetailsbyId(manufacturerId);
 | 
				
			||||||
 | 
								if (get != null) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								data.setManufacturername(get.getManufacture());
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					} catch (NumberFormatException e) {
 | 
				
			||||||
 | 
									System.out.println(" manufacturerId is not integer..");
 | 
				
			||||||
 | 
									// Invalid integer string — ignore or log
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setCreatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setAccountId(getUser().getAccount().getAccount_id());
 | 
				
			||||||
 | 
					Order_estimation save = Repository.save(data);
 | 
				
			||||||
 | 
									return save;	
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						public Page<Order_estimation> getAllWithPagination(Pageable page) {
 | 
				
			||||||
 | 
							return Repository.findAll(page, getUser().getUserId());
 | 
				
			||||||
 | 
						}			
 | 
				
			||||||
 | 
					public List<Order_estimation> getdetails() {  
 | 
				
			||||||
 | 
							List<Realm> realm = realmService.findByUserId(getUser().getUserId());
 | 
				
			||||||
 | 
					List<Order_estimation> all = Repository.findAll(getUser().getUserId());
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							return all ;		}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Order_estimation getdetailsbyId(Integer id) {
 | 
				
			||||||
 | 
						return Repository.findById(id).get();
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void delete_by_id(Integer id) {
 | 
				
			||||||
 | 
					 Repository.deleteById(id);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Order_estimation update(Order_estimation data,Integer id) {
 | 
				
			||||||
 | 
						Order_estimation old = Repository.findById(id).get();
 | 
				
			||||||
 | 
					old.setCustomer_name(data.getCustomer_name());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setContact_person(data.getContact_person());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setPhone_number(data.getPhone_number());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setCustomer_address(data.getCustomer_address());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setDeployment_type(data.getDeployment_type());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setActive_energy(data.isActive_energy());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setDg_monitoring___with_fuel(data.isDg_monitoring___with_fuel());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setDg_monitoring___without_fuel(data.isDg_monitoring___without_fuel());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setUps_monitoring(data.isUps_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setWater_management__water_quality(data.isWater_management__water_quality());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setApfc_panel_monitoring(data.isApfc_panel_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setBusbar_monitoring(data.isBusbar_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setLt_panel_monitoring(data.isLt_panel_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setHt_panel_monitoring(data.isHt_panel_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setWater_management__stp_etp(data.isWater_management__stp_etp());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setCompressed_air__gas_monotoring(data.isCompressed_air__gas_monotoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setCompress_air___lpg_o2_n2_co2(data.isCompress_air___lpg_o2_n2_co2());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					old.setWater_management___water_monitoring(data.isWater_management___water_monitoring());
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setManufacturer(data.getManufacturer());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setType(data.getType());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setProduct(data.getProduct());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setPrice(data.getPrice());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setQuantity(data.getQuantity());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setTotal(data.getTotal());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final Order_estimation test = Repository.save(old);
 | 
				
			||||||
 | 
							data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
					  return test;} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public AppUser getUser() {
 | 
				
			||||||
 | 
							AppUser user = userService.getLoggedInUser();
 | 
				
			||||||
 | 
							return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}}
 | 
				
			||||||
@ -0,0 +1,103 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.ProductRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product
 | 
				
			||||||
 | 
					;import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import com.realnet.SequenceGenerator.Service.SequenceService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import com.realnet.realm.Entity.Realm;
 | 
				
			||||||
 | 
					import com.realnet.realm.Services.RealmService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class ProductService {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private ProductRepository Repository;
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private AppUserServiceImpl userService; 
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
						private RealmService realmService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Product Savedata(Product data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setCreatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setAccountId(getUser().getAccount().getAccount_id());
 | 
				
			||||||
 | 
					Product save = Repository.save(data);
 | 
				
			||||||
 | 
									return save;	
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						public Page<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(data.getProduct());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setDescription(data.getDescription());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setActive (data.isActive());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setType(data.getType());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final Product test = Repository.save(old);
 | 
				
			||||||
 | 
							data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
					  return test;} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public AppUser getUser() {
 | 
				
			||||||
 | 
							AppUser user = userService.getLoggedInUser();
 | 
				
			||||||
 | 
							return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}}
 | 
				
			||||||
@ -0,0 +1,57 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.ProductRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Product_ListFilter1;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class Product_ListFilter1Service {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private ProductRepository Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Product_ListFilter1>   getlistbuilder() {
 | 
				
			||||||
 | 
						List<Product> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Product_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Product data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {String Type = data.getType();
 | 
				
			||||||
 | 
					 System.out.println(Type + "\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if ("item".equals(Type)){	
 | 
				
			||||||
 | 
					Product_ListFilter1 dummy = new Product_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setProduct(data.getProduct());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Product_ListFilter1>   getlistbuilderparam(  String item) {
 | 
				
			||||||
 | 
						List<Product> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Product_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Product data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {String Type = data.getType();
 | 
				
			||||||
 | 
					 System.out.println(Type + "\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (item.equals(Type)){	
 | 
				
			||||||
 | 
					Product_ListFilter1 dummy = new Product_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setProduct(data.getProduct());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,103 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.TypeRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type
 | 
				
			||||||
 | 
					;import java.util.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
					import com.realnet.SequenceGenerator.Service.SequenceService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Page;
 | 
				
			||||||
 | 
					import com.realnet.realm.Entity.Realm;
 | 
				
			||||||
 | 
					import com.realnet.realm.Services.RealmService;
 | 
				
			||||||
 | 
					import org.springframework.data.domain.Pageable;
 | 
				
			||||||
 | 
					import org.springframework.http.*;
 | 
				
			||||||
 | 
					import com.realnet.users.service1.AppUserServiceImpl;
 | 
				
			||||||
 | 
					import com.realnet.users.entity1.AppUser;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class TypeService {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private TypeRepository Repository;
 | 
				
			||||||
 | 
						@Autowired
 | 
				
			||||||
 | 
						private AppUserServiceImpl userService; 
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
						private RealmService realmService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Type Savedata(Type data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setCreatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
							data.setAccountId(getUser().getAccount().getAccount_id());
 | 
				
			||||||
 | 
					Type save = Repository.save(data);
 | 
				
			||||||
 | 
									return save;	
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//	get all with pagination
 | 
				
			||||||
 | 
						public Page<Type> getAllWithPagination(Pageable page) {
 | 
				
			||||||
 | 
							return Repository.findAll(page, getUser().getUserId());
 | 
				
			||||||
 | 
						}			
 | 
				
			||||||
 | 
					public List<Type> getdetails() {  
 | 
				
			||||||
 | 
							List<Realm> realm = realmService.findByUserId(getUser().getUserId());
 | 
				
			||||||
 | 
					List<Type> all = Repository.findAll(getUser().getUserId());
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							return all ;		}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Type getdetailsbyId(Integer id) {
 | 
				
			||||||
 | 
						return Repository.findById(id).get();
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void delete_by_id(Integer id) {
 | 
				
			||||||
 | 
					 Repository.deleteById(id);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public Type update(Type data,Integer id) {
 | 
				
			||||||
 | 
						Type old = Repository.findById(id).get();
 | 
				
			||||||
 | 
					old.setType(data.getType());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setDescription(data.getDescription());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setActive (data.isActive());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					old.setManufacturer(data.getManufacturer());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final Type test = Repository.save(old);
 | 
				
			||||||
 | 
							data.setUpdatedBy(getUser().getUserId());
 | 
				
			||||||
 | 
					  return test;} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public AppUser getUser() {
 | 
				
			||||||
 | 
							AppUser user = userService.getLoggedInUser();
 | 
				
			||||||
 | 
							return user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}}
 | 
				
			||||||
@ -0,0 +1,57 @@
 | 
				
			|||||||
 | 
					package com.realnet.order_estimation.Services;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Repository.TypeRepository;
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.realnet.order_estimation.Entity.Type_ListFilter1;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
 | 
						import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					 public class Type_ListFilter1Service {
 | 
				
			||||||
 | 
					@Autowired
 | 
				
			||||||
 | 
					private TypeRepository Repository;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Type_ListFilter1>   getlistbuilder() {
 | 
				
			||||||
 | 
						List<Type> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Type_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Type data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {String Manufacturer = data.getManufacturer();
 | 
				
			||||||
 | 
					 System.out.println(Manufacturer + "\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if ("item".equals(Manufacturer)){	
 | 
				
			||||||
 | 
					Type_ListFilter1 dummy = new Type_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setType(data.getType());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 public   List<Type_ListFilter1>   getlistbuilderparam(  String item) {
 | 
				
			||||||
 | 
						List<Type> list= Repository.findAll();
 | 
				
			||||||
 | 
							ArrayList<Type_ListFilter1> l = new ArrayList<>();
 | 
				
			||||||
 | 
							for (Type data : list) {
 | 
				
			||||||
 | 
					boolean isactive = data.isActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (isactive) {String Manufacturer = data.getManufacturer();
 | 
				
			||||||
 | 
					 System.out.println(Manufacturer + "\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (item.equals(Manufacturer)){	
 | 
				
			||||||
 | 
					Type_ListFilter1 dummy = new Type_ListFilter1();
 | 
				
			||||||
 | 
								dummy.setId(data.getId());
 | 
				
			||||||
 | 
					  dummy.setType(data.getType());
 | 
				
			||||||
 | 
						l.add(dummy);
 | 
				
			||||||
 | 
					}} 
 | 
				
			||||||
 | 
					} 		
 | 
				
			||||||
 | 
					return l;}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										8
									
								
								orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								orderestimation02-odb-d/authsec_mysql/mysql/wf_table/wf_table.sql
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					CREATE TABLE odb.Manufacturer(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), manufacture VARCHAR(400),  PRIMARY KEY (id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE TABLE odb.Type(id BIGINT NOT NULL AUTO_INCREMENT, type VARCHAR(400), active VARCHAR(400), description VARCHAR(400), manufacturer VARCHAR(400),  PRIMARY KEY (id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE TABLE odb.Product(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), type VARCHAR(400), description VARCHAR(400), product VARCHAR(400),  PRIMARY KEY (id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE TABLE odb.Order_estimation(id BIGINT NOT NULL AUTO_INCREMENT, dg_monitoring_-_without_fuel bit(1), lt_panel_monitoring bit(1), customer_name VARCHAR(400), active_energy bit(1), ht_panel_monitoring bit(1), water_management_-_water_monitoring bit(1), product VARCHAR(400), quantity int, phone_number VARCHAR(400), compressed_air_-gas_monotoring_ bit(1), contact_person VARCHAR(400), ups_monitoring bit(1), water_management_-stp/etp bit(1), type VARCHAR(400), apfc_panel_monitoring__ bit(1), price int, busbar_monitoring bit(1), compress_air_-_lpg/o2/n2/co2 bit(1), total VARCHAR(400), manufacturer int, customer_address VARCHAR(400), deployment_type VARCHAR(400), dg_monitoring_-_with_fuel bit(1), water_management-_water_quality bit(1),  PRIMARY KEY (id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2,14 +2,14 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export const LoginEnvironment = {
 | 
					export const LoginEnvironment = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        "templateNo": "<templateNo>",
 | 
					        "templateNo": "Template 1",
 | 
				
			||||||
        "loginHeading": "<loginHeading>",
 | 
					        "loginHeading": "Welcome to",
 | 
				
			||||||
        "loginHeading2": "<loginHeading2>",
 | 
					        "loginHeading2": "io8.dev",
 | 
				
			||||||
        "isSignup": "<isSignup>",
 | 
					        "isSignup": "true",
 | 
				
			||||||
        "loginSignup": "<loginSignup> ",
 | 
					        "loginSignup": "Use your ID to sign in OR  ",
 | 
				
			||||||
        "loginSignup2": "<loginSignup2>",
 | 
					        "loginSignup2": "create one now",
 | 
				
			||||||
        "loginForgotpass": "<loginForgotpass>",
 | 
					        "loginForgotpass": "FORGOT PASSWORD?",
 | 
				
			||||||
        "loginImage": "<loginImage>",
 | 
					        "loginImage": "[]",
 | 
				
			||||||
        "loginImageURL": "<loginImageURL>"
 | 
					        "loginImageURL": "null"
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,376 @@
 | 
				
			|||||||
 | 
					<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]="'manufacture'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Manufacture
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
 | 
				
			||||||
 | 
											    </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.manufacture }}</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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-cell>{{user.active }}</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>Manufacture</label>
 | 
				
			||||||
 | 
						        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.manufacture" name="manufacture" />
 | 
				
			||||||
 | 
						      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">               
 | 
				
			||||||
 | 
					<label> Description</label>
 | 
				
			||||||
 | 
						              <textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						           </div> 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12"> 
 | 
				
			||||||
 | 
					<label> Active</label> 
 | 
				
			||||||
 | 
					<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </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>  Manufacture</label>
 | 
				
			||||||
 | 
					 <input class="clr-input"  type="text"  formControlName="manufacture" />       
 | 
				
			||||||
 | 
					 </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">             
 | 
				
			||||||
 | 
					 <label>  Description</label>             
 | 
				
			||||||
 | 
					 <textarea cols="10" rows="2" formControlName="description" placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">            
 | 
				
			||||||
 | 
					 <label> Active</label>            
 | 
				
			||||||
 | 
					  <input type="checkbox" formControlName="active" clrToggle/>            </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,270 @@
 | 
				
			|||||||
 | 
					import { Component, OnInit } from '@angular/core';
 | 
				
			||||||
 | 
					import { ToastrService } from 'ngx-toastr';
 | 
				
			||||||
 | 
					import { AlertService } from 'src/app/services/alert.service';
 | 
				
			||||||
 | 
					import { Manufacturerservice} from './Manufacturer.service';
 | 
				
			||||||
 | 
					import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
 | 
				
			||||||
 | 
					import { ExtensionService } from 'src/app/services/fnd/extension.service';
 | 
				
			||||||
 | 
					import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; 
 | 
				
			||||||
 | 
					import { Manufacturercardvariable } from './Manufacturer_cardvariable';
 | 
				
			||||||
 | 
					import { UserInfoService } from 'src/app/services/user-info.service';
 | 
				
			||||||
 | 
					declare var JsBarcode: any; 
 | 
				
			||||||
 | 
					@Component({
 | 
				
			||||||
 | 
					  selector: 'app-Manufacturer',
 | 
				
			||||||
 | 
					  templateUrl: './Manufacturer.component.html',
 | 
				
			||||||
 | 
					  styleUrls: ['./Manufacturer.component.scss']
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class ManufacturerComponent implements OnInit {
 | 
				
			||||||
 | 
					  cardButton = Manufacturercardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodeldata = Manufacturercardvariable.cardmodeldata;
 | 
				
			||||||
 | 
					  public dashboardArray: DashboardContentModel2[];
 | 
				
			||||||
 | 
					  isCardview = Manufacturercardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodal;  changeView(){
 | 
				
			||||||
 | 
					  this.isCardview = !this.isCardview;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    beforeText(fieldtext: string): string { // Extract the text before the first '<'
 | 
				
			||||||
 | 
					    const index = fieldtext.indexOf('<');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  afterText(fieldtext: string): string { // Extract the text after the last '>'
 | 
				
			||||||
 | 
					    const index = fieldtext.lastIndexOf('>');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(index + 1) : '';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  transform(fieldtext: string): string {
 | 
				
			||||||
 | 
					    const match = fieldtext.match(/<([^>]*)>/);
 | 
				
			||||||
 | 
					    return match ? match[1] : ''; // Extract the text between '<' and '>'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 userrole;
 | 
				
			||||||
 | 
					  rowSelected :any= {};
 | 
				
			||||||
 | 
					  modaldelete=false;
 | 
				
			||||||
 | 
					  modalEdit=false;
 | 
				
			||||||
 | 
					  modalAdd= false;
 | 
				
			||||||
 | 
					  public entryForm: FormGroup;
 | 
				
			||||||
 | 
					  loading = false;
 | 
				
			||||||
 | 
					  product;
 | 
				
			||||||
 | 
					  modalOpenedforNewLine = false;
 | 
				
			||||||
 | 
					  newLine:any;
 | 
				
			||||||
 | 
					 additionalFieldsFromBackend: any[] = [];
 | 
				
			||||||
 | 
					  formcode = 'Manufacturer_formCode'
 | 
				
			||||||
 | 
					tableName = 'Manufacturer';  checkFormCode; selected: any[] = []; constructor(
 | 
				
			||||||
 | 
					    private extensionService: ExtensionService,
 | 
				
			||||||
 | 
					private userInfoService:UserInfoService,
 | 
				
			||||||
 | 
					    private mainService:Manufacturerservice,
 | 
				
			||||||
 | 
					    private alertService: AlertService,
 | 
				
			||||||
 | 
					    private toastr: ToastrService,
 | 
				
			||||||
 | 
					    private _fb: FormBuilder,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					// component button 
 | 
				
			||||||
 | 
					  ngOnInit(): void {
 | 
				
			||||||
 | 
					    if(this.cardmodeldata !== ''){
 | 
				
			||||||
 | 
					     this.cardmodal = JSON.parse(this.cardmodeldata);
 | 
				
			||||||
 | 
					    this.dashboardArray = this.cardmodal.dashboard.slice();
 | 
				
			||||||
 | 
					    console.log(this.dashboardArray)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    this.userrole=this.userInfoService.getRoles();
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					    this.entryForm = this._fb.group({
 | 
				
			||||||
 | 
					manufacture : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					description : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					active : [true],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }); // component_button200
 | 
				
			||||||
 | 
					 // form code start
 | 
				
			||||||
 | 
					    this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      const jsonArray = data.map((str) => JSON.parse(str));
 | 
				
			||||||
 | 
					      this.additionalFieldsFromBackend = jsonArray;
 | 
				
			||||||
 | 
					      this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Manufacturer_formCode");
 | 
				
			||||||
 | 
					      console.log(this.checkFormCode);
 | 
				
			||||||
 | 
					      console.log(this.additionalFieldsFromBackend);
 | 
				
			||||||
 | 
					      if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
 | 
				
			||||||
 | 
					        this.additionalFieldsFromBackend.forEach(field => {
 | 
				
			||||||
 | 
					          if (field.formCode === this.formcode) {
 | 
				
			||||||
 | 
					            if (!this.entryForm.contains(field.extValue)) {
 | 
				
			||||||
 | 
					              // Add the control only if it doesn't exist in the form
 | 
				
			||||||
 | 
					              this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					    // form code end 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 error; 
 | 
				
			||||||
 | 
					  getData() {
 | 
				
			||||||
 | 
					    this.mainService.getAll().subscribe((data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      this.product = data;
 | 
				
			||||||
 | 
					 if(this.product.length==0){
 | 
				
			||||||
 | 
					        this.error="No Data Available"
 | 
				
			||||||
 | 
					     }   
 | 
				
			||||||
 | 
					    },(error) => {
 | 
				
			||||||
 | 
					      console.log(error);
 | 
				
			||||||
 | 
					      if(error){
 | 
				
			||||||
 | 
					       this.error="Server Error";
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  onEdit(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.modalEdit = true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					   onDelete(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					     this.modaldelete=true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  delete(id)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    this.modaldelete = false;
 | 
				
			||||||
 | 
					    console.log("in delete  "+id);
 | 
				
			||||||
 | 
					    this.mainService.delete(id).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        this.ngOnInit();
 | 
				
			||||||
 | 
					  if (data) {				      this.toastr.success('Deleted successfully');      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    onUpdate(id) {
 | 
				
			||||||
 | 
					    this.modalEdit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //console.log("in update");
 | 
				
			||||||
 | 
					    console.log("id  " + id);
 | 
				
			||||||
 | 
					    console.log(this.rowSelected);
 | 
				
			||||||
 | 
					    //console.log("out update");
 | 
				
			||||||
 | 
					    this.mainService.update(id, this.rowSelected).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Update Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("update Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  } 
 | 
				
			||||||
 | 
					onCreate() {
 | 
				
			||||||
 | 
					     this.modalAdd=false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  this.mainService.create(this.entryForm.value).subscribe(
 | 
				
			||||||
 | 
					    (data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					  if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Added Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("Added Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  goToAdd(row) {
 | 
				
			||||||
 | 
					this.modalAdd = true; this.submitted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 submitted = false;
 | 
				
			||||||
 | 
					onSubmit() {
 | 
				
			||||||
 | 
					  console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					 this.submitted = true;
 | 
				
			||||||
 | 
					  if (this.entryForm.invalid) {
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					  }this.onCreate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rsModaldescription = false;   
 | 
				
			||||||
 | 
					goToReplaceStringdescription(row){
 | 
				
			||||||
 | 
					this.rowSelected = row;     this.rsModaldescription  =true;   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// updateaction
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -0,0 +1,39 @@
 | 
				
			|||||||
 | 
					import { Injectable } from '@angular/core';
 | 
				
			||||||
 | 
					import { Observable } from "rxjs";
 | 
				
			||||||
 | 
					import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
 | 
				
			||||||
 | 
					import { ApiRequestService } from "src/app/services/api/api-request.service";
 | 
				
			||||||
 | 
					import { environment } from 'src/environments/environment';
 | 
				
			||||||
 | 
					@Injectable({
 | 
				
			||||||
 | 
					  providedIn: 'root'
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class Manufacturerservice{
 | 
				
			||||||
 | 
					  private baseURL = "Manufacturer/Manufacturer" ;  constructor(
 | 
				
			||||||
 | 
					    private http: HttpClient,
 | 
				
			||||||
 | 
					    private apiRequest: ApiRequestService,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					  getAll(page?: number, size?: number): Observable<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": ``
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
										
											
												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;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,750 @@
 | 
				
			|||||||
 | 
					import { Component, OnInit } from '@angular/core';
 | 
				
			||||||
 | 
					import { ToastrService } from 'ngx-toastr';
 | 
				
			||||||
 | 
					import { AlertService } from 'src/app/services/alert.service';
 | 
				
			||||||
 | 
					import { Order_estimationservice} from './Order_estimation.service';
 | 
				
			||||||
 | 
					import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
 | 
				
			||||||
 | 
					import { ExtensionService } from 'src/app/services/fnd/extension.service';
 | 
				
			||||||
 | 
					import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; 
 | 
				
			||||||
 | 
					import { Order_estimationcardvariable } from './Order_estimation_cardvariable';
 | 
				
			||||||
 | 
					import { UserInfoService } from 'src/app/services/user-info.service';
 | 
				
			||||||
 | 
					declare var JsBarcode: any; 
 | 
				
			||||||
 | 
					@Component({
 | 
				
			||||||
 | 
					  selector: 'app-Order_estimation',
 | 
				
			||||||
 | 
					  templateUrl: './Order_estimation.component.html',
 | 
				
			||||||
 | 
					  styleUrls: ['./Order_estimation.component.scss']
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class Order_estimationComponent implements OnInit {
 | 
				
			||||||
 | 
					  cardButton = Order_estimationcardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodeldata = Order_estimationcardvariable.cardmodeldata;
 | 
				
			||||||
 | 
					  public dashboardArray: DashboardContentModel2[];
 | 
				
			||||||
 | 
					  isCardview = Order_estimationcardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodal;  changeView(){
 | 
				
			||||||
 | 
					  this.isCardview = !this.isCardview;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    beforeText(fieldtext: string): string { // Extract the text before the first '<'
 | 
				
			||||||
 | 
					    const index = fieldtext.indexOf('<');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  afterText(fieldtext: string): string { // Extract the text after the last '>'
 | 
				
			||||||
 | 
					    const index = fieldtext.lastIndexOf('>');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(index + 1) : '';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  transform(fieldtext: string): string {
 | 
				
			||||||
 | 
					    const match = fieldtext.match(/<([^>]*)>/);
 | 
				
			||||||
 | 
					    return match ? match[1] : ''; // Extract the text between '<' and '>'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 userrole;
 | 
				
			||||||
 | 
					  rowSelected :any= {};
 | 
				
			||||||
 | 
					  modaldelete=false;
 | 
				
			||||||
 | 
					  modalEdit=false;
 | 
				
			||||||
 | 
					  modalAdd= false;
 | 
				
			||||||
 | 
					  public entryForm: FormGroup;
 | 
				
			||||||
 | 
					  loading = false;
 | 
				
			||||||
 | 
					  product;
 | 
				
			||||||
 | 
					  modalOpenedforNewLine = false;
 | 
				
			||||||
 | 
					  newLine:any;
 | 
				
			||||||
 | 
					 additionalFieldsFromBackend: any[] = [];
 | 
				
			||||||
 | 
					  formcode = 'Order_estimation_formCode'
 | 
				
			||||||
 | 
					tableName = 'Order_estimation';  checkFormCode; selected: any[] = []; constructor(
 | 
				
			||||||
 | 
					    private extensionService: ExtensionService,
 | 
				
			||||||
 | 
					private userInfoService:UserInfoService,
 | 
				
			||||||
 | 
					    private mainService:Order_estimationservice,
 | 
				
			||||||
 | 
					    private alertService: AlertService,
 | 
				
			||||||
 | 
					    private toastr: ToastrService,
 | 
				
			||||||
 | 
					    private _fb: FormBuilder,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					// component button 
 | 
				
			||||||
 | 
					  ngOnInit(): void {
 | 
				
			||||||
 | 
					    if(this.cardmodeldata !== ''){
 | 
				
			||||||
 | 
					     this.cardmodal = JSON.parse(this.cardmodeldata);
 | 
				
			||||||
 | 
					    this.dashboardArray = this.cardmodal.dashboard.slice();
 | 
				
			||||||
 | 
					    console.log(this.dashboardArray)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    this.userrole=this.userInfoService.getRoles();
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					    this.entryForm = this._fb.group({
 | 
				
			||||||
 | 
					customer_name : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					contact_person : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					phone_number: ['+91'],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					customer_address : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					deployment_type : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					ups_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					active_energy:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					dg_monitoring___with_fuel:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					water_management__water_quality:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					dg_monitoring___without_fuel:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					apfc_panel_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					busbar_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					lt_panel_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					ht_panel_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					compressed_air__gas_monotoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					compress_air___lpg_o2_n2_co2:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					water_management___water_monitoring:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					water_management__stp_etp:[false],
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					manufacturer : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					product : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					price : [null,[Validators.required]],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					quantity : [null,[Validators.required]],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }); // component_button200
 | 
				
			||||||
 | 
					 // form code start
 | 
				
			||||||
 | 
					    this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      const jsonArray = data.map((str) => JSON.parse(str));
 | 
				
			||||||
 | 
					      this.additionalFieldsFromBackend = jsonArray;
 | 
				
			||||||
 | 
					      this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Order_estimation_formCode");
 | 
				
			||||||
 | 
					      console.log(this.checkFormCode);
 | 
				
			||||||
 | 
					      console.log(this.additionalFieldsFromBackend);
 | 
				
			||||||
 | 
					      if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
 | 
				
			||||||
 | 
					        this.additionalFieldsFromBackend.forEach(field => {
 | 
				
			||||||
 | 
					          if (field.formCode === this.formcode) {
 | 
				
			||||||
 | 
					            if (!this.entryForm.contains(field.extValue)) {
 | 
				
			||||||
 | 
					              // Add the control only if it doesn't exist in the form
 | 
				
			||||||
 | 
					              this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					    // form code end 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					this.getallmanufacturer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Listen for country changes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    this.entryForm.get('manufacturer')?.valueChanges.subscribe((item) => {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (item) {
 | 
				
			||||||
 | 
					        this.dependet2type(item);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.typedependentData = [];
 | 
				
			||||||
 | 
					        this.entryForm.get('type')?.setValue(null); // clear state
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Listen for country changes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    this.entryForm.get('type')?.valueChanges.subscribe((item) => {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (item) {
 | 
				
			||||||
 | 
					        this.dependet2product(item);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.productdependentData = [];
 | 
				
			||||||
 | 
					        this.entryForm.get('product')?.setValue(null); // clear state
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 error; 
 | 
				
			||||||
 | 
					  getData() {
 | 
				
			||||||
 | 
					    this.mainService.getAll().subscribe((data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      this.product = data;
 | 
				
			||||||
 | 
					 if(this.product.length==0){
 | 
				
			||||||
 | 
					        this.error="No Data Available"
 | 
				
			||||||
 | 
					     }   
 | 
				
			||||||
 | 
					    },(error) => {
 | 
				
			||||||
 | 
					      console.log(error);
 | 
				
			||||||
 | 
					      if(error){
 | 
				
			||||||
 | 
					       this.error="Server Error";
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  onEdit(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//  Dependemt Dropdown field start
 | 
				
			||||||
 | 
					this.dependet2type(row.dependentDD);
 | 
				
			||||||
 | 
					  //  Dependemt Dropdown field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//  Dependemt Dropdown field start
 | 
				
			||||||
 | 
					this.dependet2product(row.dependentDD);
 | 
				
			||||||
 | 
					  //  Dependemt Dropdown field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//calculated field start
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
						   this.totalprice= row.price;
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
						   this.totalquantity= row.quantity;
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//calculated field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.modalEdit = true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					   onDelete(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					     this.modaldelete=true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  delete(id)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    this.modaldelete = false;
 | 
				
			||||||
 | 
					    console.log("in delete  "+id);
 | 
				
			||||||
 | 
					    this.mainService.delete(id).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        this.ngOnInit();
 | 
				
			||||||
 | 
					  if (data) {				      this.toastr.success('Deleted successfully');      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    onUpdate(id) {
 | 
				
			||||||
 | 
					    this.modalEdit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//calculated field start
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					this.rowSelected.price= this.totalprice;
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					this.rowSelected.quantity= this.totalquantity;
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					this.onInputChangetotal ();
 | 
				
			||||||
 | 
					 //calculated field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //console.log("in update");
 | 
				
			||||||
 | 
					    console.log("id  " + id);
 | 
				
			||||||
 | 
					    console.log(this.rowSelected);
 | 
				
			||||||
 | 
					    //console.log("out update");
 | 
				
			||||||
 | 
					    this.mainService.update(id, this.rowSelected).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Update Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("update Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  } 
 | 
				
			||||||
 | 
					onCreate() {
 | 
				
			||||||
 | 
					     this.modalAdd=false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//calculated field start
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					this.entryForm.value.price  = this.totalprice ;
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					this.entryForm.value.quantity  = this.totalquantity ;
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//calculated field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  this.mainService.create(this.entryForm.value).subscribe(
 | 
				
			||||||
 | 
					    (data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					  if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Added Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("Added Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  goToAdd(row) {
 | 
				
			||||||
 | 
					this.modalAdd = true; this.submitted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  //calculated field start
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  this.totalprice  = '';
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  this.totalquantity  = '';
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  this.totaltotal = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  //calculated field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 submitted = false;
 | 
				
			||||||
 | 
					onSubmit() {
 | 
				
			||||||
 | 
					  console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					 this.submitted = true;
 | 
				
			||||||
 | 
					  if (this.entryForm.invalid) {
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					  }this.onCreate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rsModalcontact_person = false;   
 | 
				
			||||||
 | 
					goToReplaceStringcontact_person(row){
 | 
				
			||||||
 | 
					this.rowSelected = row;     this.rsModalcontact_person  =true;   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					isValidPhone_number(phone: string): boolean {
 | 
				
			||||||
 | 
					  const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/;
 | 
				
			||||||
 | 
					  return phonePattern.test(phone);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rsModalcustomer_address = false;   
 | 
				
			||||||
 | 
					goToReplaceStringcustomer_address(row){
 | 
				
			||||||
 | 
					this.rowSelected = row;     this.rsModalcustomer_address  =true;   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					selectmanufacturer ;     
 | 
				
			||||||
 | 
					getallmanufacturer() {
 | 
				
			||||||
 | 
					 this.mainService.getAllmanufacturer().subscribe(data=>{
 | 
				
			||||||
 | 
					this.selectmanufacturer = data;       
 | 
				
			||||||
 | 
					console.log(data);
 | 
				
			||||||
 | 
					},(error) => {       console.log(error);     });   }							   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//  Dependemt Dropdown field start   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  typedependentData: any;    
 | 
				
			||||||
 | 
					dependet2type (item){
 | 
				
			||||||
 | 
					    this.mainService.gettypeDependent(item).subscribe( (data) => {
 | 
				
			||||||
 | 
					        console.log(data);     
 | 
				
			||||||
 | 
					    this.typedependentData = data;
 | 
				
			||||||
 | 
					  },(error) => {     console.log(error);   });
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   //  DependemtDropdown field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//  Dependemt Dropdown field start   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  productdependentData: any;    
 | 
				
			||||||
 | 
					dependet2product (item){
 | 
				
			||||||
 | 
					    this.mainService.getproductDependent(item).subscribe( (data) => {
 | 
				
			||||||
 | 
					        console.log(data);     
 | 
				
			||||||
 | 
					    this.productdependentData = data;
 | 
				
			||||||
 | 
					  },(error) => {     console.log(error);   });
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   //  DependemtDropdown field end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 // calculated field code start 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 totalprice; 
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 totalquantity; 
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  totaltotal ; 
 | 
				
			||||||
 | 
					 totalcalculateOperators = "product_list"
 | 
				
			||||||
 | 
					onInputChangetotal() {
 | 
				
			||||||
 | 
					const lastObj = 0
 | 
				
			||||||
 | 
					const lastObjstring = ''
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const price= this.totalprice|| '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						const priceValue = parseFloat(this.totalprice) || 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const quantity= this.totalquantity|| '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						const quantityValue = parseFloat(this.totalquantity) || 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (this.totalcalculateOperators =="Addition") {
 | 
				
			||||||
 | 
					 this.totaltotal = (   
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
							 priceValue +
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
							 quantityValue +
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					 lastObj).toString();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (this.totalcalculateOperators == "Subtraction") {
 | 
				
			||||||
 | 
						 this.totaltotal = (   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 priceValue   -
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 quantityValue   -
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						lastObj).toString();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (this.totalcalculateOperators =="Multiplication") {
 | 
				
			||||||
 | 
					  this.totaltotal = (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
						priceValue *
 | 
				
			||||||
 | 
							 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
						quantityValue *
 | 
				
			||||||
 | 
							 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					lastObj).toString();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (this.totalcalculateOperators =="Division") {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
						this.totaltotal = ( 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					priceValue   /
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					quantityValue   /
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					lastObj).toString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (this.totalcalculateOperators =="Concatination") {
 | 
				
			||||||
 | 
					 this.totaltotal =  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					price+ ' '+
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					quantity+ ' '+
 | 
				
			||||||
 | 
						 
 | 
				
			||||||
 | 
					 lastObjstring 
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// updateaction
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -0,0 +1,70 @@
 | 
				
			|||||||
 | 
					import { Injectable } from '@angular/core';
 | 
				
			||||||
 | 
					import { Observable } from "rxjs";
 | 
				
			||||||
 | 
					import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
 | 
				
			||||||
 | 
					import { ApiRequestService } from "src/app/services/api/api-request.service";
 | 
				
			||||||
 | 
					import { environment } from 'src/environments/environment';
 | 
				
			||||||
 | 
					@Injectable({
 | 
				
			||||||
 | 
					  providedIn: 'root'
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class Order_estimationservice{
 | 
				
			||||||
 | 
					  private baseURL = "Order_estimation/Order_estimation" ;  constructor(
 | 
				
			||||||
 | 
					    private http: HttpClient,
 | 
				
			||||||
 | 
					    private apiRequest: ApiRequestService,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					  getAll(page?: number, size?: number): Observable<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("Type_ListFilter1/Type_ListFilter11/" + field);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  getproductDependent(field: string): Observable<any> {
 | 
				
			||||||
 | 
					    return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// updateaction
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					export const Order_estimationcardvariable = {
 | 
				
			||||||
 | 
					    "cardButton": false,
 | 
				
			||||||
 | 
					    "cardmodeldata": ``
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,405 @@
 | 
				
			|||||||
 | 
					<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'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Product
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'type'"> <ng-container *clrDgHideableColumn="{hidden: false}"> 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.product }}</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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-cell>{{user.active }}</clr-dg-cell>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-cell>{{user.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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<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 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</label>
 | 
				
			||||||
 | 
						        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.product" name="product" />
 | 
				
			||||||
 | 
						      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">               
 | 
				
			||||||
 | 
					<label> Description</label>
 | 
				
			||||||
 | 
						              <textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						           </div> 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12"> 
 | 
				
			||||||
 | 
					<label> Active</label> 
 | 
				
			||||||
 | 
					<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">       
 | 
				
			||||||
 | 
					<label>Type</label>
 | 
				
			||||||
 | 
						        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.type" name="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 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</label>
 | 
				
			||||||
 | 
					 <input class="clr-input"  type="text"  formControlName="product" />       
 | 
				
			||||||
 | 
					 </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">             
 | 
				
			||||||
 | 
					 <label>  Description</label>             
 | 
				
			||||||
 | 
					 <textarea cols="10" rows="2" formControlName="description" placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">            
 | 
				
			||||||
 | 
					 <label> Active</label>            
 | 
				
			||||||
 | 
					  <input type="checkbox" formControlName="active" clrToggle/>            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">
 | 
				
			||||||
 | 
					 <label>  Type</label>
 | 
				
			||||||
 | 
					 <input class="clr-input"  type="text"  formControlName="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,294 @@
 | 
				
			|||||||
 | 
					import { Component, OnInit } from '@angular/core';
 | 
				
			||||||
 | 
					import { ToastrService } from 'ngx-toastr';
 | 
				
			||||||
 | 
					import { AlertService } from 'src/app/services/alert.service';
 | 
				
			||||||
 | 
					import { Productservice} from './Product.service';
 | 
				
			||||||
 | 
					import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
 | 
				
			||||||
 | 
					import { ExtensionService } from 'src/app/services/fnd/extension.service';
 | 
				
			||||||
 | 
					import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; 
 | 
				
			||||||
 | 
					import { Productcardvariable } from './Product_cardvariable';
 | 
				
			||||||
 | 
					import { UserInfoService } from 'src/app/services/user-info.service';
 | 
				
			||||||
 | 
					declare var JsBarcode: any; 
 | 
				
			||||||
 | 
					@Component({
 | 
				
			||||||
 | 
					  selector: 'app-Product',
 | 
				
			||||||
 | 
					  templateUrl: './Product.component.html',
 | 
				
			||||||
 | 
					  styleUrls: ['./Product.component.scss']
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class ProductComponent implements OnInit {
 | 
				
			||||||
 | 
					  cardButton = Productcardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodeldata = Productcardvariable.cardmodeldata;
 | 
				
			||||||
 | 
					  public dashboardArray: DashboardContentModel2[];
 | 
				
			||||||
 | 
					  isCardview = Productcardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodal;  changeView(){
 | 
				
			||||||
 | 
					  this.isCardview = !this.isCardview;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    beforeText(fieldtext: string): string { // Extract the text before the first '<'
 | 
				
			||||||
 | 
					    const index = fieldtext.indexOf('<');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  afterText(fieldtext: string): string { // Extract the text after the last '>'
 | 
				
			||||||
 | 
					    const index = fieldtext.lastIndexOf('>');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(index + 1) : '';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  transform(fieldtext: string): string {
 | 
				
			||||||
 | 
					    const match = fieldtext.match(/<([^>]*)>/);
 | 
				
			||||||
 | 
					    return match ? match[1] : ''; // Extract the text between '<' and '>'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 userrole;
 | 
				
			||||||
 | 
					  rowSelected :any= {};
 | 
				
			||||||
 | 
					  modaldelete=false;
 | 
				
			||||||
 | 
					  modalEdit=false;
 | 
				
			||||||
 | 
					  modalAdd= false;
 | 
				
			||||||
 | 
					  public entryForm: FormGroup;
 | 
				
			||||||
 | 
					  loading = false;
 | 
				
			||||||
 | 
					  product;
 | 
				
			||||||
 | 
					  modalOpenedforNewLine = false;
 | 
				
			||||||
 | 
					  newLine:any;
 | 
				
			||||||
 | 
					 additionalFieldsFromBackend: any[] = [];
 | 
				
			||||||
 | 
					  formcode = 'Product_formCode'
 | 
				
			||||||
 | 
					tableName = 'Product';  checkFormCode; selected: any[] = []; constructor(
 | 
				
			||||||
 | 
					    private extensionService: ExtensionService,
 | 
				
			||||||
 | 
					private userInfoService:UserInfoService,
 | 
				
			||||||
 | 
					    private mainService:Productservice,
 | 
				
			||||||
 | 
					    private alertService: AlertService,
 | 
				
			||||||
 | 
					    private toastr: ToastrService,
 | 
				
			||||||
 | 
					    private _fb: FormBuilder,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					// component button 
 | 
				
			||||||
 | 
					  ngOnInit(): void {
 | 
				
			||||||
 | 
					    if(this.cardmodeldata !== ''){
 | 
				
			||||||
 | 
					     this.cardmodal = JSON.parse(this.cardmodeldata);
 | 
				
			||||||
 | 
					    this.dashboardArray = this.cardmodal.dashboard.slice();
 | 
				
			||||||
 | 
					    console.log(this.dashboardArray)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    this.userrole=this.userInfoService.getRoles();
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					    this.entryForm = this._fb.group({
 | 
				
			||||||
 | 
					product : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					description : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					active : [true],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }); // component_button200
 | 
				
			||||||
 | 
					 // form code start
 | 
				
			||||||
 | 
					    this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      const jsonArray = data.map((str) => JSON.parse(str));
 | 
				
			||||||
 | 
					      this.additionalFieldsFromBackend = jsonArray;
 | 
				
			||||||
 | 
					      this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Product_formCode");
 | 
				
			||||||
 | 
					      console.log(this.checkFormCode);
 | 
				
			||||||
 | 
					      console.log(this.additionalFieldsFromBackend);
 | 
				
			||||||
 | 
					      if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
 | 
				
			||||||
 | 
					        this.additionalFieldsFromBackend.forEach(field => {
 | 
				
			||||||
 | 
					          if (field.formCode === this.formcode) {
 | 
				
			||||||
 | 
					            if (!this.entryForm.contains(field.extValue)) {
 | 
				
			||||||
 | 
					              // Add the control only if it doesn't exist in the form
 | 
				
			||||||
 | 
					              this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					    // form code end 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 error; 
 | 
				
			||||||
 | 
					  getData() {
 | 
				
			||||||
 | 
					    this.mainService.getAll().subscribe((data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      this.product = data;
 | 
				
			||||||
 | 
					 if(this.product.length==0){
 | 
				
			||||||
 | 
					        this.error="No Data Available"
 | 
				
			||||||
 | 
					     }   
 | 
				
			||||||
 | 
					    },(error) => {
 | 
				
			||||||
 | 
					      console.log(error);
 | 
				
			||||||
 | 
					      if(error){
 | 
				
			||||||
 | 
					       this.error="Server Error";
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  onEdit(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.modalEdit = true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					   onDelete(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					     this.modaldelete=true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  delete(id)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    this.modaldelete = false;
 | 
				
			||||||
 | 
					    console.log("in delete  "+id);
 | 
				
			||||||
 | 
					    this.mainService.delete(id).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        this.ngOnInit();
 | 
				
			||||||
 | 
					  if (data) {				      this.toastr.success('Deleted successfully');      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    onUpdate(id) {
 | 
				
			||||||
 | 
					    this.modalEdit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //console.log("in update");
 | 
				
			||||||
 | 
					    console.log("id  " + id);
 | 
				
			||||||
 | 
					    console.log(this.rowSelected);
 | 
				
			||||||
 | 
					    //console.log("out update");
 | 
				
			||||||
 | 
					    this.mainService.update(id, this.rowSelected).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Update Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("update Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  } 
 | 
				
			||||||
 | 
					onCreate() {
 | 
				
			||||||
 | 
					     this.modalAdd=false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  this.mainService.create(this.entryForm.value).subscribe(
 | 
				
			||||||
 | 
					    (data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					  if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Added Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("Added Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  goToAdd(row) {
 | 
				
			||||||
 | 
					this.modalAdd = true; this.submitted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 submitted = false;
 | 
				
			||||||
 | 
					onSubmit() {
 | 
				
			||||||
 | 
					  console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					 this.submitted = true;
 | 
				
			||||||
 | 
					  if (this.entryForm.invalid) {
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					  }this.onCreate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rsModaldescription = false;   
 | 
				
			||||||
 | 
					goToReplaceStringdescription(row){
 | 
				
			||||||
 | 
					this.rowSelected = row;     this.rsModaldescription  =true;   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// updateaction
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					import { Injectable } from '@angular/core';
 | 
				
			||||||
 | 
					import { Observable } from "rxjs";
 | 
				
			||||||
 | 
					import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
 | 
				
			||||||
 | 
					import { ApiRequestService } from "src/app/services/api/api-request.service";
 | 
				
			||||||
 | 
					import { environment } from 'src/environments/environment';
 | 
				
			||||||
 | 
					@Injectable({
 | 
				
			||||||
 | 
					  providedIn: 'root'
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class Productservice{
 | 
				
			||||||
 | 
					  private baseURL = "Product/Product" ;  constructor(
 | 
				
			||||||
 | 
					    private http: HttpClient,
 | 
				
			||||||
 | 
					    private apiRequest: ApiRequestService,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					  getAll(page?: number, size?: number): Observable<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,405 @@
 | 
				
			|||||||
 | 
					<ol class="breadcrumb breadcrumb-arrow font-trirong">
 | 
				
			||||||
 | 
					  <li><a href="javascript://"> Type</a></li>
 | 
				
			||||||
 | 
					</ol>
 | 
				
			||||||
 | 
					<div class="dg-wrapper">
 | 
				
			||||||
 | 
					  <div class="clr-row">
 | 
				
			||||||
 | 
					    <div class="clr-col-8">
 | 
				
			||||||
 | 
					      <h3>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]="'type'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Type
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
 | 
				
			||||||
 | 
											    </ng-container></clr-dg-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-column [clrDgField]="'active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
 | 
				
			||||||
 | 
											    </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 }}</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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<clr-dg-cell>{{user.active }}</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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<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 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>Type</label>
 | 
				
			||||||
 | 
						        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.type" name="type" />
 | 
				
			||||||
 | 
						      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">               
 | 
				
			||||||
 | 
					<label> Description</label>
 | 
				
			||||||
 | 
						              <textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						           </div> 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12"> 
 | 
				
			||||||
 | 
					<label> Active</label> 
 | 
				
			||||||
 | 
					<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </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 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: '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>  Type</label>
 | 
				
			||||||
 | 
					 <input class="clr-input"  type="text"  formControlName="type" />       
 | 
				
			||||||
 | 
					 </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">             
 | 
				
			||||||
 | 
					 <label>  Description</label>             
 | 
				
			||||||
 | 
					 <textarea cols="10" rows="2" formControlName="description" placeholder="Textarea">  </textarea>
 | 
				
			||||||
 | 
						            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="clr-col-sm-12">            
 | 
				
			||||||
 | 
					 <label> Active</label>            
 | 
				
			||||||
 | 
					  <input type="checkbox" formControlName="active" clrToggle/>            </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,294 @@
 | 
				
			|||||||
 | 
					import { Component, OnInit } from '@angular/core';
 | 
				
			||||||
 | 
					import { ToastrService } from 'ngx-toastr';
 | 
				
			||||||
 | 
					import { AlertService } from 'src/app/services/alert.service';
 | 
				
			||||||
 | 
					import { Typeservice} from './Type.service';
 | 
				
			||||||
 | 
					import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
 | 
				
			||||||
 | 
					import { ExtensionService } from 'src/app/services/fnd/extension.service';
 | 
				
			||||||
 | 
					import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; 
 | 
				
			||||||
 | 
					import { Typecardvariable } from './Type_cardvariable';
 | 
				
			||||||
 | 
					import { UserInfoService } from 'src/app/services/user-info.service';
 | 
				
			||||||
 | 
					declare var JsBarcode: any; 
 | 
				
			||||||
 | 
					@Component({
 | 
				
			||||||
 | 
					  selector: 'app-Type',
 | 
				
			||||||
 | 
					  templateUrl: './Type.component.html',
 | 
				
			||||||
 | 
					  styleUrls: ['./Type.component.scss']
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class TypeComponent implements OnInit {
 | 
				
			||||||
 | 
					  cardButton = Typecardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodeldata = Typecardvariable.cardmodeldata;
 | 
				
			||||||
 | 
					  public dashboardArray: DashboardContentModel2[];
 | 
				
			||||||
 | 
					  isCardview = Typecardvariable.cardButton;
 | 
				
			||||||
 | 
					  cardmodal;  changeView(){
 | 
				
			||||||
 | 
					  this.isCardview = !this.isCardview;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    beforeText(fieldtext: string): string { // Extract the text before the first '<'
 | 
				
			||||||
 | 
					    const index = fieldtext.indexOf('<');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  afterText(fieldtext: string): string { // Extract the text after the last '>'
 | 
				
			||||||
 | 
					    const index = fieldtext.lastIndexOf('>');
 | 
				
			||||||
 | 
					    return index !== -1 ? fieldtext.substring(index + 1) : '';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  transform(fieldtext: string): string {
 | 
				
			||||||
 | 
					    const match = fieldtext.match(/<([^>]*)>/);
 | 
				
			||||||
 | 
					    return match ? match[1] : ''; // Extract the text between '<' and '>'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 userrole;
 | 
				
			||||||
 | 
					  rowSelected :any= {};
 | 
				
			||||||
 | 
					  modaldelete=false;
 | 
				
			||||||
 | 
					  modalEdit=false;
 | 
				
			||||||
 | 
					  modalAdd= false;
 | 
				
			||||||
 | 
					  public entryForm: FormGroup;
 | 
				
			||||||
 | 
					  loading = false;
 | 
				
			||||||
 | 
					  product;
 | 
				
			||||||
 | 
					  modalOpenedforNewLine = false;
 | 
				
			||||||
 | 
					  newLine:any;
 | 
				
			||||||
 | 
					 additionalFieldsFromBackend: any[] = [];
 | 
				
			||||||
 | 
					  formcode = 'Type_formCode'
 | 
				
			||||||
 | 
					tableName = 'Type';  checkFormCode; selected: any[] = []; constructor(
 | 
				
			||||||
 | 
					    private extensionService: ExtensionService,
 | 
				
			||||||
 | 
					private userInfoService:UserInfoService,
 | 
				
			||||||
 | 
					    private mainService:Typeservice,
 | 
				
			||||||
 | 
					    private alertService: AlertService,
 | 
				
			||||||
 | 
					    private toastr: ToastrService,
 | 
				
			||||||
 | 
					    private _fb: FormBuilder,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					// component button 
 | 
				
			||||||
 | 
					  ngOnInit(): void {
 | 
				
			||||||
 | 
					    if(this.cardmodeldata !== ''){
 | 
				
			||||||
 | 
					     this.cardmodal = JSON.parse(this.cardmodeldata);
 | 
				
			||||||
 | 
					    this.dashboardArray = this.cardmodal.dashboard.slice();
 | 
				
			||||||
 | 
					    console.log(this.dashboardArray)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    this.userrole=this.userInfoService.getRoles();
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					    this.entryForm = this._fb.group({
 | 
				
			||||||
 | 
					type : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					description : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					active : [true],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					manufacturer : [null],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }); // component_button200
 | 
				
			||||||
 | 
					 // form code start
 | 
				
			||||||
 | 
					    this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      const jsonArray = data.map((str) => JSON.parse(str));
 | 
				
			||||||
 | 
					      this.additionalFieldsFromBackend = jsonArray;
 | 
				
			||||||
 | 
					      this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Type_formCode");
 | 
				
			||||||
 | 
					      console.log(this.checkFormCode);
 | 
				
			||||||
 | 
					      console.log(this.additionalFieldsFromBackend);
 | 
				
			||||||
 | 
					      if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
 | 
				
			||||||
 | 
					        this.additionalFieldsFromBackend.forEach(field => {
 | 
				
			||||||
 | 
					          if (field.formCode === this.formcode) {
 | 
				
			||||||
 | 
					            if (!this.entryForm.contains(field.extValue)) {
 | 
				
			||||||
 | 
					              // Add the control only if it doesn't exist in the form
 | 
				
			||||||
 | 
					              this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					    // form code end 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 error; 
 | 
				
			||||||
 | 
					  getData() {
 | 
				
			||||||
 | 
					    this.mainService.getAll().subscribe((data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					      this.product = data;
 | 
				
			||||||
 | 
					 if(this.product.length==0){
 | 
				
			||||||
 | 
					        this.error="No Data Available"
 | 
				
			||||||
 | 
					     }   
 | 
				
			||||||
 | 
					    },(error) => {
 | 
				
			||||||
 | 
					      console.log(error);
 | 
				
			||||||
 | 
					      if(error){
 | 
				
			||||||
 | 
					       this.error="Server Error";
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  onEdit(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.modalEdit = true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					   onDelete(row) {
 | 
				
			||||||
 | 
					    this.rowSelected = row;
 | 
				
			||||||
 | 
					     this.modaldelete=true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  delete(id)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    this.modaldelete = false;
 | 
				
			||||||
 | 
					    console.log("in delete  "+id);
 | 
				
			||||||
 | 
					    this.mainService.delete(id).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        this.ngOnInit();
 | 
				
			||||||
 | 
					  if (data) {				      this.toastr.success('Deleted successfully');      }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					    onUpdate(id) {
 | 
				
			||||||
 | 
					    this.modalEdit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //console.log("in update");
 | 
				
			||||||
 | 
					    console.log("id  " + id);
 | 
				
			||||||
 | 
					    console.log(this.rowSelected);
 | 
				
			||||||
 | 
					    //console.log("out update");
 | 
				
			||||||
 | 
					    this.mainService.update(id, this.rowSelected).subscribe(
 | 
				
			||||||
 | 
					      (data) => {
 | 
				
			||||||
 | 
					        console.log(data);
 | 
				
			||||||
 | 
					        if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Update Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("update Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Updated");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  } 
 | 
				
			||||||
 | 
					onCreate() {
 | 
				
			||||||
 | 
					     this.modalAdd=false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  this.mainService.create(this.entryForm.value).subscribe(
 | 
				
			||||||
 | 
					    (data) => {
 | 
				
			||||||
 | 
					      console.log(data);
 | 
				
			||||||
 | 
					  if (data || data.status >= 200 && data.status <= 299) {
 | 
				
			||||||
 | 
					          this.toastr.success("Added Successfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }, (error) => {
 | 
				
			||||||
 | 
					        console.log(error);
 | 
				
			||||||
 | 
					        if (error.status >= 200 && error.status <= 299) {
 | 
				
			||||||
 | 
					          // this.toastr.success("Added Succesfully");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 400 && error.status <= 499) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (error.status >= 500 && error.status <= 599) {
 | 
				
			||||||
 | 
					          this.toastr.error("Not Added");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.ngOnInit();
 | 
				
			||||||
 | 
					    }, 500);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  goToAdd(row) {
 | 
				
			||||||
 | 
					this.modalAdd = true; this.submitted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					 submitted = false;
 | 
				
			||||||
 | 
					onSubmit() {
 | 
				
			||||||
 | 
					  console.log(this.entryForm.value);
 | 
				
			||||||
 | 
					 this.submitted = true;
 | 
				
			||||||
 | 
					  if (this.entryForm.invalid) {
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					  }this.onCreate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rsModaldescription = false;   
 | 
				
			||||||
 | 
					goToReplaceStringdescription(row){
 | 
				
			||||||
 | 
					this.rowSelected = row;     this.rsModaldescription  =true;   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// updateaction
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					import { Injectable } from '@angular/core';
 | 
				
			||||||
 | 
					import { Observable } from "rxjs";
 | 
				
			||||||
 | 
					import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
 | 
				
			||||||
 | 
					import { ApiRequestService } from "src/app/services/api/api-request.service";
 | 
				
			||||||
 | 
					import { environment } from 'src/environments/environment';
 | 
				
			||||||
 | 
					@Injectable({
 | 
				
			||||||
 | 
					  providedIn: 'root'
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					export class Typeservice{
 | 
				
			||||||
 | 
					  private baseURL = "Type/Type" ;  constructor(
 | 
				
			||||||
 | 
					    private http: HttpClient,
 | 
				
			||||||
 | 
					    private apiRequest: ApiRequestService,
 | 
				
			||||||
 | 
					  ) { }
 | 
				
			||||||
 | 
					  getAll(page?: number, size?: number): Observable<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 Typecardvariable = {
 | 
				
			||||||
 | 
					    "cardButton": false,
 | 
				
			||||||
 | 
					    "cardmodeldata": ``
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,3 +1,7 @@
 | 
				
			|||||||
 | 
					import { Order_estimationComponent } from './BuilderComponents/order_estimation/Order_estimation/Order_estimation.component';
 | 
				
			||||||
 | 
					import { ProductComponent } from './BuilderComponents/order_estimation/Product/Product.component';
 | 
				
			||||||
 | 
					import { TypeComponent } from './BuilderComponents/order_estimation/Type/Type.component';
 | 
				
			||||||
 | 
					import { ManufacturerComponent } from './BuilderComponents/order_estimation/Manufacturer/Manufacturer.component';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component';
 | 
					import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component';
 | 
				
			||||||
import { Component, NgModule } from '@angular/core';
 | 
					import { Component, NgModule } from '@angular/core';
 | 
				
			||||||
@ -256,6 +260,18 @@ const routes: Routes = [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // buildercomponents
 | 
					      // buildercomponents
 | 
				
			||||||
 | 
					{path:'Order_estimation',component:Order_estimationComponent},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{path:'Product',component:ProductComponent},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{path:'Type',component:TypeComponent},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{path:'Manufacturer',component:ManufacturerComponent},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,7 @@
 | 
				
			|||||||
 | 
					import { Order_estimationComponent } from './BuilderComponents/order_estimation/Order_estimation/Order_estimation.component';
 | 
				
			||||||
 | 
					import { ProductComponent } from './BuilderComponents/order_estimation/Product/Product.component';
 | 
				
			||||||
 | 
					import { TypeComponent } from './BuilderComponents/order_estimation/Type/Type.component';
 | 
				
			||||||
 | 
					import { ManufacturerComponent } from './BuilderComponents/order_estimation/Manufacturer/Manufacturer.component';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { CommonModule } from '@angular/common';
 | 
					import { CommonModule } from '@angular/common';
 | 
				
			||||||
@ -129,6 +133,18 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // buildercomponents
 | 
					    // buildercomponents
 | 
				
			||||||
 | 
					Order_estimationComponent,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ProductComponent,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TypeComponent,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ManufacturerComponent,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -226,10 +226,37 @@
 | 
				
			|||||||
  "MENU_ACTION_LINK": "Menu Action Link",
 | 
					  "MENU_ACTION_LINK": "Menu Action Link",
 | 
				
			||||||
  "STATUS": "Status",
 | 
					  "STATUS": "Status",
 | 
				
			||||||
  "SUB_MENU": "Sub Menu",
 | 
					  "SUB_MENU": "Sub Menu",
 | 
				
			||||||
  "Active": "Active",
 | 
					 | 
				
			||||||
  "Description": "Description",
 | 
					  "Description": "Description",
 | 
				
			||||||
  "Fileupload_Field": "Fileupload_Field",
 | 
					  "DG_Monitoring_-_without_fuel": "DG_Monitoring_-_without_fuel",
 | 
				
			||||||
  "Test22": "Test22",
 | 
					  "LT_Panel_Monitoring": "LT_Panel_Monitoring",
 | 
				
			||||||
  "Test11": "Test11",
 | 
					  "Customer_Name": "Customer_Name",
 | 
				
			||||||
  "Name": "Name"
 | 
					  "Water_Management_-_Water_Monitoring": "Water_Management_-_Water_Monitoring",
 | 
				
			||||||
 | 
					  "Final_Total": "Final_Total",
 | 
				
			||||||
 | 
					  "Product": "Product",
 | 
				
			||||||
 | 
					  "Phone_Number": "Phone_Number",
 | 
				
			||||||
 | 
					  "Compressed_Air_-Gas_Monotoring_": "Compressed_Air_-Gas_Monotoring_",
 | 
				
			||||||
 | 
					  "Contact_person": "Contact_person",
 | 
				
			||||||
 | 
					  "Water_Management_-STP/ETP": "Water_Management_-STP/ETP",
 | 
				
			||||||
 | 
					  "Manufacturer": "Manufacturer",
 | 
				
			||||||
 | 
					  "Deployment_Type": "Deployment_Type",
 | 
				
			||||||
 | 
					  "Active_Energy": "Active_Energy",
 | 
				
			||||||
 | 
					  "OneToManyExtension": "OneToManyExtension",
 | 
				
			||||||
 | 
					  "HT_Panel_Monitoring": "HT_Panel_Monitoring",
 | 
				
			||||||
 | 
					  "Quantity": "Quantity",
 | 
				
			||||||
 | 
					  "UPS_Monitoring": "UPS_Monitoring",
 | 
				
			||||||
 | 
					  "Active": "Active",
 | 
				
			||||||
 | 
					  "Type": "Type",
 | 
				
			||||||
 | 
					  "APFC_Panel_Monitoring__": "APFC_Panel_Monitoring__",
 | 
				
			||||||
 | 
					  "Price": "Price",
 | 
				
			||||||
 | 
					  "Busbar_Monitoring": "Busbar_Monitoring",
 | 
				
			||||||
 | 
					  "Compress_Air_-_LPG/O2/N2/CO2": "Compress_Air_-_LPG/O2/N2/CO2",
 | 
				
			||||||
 | 
					  "Total": "Total",
 | 
				
			||||||
 | 
					  "Manufacture": "Manufacture",
 | 
				
			||||||
 | 
					  "Order_summary": "Order_summary",
 | 
				
			||||||
 | 
					  "Customer_Address": "Customer_Address",
 | 
				
			||||||
 | 
					  "Order_estimation": "Order_estimation",
 | 
				
			||||||
 | 
					  "Quantitys": "Quantitys",
 | 
				
			||||||
 | 
					  "DG_Monitoring_-_with_fuel": "DG_Monitoring_-_with_fuel",
 | 
				
			||||||
 | 
					  "Water_Management-_Water_Quality": "Water_Management-_Water_Quality",
 | 
				
			||||||
 | 
					  "Unit_Price": "Unit_Price"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user