diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 11edc5f..3946004 100644 --- a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,48 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Visa_administration", "Master"); + + +addCustomMenu( "Visa_status", "Transcations"); + + +addCustomMenu( "Cost_sheet", "Master"); + + +addCustomMenu( "Visa_bundle", "Master"); + + +addCustomMenu( "Agent", "Master"); + + +addCustomMenu( "Supplier", "Master"); + + +addCustomMenu( "Nationality", "Master"); + + +addCustomMenu( "Referrer", "Master"); + + +addCustomMenu( "Gender", "Master"); + + +addCustomMenu( "Visa_processing", "Master"); + + +addCustomMenu( "Visa_prices", "Master"); + + +addCustomMenu( "Visa_entry", "Master"); + + +addCustomMenu( "Visa_duration", "Master"); + + +addCustomMenu( "Visa_application", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/AgentController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/AgentController.java new file mode 100644 index 0000000..e09eff2 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/AgentController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Agent; +import com.realnet.vpspack.Services.AgentService ; + + + + + + +@RequestMapping(value = "/Agent") + @CrossOrigin("*") +@RestController +public class AgentController { + @Autowired + private AgentService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Agent") + public Agent Savedata(@RequestBody Agent data) { + Agent save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Agent/{id}") + public Agent update(@RequestBody Agent data,@PathVariable Integer id ) { + Agent update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Agent/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Agent") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Agent") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Agent/{id}") + public Agent getdetailsbyId(@PathVariable Integer id ) { + Agent get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Agent/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Agent_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Agent_ListFilter1Controller.java new file mode 100644 index 0000000..46b55a6 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Agent_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Agent_ListFilter1; +import com.realnet.vpspack.Services.Agent_ListFilter1Service ; +@RequestMapping(value = "/Agent_ListFilter1") +@RestController +public class Agent_ListFilter1Controller { + + @Autowired + private Agent_ListFilter1Service Service; + + @GetMapping("/Agent_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Agent_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Cost_sheetController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Cost_sheetController.java new file mode 100644 index 0000000..1339292 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Cost_sheetController.java @@ -0,0 +1,107 @@ +package com.realnet.vpspack.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.vpspack.Entity.Cost_sheet; +import com.realnet.vpspack.Services.Cost_sheetService ; + + + + + + + + +@RequestMapping(value = "/Cost_sheet") + @CrossOrigin("*") +@RestController +public class Cost_sheetController { + @Autowired + private Cost_sheetService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Cost_sheet") + public Cost_sheet Savedata(@RequestBody Cost_sheet data) { + Cost_sheet save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Cost_sheet/{id}") + public Cost_sheet update(@RequestBody Cost_sheet data,@PathVariable Integer id ) { + Cost_sheet update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Cost_sheet/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Cost_sheet") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Cost_sheet") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Cost_sheet/{id}") + public Cost_sheet getdetailsbyId(@PathVariable Integer id ) { + Cost_sheet get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Cost_sheet/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/GenderController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/GenderController.java new file mode 100644 index 0000000..7f41336 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/GenderController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Gender; +import com.realnet.vpspack.Services.GenderService ; + + + + + + +@RequestMapping(value = "/Gender") + @CrossOrigin("*") +@RestController +public class GenderController { + @Autowired + private GenderService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Gender") + public Gender Savedata(@RequestBody Gender data) { + Gender save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Gender/{id}") + public Gender update(@RequestBody Gender data,@PathVariable Integer id ) { + Gender update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Gender/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Gender") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Gender") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Gender/{id}") + public Gender getdetailsbyId(@PathVariable Integer id ) { + Gender get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Gender/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Gender_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Gender_ListFilter1Controller.java new file mode 100644 index 0000000..d3188a3 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Gender_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Gender_ListFilter1; +import com.realnet.vpspack.Services.Gender_ListFilter1Service ; +@RequestMapping(value = "/Gender_ListFilter1") +@RestController +public class Gender_ListFilter1Controller { + + @Autowired + private Gender_ListFilter1Service Service; + + @GetMapping("/Gender_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Gender_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/NationalityController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/NationalityController.java new file mode 100644 index 0000000..ceec4d8 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/NationalityController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Nationality; +import com.realnet.vpspack.Services.NationalityService ; + + + + + + +@RequestMapping(value = "/Nationality") + @CrossOrigin("*") +@RestController +public class NationalityController { + @Autowired + private NationalityService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Nationality") + public Nationality Savedata(@RequestBody Nationality data) { + Nationality save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Nationality/{id}") + public Nationality update(@RequestBody Nationality data,@PathVariable Integer id ) { + Nationality update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Nationality/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Nationality") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Nationality") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Nationality/{id}") + public Nationality getdetailsbyId(@PathVariable Integer id ) { + Nationality get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Nationality/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Nationality_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Nationality_ListFilter1Controller.java new file mode 100644 index 0000000..e115f9f --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Nationality_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Nationality_ListFilter1; +import com.realnet.vpspack.Services.Nationality_ListFilter1Service ; +@RequestMapping(value = "/Nationality_ListFilter1") +@RestController +public class Nationality_ListFilter1Controller { + + @Autowired + private Nationality_ListFilter1Service Service; + + @GetMapping("/Nationality_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Nationality_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/ReferrerController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/ReferrerController.java new file mode 100644 index 0000000..ccf1de2 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/ReferrerController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Referrer; +import com.realnet.vpspack.Services.ReferrerService ; + + + + + + +@RequestMapping(value = "/Referrer") + @CrossOrigin("*") +@RestController +public class ReferrerController { + @Autowired + private ReferrerService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Referrer") + public Referrer Savedata(@RequestBody Referrer data) { + Referrer save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Referrer/{id}") + public Referrer update(@RequestBody Referrer data,@PathVariable Integer id ) { + Referrer update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Referrer/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Referrer") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Referrer") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Referrer/{id}") + public Referrer getdetailsbyId(@PathVariable Integer id ) { + Referrer get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Referrer/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Referrer_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Referrer_ListFilter1Controller.java new file mode 100644 index 0000000..72a6626 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Referrer_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Referrer_ListFilter1; +import com.realnet.vpspack.Services.Referrer_ListFilter1Service ; +@RequestMapping(value = "/Referrer_ListFilter1") +@RestController +public class Referrer_ListFilter1Controller { + + @Autowired + private Referrer_ListFilter1Service Service; + + @GetMapping("/Referrer_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Referrer_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/SupplierController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/SupplierController.java new file mode 100644 index 0000000..492b106 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/SupplierController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Supplier; +import com.realnet.vpspack.Services.SupplierService ; + + + + + + +@RequestMapping(value = "/Supplier") + @CrossOrigin("*") +@RestController +public class SupplierController { + @Autowired + private SupplierService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Supplier") + public Supplier Savedata(@RequestBody Supplier data) { + Supplier save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Supplier/{id}") + public Supplier update(@RequestBody Supplier data,@PathVariable Integer id ) { + Supplier update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Supplier/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Supplier") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Supplier") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Supplier/{id}") + public Supplier getdetailsbyId(@PathVariable Integer id ) { + Supplier get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Supplier/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Supplier_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Supplier_ListFilter1Controller.java new file mode 100644 index 0000000..0e62a96 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Supplier_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Supplier_ListFilter1; +import com.realnet.vpspack.Services.Supplier_ListFilter1Service ; +@RequestMapping(value = "/Supplier_ListFilter1") +@RestController +public class Supplier_ListFilter1Controller { + + @Autowired + private Supplier_ListFilter1Service Service; + + @GetMapping("/Supplier_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Supplier_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_administrationController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_administrationController.java new file mode 100644 index 0000000..019ad83 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_administrationController.java @@ -0,0 +1,123 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_administration; +import com.realnet.vpspack.Services.Visa_administrationService ; + + + + + + + + + + + + +@RequestMapping(value = "/Visa_administration") + @CrossOrigin("*") +@RestController +public class Visa_administrationController { + @Autowired + private Visa_administrationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + @PostMapping("/Visa_administration") + public Visa_administration Savedata(@RequestBody Visa_administration data) { + Visa_administration save = Service.Savedata(data) ; + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_administration/{id}") + public Visa_administration update(@RequestBody Visa_administration data,@PathVariable Integer id ) { + Visa_administration update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_administration/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_administration") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_administration") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_administration/{id}") + public Visa_administration getdetailsbyId(@PathVariable Integer id ) { + Visa_administration get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_administration/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_applicationController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_applicationController.java new file mode 100644 index 0000000..97f6312 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_applicationController.java @@ -0,0 +1,251 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_application; +import com.realnet.vpspack.Services.Visa_applicationService ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Visa_application") + @CrossOrigin("*") +@RestController +public class Visa_applicationController { + @Autowired + private Visa_applicationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Visa_application") + public Visa_application Savedata(@RequestBody Visa_application data) { + Visa_application save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_application/{id}") + public Visa_application update(@RequestBody Visa_application data,@PathVariable Integer id ) { + Visa_application update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_application/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_application") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_application") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_application/{id}") + public Visa_application getdetailsbyId(@PathVariable Integer id ) { + Visa_application get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_application/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_bundleController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_bundleController.java new file mode 100644 index 0000000..1955da8 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_bundleController.java @@ -0,0 +1,107 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_bundle; +import com.realnet.vpspack.Services.Visa_bundleService ; + + + + + + + + +@RequestMapping(value = "/Visa_bundle") + @CrossOrigin("*") +@RestController +public class Visa_bundleController { + @Autowired + private Visa_bundleService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Visa_bundle") + public Visa_bundle Savedata(@RequestBody Visa_bundle data) { + Visa_bundle save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_bundle/{id}") + public Visa_bundle update(@RequestBody Visa_bundle data,@PathVariable Integer id ) { + Visa_bundle update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_bundle/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_bundle") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_bundle") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_bundle/{id}") + public Visa_bundle getdetailsbyId(@PathVariable Integer id ) { + Visa_bundle get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_bundle/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_durationController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_durationController.java new file mode 100644 index 0000000..f9c5840 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_durationController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_duration; +import com.realnet.vpspack.Services.Visa_durationService ; + + + + + + +@RequestMapping(value = "/Visa_duration") + @CrossOrigin("*") +@RestController +public class Visa_durationController { + @Autowired + private Visa_durationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Visa_duration") + public Visa_duration Savedata(@RequestBody Visa_duration data) { + Visa_duration save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_duration/{id}") + public Visa_duration update(@RequestBody Visa_duration data,@PathVariable Integer id ) { + Visa_duration update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_duration/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_duration") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_duration") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_duration/{id}") + public Visa_duration getdetailsbyId(@PathVariable Integer id ) { + Visa_duration get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_duration/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_duration_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_duration_ListFilter1Controller.java new file mode 100644 index 0000000..e354f10 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_duration_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Visa_duration_ListFilter1; +import com.realnet.vpspack.Services.Visa_duration_ListFilter1Service ; +@RequestMapping(value = "/Visa_duration_ListFilter1") +@RestController +public class Visa_duration_ListFilter1Controller { + + @Autowired + private Visa_duration_ListFilter1Service Service; + + @GetMapping("/Visa_duration_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Visa_duration_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entryController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entryController.java new file mode 100644 index 0000000..afe3a1c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entryController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_entry; +import com.realnet.vpspack.Services.Visa_entryService ; + + + + + + +@RequestMapping(value = "/Visa_entry") + @CrossOrigin("*") +@RestController +public class Visa_entryController { + @Autowired + private Visa_entryService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Visa_entry") + public Visa_entry Savedata(@RequestBody Visa_entry data) { + Visa_entry save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_entry/{id}") + public Visa_entry update(@RequestBody Visa_entry data,@PathVariable Integer id ) { + Visa_entry update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_entry/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_entry") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_entry") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_entry/{id}") + public Visa_entry getdetailsbyId(@PathVariable Integer id ) { + Visa_entry get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_entry/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entry_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entry_ListFilter1Controller.java new file mode 100644 index 0000000..cbf8214 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_entry_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Visa_entry_ListFilter1; +import com.realnet.vpspack.Services.Visa_entry_ListFilter1Service ; +@RequestMapping(value = "/Visa_entry_ListFilter1") +@RestController +public class Visa_entry_ListFilter1Controller { + + @Autowired + private Visa_entry_ListFilter1Service Service; + + @GetMapping("/Visa_entry_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Visa_entry_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_pricesController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_pricesController.java new file mode 100644 index 0000000..d6e9f56 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_pricesController.java @@ -0,0 +1,139 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_prices; +import com.realnet.vpspack.Services.Visa_pricesService ; + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Visa_prices") + @CrossOrigin("*") +@RestController +public class Visa_pricesController { + @Autowired + private Visa_pricesService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + @PostMapping("/Visa_prices") + public Visa_prices Savedata(@RequestBody Visa_prices data) { + Visa_prices save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_prices/{id}") + public Visa_prices update(@RequestBody Visa_prices data,@PathVariable Integer id ) { + Visa_prices update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_prices/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_prices") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_prices") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_prices/{id}") + public Visa_prices getdetailsbyId(@PathVariable Integer id ) { + Visa_prices get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_prices/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processingController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processingController.java new file mode 100644 index 0000000..6f45e23 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processingController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_processing; +import com.realnet.vpspack.Services.Visa_processingService ; + + + + + + +@RequestMapping(value = "/Visa_processing") + @CrossOrigin("*") +@RestController +public class Visa_processingController { + @Autowired + private Visa_processingService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Visa_processing") + public Visa_processing Savedata(@RequestBody Visa_processing data) { + Visa_processing save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_processing/{id}") + public Visa_processing update(@RequestBody Visa_processing data,@PathVariable Integer id ) { + Visa_processing update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_processing/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_processing") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_processing") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_processing/{id}") + public Visa_processing getdetailsbyId(@PathVariable Integer id ) { + Visa_processing get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_processing/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processing_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processing_ListFilter1Controller.java new file mode 100644 index 0000000..232c2a7 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_processing_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Visa_processing_ListFilter1; +import com.realnet.vpspack.Services.Visa_processing_ListFilter1Service ; +@RequestMapping(value = "/Visa_processing_ListFilter1") +@RestController +public class Visa_processing_ListFilter1Controller { + + @Autowired + private Visa_processing_ListFilter1Service Service; + + @GetMapping("/Visa_processing_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Visa_processing_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_statusController.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_statusController.java new file mode 100644 index 0000000..4cecc73 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_statusController.java @@ -0,0 +1,99 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_status; +import com.realnet.vpspack.Services.Visa_statusService ; + + + + + + +@RequestMapping(value = "/Visa_status") + @CrossOrigin("*") +@RestController +public class Visa_statusController { + @Autowired + private Visa_statusService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Visa_status") + public Visa_status Savedata(@RequestBody Visa_status data) { + Visa_status save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Visa_status/{id}") + public Visa_status update(@RequestBody Visa_status data,@PathVariable Integer id ) { + Visa_status update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Visa_status/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Visa_status") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Visa_status") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Visa_status/{id}") + public Visa_status getdetailsbyId(@PathVariable Integer id ) { + Visa_status get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Visa_status/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_status_ListFilter1Controller.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_status_ListFilter1Controller.java new file mode 100644 index 0000000..7f7898c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Controllers/Visa_status_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.vpspack.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.vpspack.Entity.Visa_status_ListFilter1; +import com.realnet.vpspack.Services.Visa_status_ListFilter1Service ; +@RequestMapping(value = "/Visa_status_ListFilter1") +@RestController +public class Visa_status_ListFilter1Controller { + + @Autowired + private Visa_status_ListFilter1Service Service; + + @GetMapping("/Visa_status_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Visa_status_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent.java new file mode 100644 index 0000000..622b388 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Agent extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent_ListFilter1.java new file mode 100644 index 0000000..053ded7 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Agent_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Agent_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Cost_sheet.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Cost_sheet.java new file mode 100644 index 0000000..791d153 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Cost_sheet.java @@ -0,0 +1,38 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Cost_sheet extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String cost_sheetname; +private String cost_sheetpath ; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender.java new file mode 100644 index 0000000..5285a1e --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Gender extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender_ListFilter1.java new file mode 100644 index 0000000..5790c37 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Gender_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Gender_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality.java new file mode 100644 index 0000000..1c1731e --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Nationality extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality_ListFilter1.java new file mode 100644 index 0000000..b0f103c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Nationality_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Nationality_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer.java new file mode 100644 index 0000000..0ec2473 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Referrer extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer_ListFilter1.java new file mode 100644 index 0000000..2a35bd1 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Referrer_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Referrer_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier.java new file mode 100644 index 0000000..ea1fb57 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Supplier extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier_ListFilter1.java new file mode 100644 index 0000000..2c0931b --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Supplier_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Supplier_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_administration.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_administration.java new file mode 100644 index 0000000..01f9925 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_administration.java @@ -0,0 +1,47 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + @Entity + @Data + public class Visa_administration extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String emails; + +private Integer visa_status; +private String visa_statusname; + +private Integer nationality; +private String nationalityname; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_application.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_application.java new file mode 100644 index 0000000..43916f9 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_application.java @@ -0,0 +1,117 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Visa_application extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + +private Integer visa_entry_type; +private String visa_entry_typename; + +private Integer visa_duration; +private String visa_durationname; + +private Integer visa_processing; +private String visa_processingname; + +private String travel_start_date; + +private String travel_end_date; + +private int passport_number; + +private String passport_issue_date; + +private String passport_expiry_date; + +private String email; + + private String phone_number; + +private String birth_place; + +private String date_of_birth; + +private Integer gender; +private String gendername; + +private String profession; + +private String visa_cost; + +private Integer referrer; +private String referrername; + +private Integer nationality; +private String nationalityname; + +private Integer supplier; +private String suppliername; + +private Integer agent; +private String agentname; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_bundle.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_bundle.java new file mode 100644 index 0000000..3d4ea34 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_bundle.java @@ -0,0 +1,38 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Visa_bundle extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + +private String visa_bundlename; +private String visa_bundlepath ; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration.java new file mode 100644 index 0000000..31ba9e1 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Visa_duration extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration_ListFilter1.java new file mode 100644 index 0000000..ec2ec19 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_duration_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Visa_duration_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry.java new file mode 100644 index 0000000..b01b7fc --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Visa_entry extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry_ListFilter1.java new file mode 100644 index 0000000..06fc06d --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_entry_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Visa_entry_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_prices.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_prices.java new file mode 100644 index 0000000..3b65bd3 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_prices.java @@ -0,0 +1,56 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + @Entity + @Data + public class Visa_prices extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + +private Integer visa_entry_type; +private String visa_entry_typename; + +private Integer visa_duration; +private String visa_durationname; + +private Integer visa_processing; +private String visa_processingname; + +private String total_price; + +private String cost; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing.java new file mode 100644 index 0000000..8a139f2 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Visa_processing extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing_ListFilter1.java new file mode 100644 index 0000000..7ee7467 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_processing_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Visa_processing_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status.java new file mode 100644 index 0000000..402d552 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status.java @@ -0,0 +1,33 @@ +package com.realnet.vpspack.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Visa_status extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status_ListFilter1.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status_ListFilter1.java new file mode 100644 index 0000000..632ead7 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Entity/Visa_status_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.vpspack.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Visa_status_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/AgentRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/AgentRepository.java new file mode 100644 index 0000000..e38b611 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/AgentRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Agent; + +@Repository +public interface AgentRepository extends JpaRepository { + +@Query(value = "select * from agent where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from agent where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Cost_sheetRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Cost_sheetRepository.java new file mode 100644 index 0000000..87128b4 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Cost_sheetRepository.java @@ -0,0 +1,32 @@ +package com.realnet.vpspack.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.vpspack.Entity.Cost_sheet; + +@Repository +public interface Cost_sheetRepository extends JpaRepository { + +@Query(value = "select * from cost_sheet where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from cost_sheet where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/GenderRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/GenderRepository.java new file mode 100644 index 0000000..e08bae7 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/GenderRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Gender; + +@Repository +public interface GenderRepository extends JpaRepository { + +@Query(value = "select * from gender where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from gender where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/NationalityRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/NationalityRepository.java new file mode 100644 index 0000000..d6a35a6 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/NationalityRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Nationality; + +@Repository +public interface NationalityRepository extends JpaRepository { + +@Query(value = "select * from nationality where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from nationality where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/ReferrerRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/ReferrerRepository.java new file mode 100644 index 0000000..0456012 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/ReferrerRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Referrer; + +@Repository +public interface ReferrerRepository extends JpaRepository { + +@Query(value = "select * from referrer where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from referrer where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/SupplierRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/SupplierRepository.java new file mode 100644 index 0000000..332571d --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/SupplierRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Supplier; + +@Repository +public interface SupplierRepository extends JpaRepository { + +@Query(value = "select * from supplier where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from supplier where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_administrationRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_administrationRepository.java new file mode 100644 index 0000000..0b83146 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_administrationRepository.java @@ -0,0 +1,36 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_administration; + +@Repository +public interface Visa_administrationRepository extends JpaRepository { + +@Query(value = "select * from visa_administration where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_administration where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_applicationRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_applicationRepository.java new file mode 100644 index 0000000..3f39666 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_applicationRepository.java @@ -0,0 +1,68 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_application; + +@Repository +public interface Visa_applicationRepository extends JpaRepository { + +@Query(value = "select * from visa_application where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_application where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_bundleRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_bundleRepository.java new file mode 100644 index 0000000..3a0f673 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_bundleRepository.java @@ -0,0 +1,32 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_bundle; + +@Repository +public interface Visa_bundleRepository extends JpaRepository { + +@Query(value = "select * from visa_bundle where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_bundle where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_durationRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_durationRepository.java new file mode 100644 index 0000000..5782441 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_durationRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_duration; + +@Repository +public interface Visa_durationRepository extends JpaRepository { + +@Query(value = "select * from visa_duration where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_duration where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_entryRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_entryRepository.java new file mode 100644 index 0000000..ecb272f --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_entryRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_entry; + +@Repository +public interface Visa_entryRepository extends JpaRepository { + +@Query(value = "select * from visa_entry where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_entry where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_pricesRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_pricesRepository.java new file mode 100644 index 0000000..a87d2b1 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_pricesRepository.java @@ -0,0 +1,40 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_prices; + +@Repository +public interface Visa_pricesRepository extends JpaRepository { + +@Query(value = "select * from visa_prices where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_prices where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_processingRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_processingRepository.java new file mode 100644 index 0000000..95c527c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_processingRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_processing; + +@Repository +public interface Visa_processingRepository extends JpaRepository { + +@Query(value = "select * from visa_processing where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_processing where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_statusRepository.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_statusRepository.java new file mode 100644 index 0000000..8d362e2 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Repository/Visa_statusRepository.java @@ -0,0 +1,30 @@ +package com.realnet.vpspack.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.vpspack.Entity.Visa_status; + +@Repository +public interface Visa_statusRepository extends JpaRepository { + +@Query(value = "select * from visa_status where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from visa_status where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/AgentService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/AgentService.java new file mode 100644 index 0000000..4340806 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/AgentService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.AgentRepository; +import com.realnet.vpspack.Entity.Agent +;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 AgentService { +@Autowired +private AgentRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Agent Savedata(Agent data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Agent save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Agent getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Agent update(Agent data,Integer id) { + Agent old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Agent test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Agent_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Agent_ListFilter1Service.java new file mode 100644 index 0000000..630a8e4 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Agent_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.AgentRepository; +import com.realnet.vpspack.Entity.Agent; + +import com.realnet.vpspack.Entity.Agent_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Agent_ListFilter1Service { +@Autowired +private AgentRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Agent data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Agent_ListFilter1 dummy = new Agent_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Agent data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Agent_ListFilter1 dummy = new Agent_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Cost_sheetService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Cost_sheetService.java new file mode 100644 index 0000000..01a2b68 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Cost_sheetService.java @@ -0,0 +1,103 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Cost_sheetRepository; +import com.realnet.vpspack.Entity.Cost_sheet +;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 Cost_sheetService { +@Autowired +private Cost_sheetRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Cost_sheet Savedata(Cost_sheet data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Cost_sheet save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Cost_sheet getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Cost_sheet update(Cost_sheet data,Integer id) { + Cost_sheet old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + + + +final Cost_sheet test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/GenderService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/GenderService.java new file mode 100644 index 0000000..3e18c02 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/GenderService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.GenderRepository; +import com.realnet.vpspack.Entity.Gender +;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 GenderService { +@Autowired +private GenderRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Gender Savedata(Gender data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Gender save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Gender getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Gender update(Gender data,Integer id) { + Gender old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Gender test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Gender_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Gender_ListFilter1Service.java new file mode 100644 index 0000000..a55d99e --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Gender_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.GenderRepository; +import com.realnet.vpspack.Entity.Gender; + +import com.realnet.vpspack.Entity.Gender_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Gender_ListFilter1Service { +@Autowired +private GenderRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Gender data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Gender_ListFilter1 dummy = new Gender_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Gender data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Gender_ListFilter1 dummy = new Gender_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/NationalityService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/NationalityService.java new file mode 100644 index 0000000..a6823f6 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/NationalityService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.NationalityRepository; +import com.realnet.vpspack.Entity.Nationality +;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 NationalityService { +@Autowired +private NationalityRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Nationality Savedata(Nationality data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Nationality save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Nationality getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Nationality update(Nationality data,Integer id) { + Nationality old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Nationality test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Nationality_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Nationality_ListFilter1Service.java new file mode 100644 index 0000000..74594f3 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Nationality_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.NationalityRepository; +import com.realnet.vpspack.Entity.Nationality; + +import com.realnet.vpspack.Entity.Nationality_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Nationality_ListFilter1Service { +@Autowired +private NationalityRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Nationality data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Nationality_ListFilter1 dummy = new Nationality_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Nationality data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Nationality_ListFilter1 dummy = new Nationality_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/ReferrerService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/ReferrerService.java new file mode 100644 index 0000000..99563a3 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/ReferrerService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.ReferrerRepository; +import com.realnet.vpspack.Entity.Referrer +;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 ReferrerService { +@Autowired +private ReferrerRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Referrer Savedata(Referrer data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Referrer save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Referrer getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Referrer update(Referrer data,Integer id) { + Referrer old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Referrer test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Referrer_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Referrer_ListFilter1Service.java new file mode 100644 index 0000000..39dc3cd --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Referrer_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.ReferrerRepository; +import com.realnet.vpspack.Entity.Referrer; + +import com.realnet.vpspack.Entity.Referrer_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Referrer_ListFilter1Service { +@Autowired +private ReferrerRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Referrer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Referrer_ListFilter1 dummy = new Referrer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Referrer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Referrer_ListFilter1 dummy = new Referrer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/SupplierService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/SupplierService.java new file mode 100644 index 0000000..e114a6c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/SupplierService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.SupplierRepository; +import com.realnet.vpspack.Entity.Supplier +;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 SupplierService { +@Autowired +private SupplierRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Supplier Savedata(Supplier data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Supplier save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Supplier getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Supplier update(Supplier data,Integer id) { + Supplier old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Supplier test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Supplier_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Supplier_ListFilter1Service.java new file mode 100644 index 0000000..6f85e6a --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Supplier_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.SupplierRepository; +import com.realnet.vpspack.Entity.Supplier; + +import com.realnet.vpspack.Entity.Supplier_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Supplier_ListFilter1Service { +@Autowired +private SupplierRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Supplier data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Supplier_ListFilter1 dummy = new Supplier_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Supplier data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Supplier_ListFilter1 dummy = new Supplier_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_administrationService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_administrationService.java new file mode 100644 index 0000000..b1ea60e --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_administrationService.java @@ -0,0 +1,149 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_administrationRepository; +import com.realnet.vpspack.Entity.Visa_administration +;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.vpspack.Entity.Visa_Status; +import com.realnet.vpspack.Services.Visa_StatusService; + + + +import com.realnet.vpspack.Entity.Nationality; +import com.realnet.vpspack.Services.NationalityService; + + + + import org.springframework.stereotype.Service; + +@Service + public class Visa_administrationService { +@Autowired +private Visa_administrationRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +@Autowired + private Visa_StatusService visa_statusserv; + +@Autowired + private NationalityService nationalityserv; + +public Visa_administration Savedata(Visa_administration data) { + + + + + + + + + + +if (data.getVisa_status() != null) { + Visa_Status get = visa_statusserv.getdetailsbyId(data.getVisa_status()); + data.setVisa_statusname(get.getName()); + + } + + + + + + +if (data.getNationality() != null) { + Nationality get = nationalityserv.getdetailsbyId(data.getNationality()); + data.setNationalityname(get.getName()); + + } + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_administration save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_administration getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_administration update(Visa_administration data,Integer id) { + Visa_administration old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setEmails(data.getEmails()); + +old.setVisa_status(data.getVisa_status()); + +old.setNationality(data.getNationality()); + +final Visa_administration test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_applicationService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_applicationService.java new file mode 100644 index 0000000..22d060c --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_applicationService.java @@ -0,0 +1,387 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_applicationRepository; +import com.realnet.vpspack.Entity.Visa_application +;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.vpspack.Entity.Visa_entry; +import com.realnet.vpspack.Services.Visa_entryService; + + + +import com.realnet.vpspack.Entity.Visa_duration; +import com.realnet.vpspack.Services.Visa_durationService; + + + +import com.realnet.vpspack.Entity.Visa_Processing; +import com.realnet.vpspack.Services.Visa_ProcessingService; + + + + + + + + + + + + + + + + + + + + + +import com.realnet.vpspack.Entity.Gender; +import com.realnet.vpspack.Services.GenderService; + + + + + + + +import com.realnet.vpspack.Entity.Referrer; +import com.realnet.vpspack.Services.ReferrerService; + + + +import com.realnet.vpspack.Entity.Nationality; +import com.realnet.vpspack.Services.NationalityService; + + + +import com.realnet.vpspack.Entity.Supplier; +import com.realnet.vpspack.Services.SupplierService; + + + +import com.realnet.vpspack.Entity.Agent; +import com.realnet.vpspack.Services.AgentService; + + + + import org.springframework.stereotype.Service; + +@Service + public class Visa_applicationService { +@Autowired +private Visa_applicationRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +@Autowired + private Visa_entryService visa_entry_typeserv; + +@Autowired + private Visa_durationService visa_durationserv; + +@Autowired + private Visa_ProcessingService visa_processingserv; + + + + + + + + + + + + + + + + + + + +@Autowired + private GenderService genderserv; + + + + + +@Autowired + private ReferrerService referrerserv; + +@Autowired + private NationalityService nationalityserv; + +@Autowired + private SupplierService supplierserv; + +@Autowired + private AgentService agentserv; + +public Visa_application Savedata(Visa_application data) { + + + + + + + + +if (data.getVisa_entry_type() != null) { + Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type()); + data.setVisa_entry_typename(get.getName()); + + } + + + + + + +if (data.getVisa_duration() != null) { + Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration()); + data.setVisa_durationname(get.getName()); + + } + + + + + + +if (data.getVisa_processing() != null) { + Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing()); + data.setVisa_processingname(get.getName()); + + } + + + + + + + + + + + + + + + + + + + + + + + + +if (data.getGender() != null) { + Gender get = genderserv.getdetailsbyId(data.getGender()); + data.setGendername(get.getName()); + + } + + + + + + + + + + +if (data.getReferrer() != null) { + Referrer get = referrerserv.getdetailsbyId(data.getReferrer()); + data.setReferrername(get.getName()); + + } + + + + + + +if (data.getNationality() != null) { + Nationality get = nationalityserv.getdetailsbyId(data.getNationality()); + data.setNationalityname(get.getName()); + + } + + + + + + +if (data.getSupplier() != null) { + Supplier get = supplierserv.getdetailsbyId(data.getSupplier()); + data.setSuppliername(get.getName()); + + } + + + + + + +if (data.getAgent() != null) { + Agent get = agentserv.getdetailsbyId(data.getAgent()); + data.setAgentname(get.getName()); + + } + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_application save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_application getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_application update(Visa_application data,Integer id) { + Visa_application old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setVisa_entry_type(data.getVisa_entry_type()); + +old.setVisa_duration(data.getVisa_duration()); + +old.setVisa_processing(data.getVisa_processing()); + +old.setTravel_start_date(data.getTravel_start_date()); + +old.setTravel_end_date(data.getTravel_end_date()); + +old.setPassport_number(data.getPassport_number()); + +old.setPassport_issue_date(data.getPassport_issue_date()); + +old.setPassport_expiry_date(data.getPassport_expiry_date()); + +old.setEmail(data.getEmail()); + +old.setPhone_number(data.getPhone_number()); + +old.setBirth_place(data.getBirth_place()); + +old.setDate_of_birth(data.getDate_of_birth()); + +old.setGender(data.getGender()); + +old.setProfession(data.getProfession()); + +old.setVisa_cost(data.getVisa_cost()); + +old.setReferrer(data.getReferrer()); + +old.setNationality(data.getNationality()); + +old.setSupplier(data.getSupplier()); + +old.setAgent(data.getAgent()); + +final Visa_application test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_bundleService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_bundleService.java new file mode 100644 index 0000000..a70f99a --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_bundleService.java @@ -0,0 +1,103 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_bundleRepository; +import com.realnet.vpspack.Entity.Visa_bundle +;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 Visa_bundleService { +@Autowired +private Visa_bundleRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Visa_bundle Savedata(Visa_bundle data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_bundle save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_bundle getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_bundle update(Visa_bundle data,Integer id) { + Visa_bundle old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + + + +final Visa_bundle test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_durationService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_durationService.java new file mode 100644 index 0000000..c624b31 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_durationService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_durationRepository; +import com.realnet.vpspack.Entity.Visa_duration +;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 Visa_durationService { +@Autowired +private Visa_durationRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Visa_duration Savedata(Visa_duration data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_duration save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_duration getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_duration update(Visa_duration data,Integer id) { + Visa_duration old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Visa_duration test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_duration_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_duration_ListFilter1Service.java new file mode 100644 index 0000000..707c5c6 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_duration_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.Visa_durationRepository; +import com.realnet.vpspack.Entity.Visa_duration; + +import com.realnet.vpspack.Entity.Visa_duration_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Visa_duration_ListFilter1Service { +@Autowired +private Visa_durationRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_duration data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_duration_ListFilter1 dummy = new Visa_duration_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_duration data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_duration_ListFilter1 dummy = new Visa_duration_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entryService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entryService.java new file mode 100644 index 0000000..5e730dd --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entryService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_entryRepository; +import com.realnet.vpspack.Entity.Visa_entry +;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 Visa_entryService { +@Autowired +private Visa_entryRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Visa_entry Savedata(Visa_entry data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_entry save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_entry getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_entry update(Visa_entry data,Integer id) { + Visa_entry old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Visa_entry test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entry_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entry_ListFilter1Service.java new file mode 100644 index 0000000..2dd36f8 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_entry_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.Visa_entryRepository; +import com.realnet.vpspack.Entity.Visa_entry; + +import com.realnet.vpspack.Entity.Visa_entry_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Visa_entry_ListFilter1Service { +@Autowired +private Visa_entryRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_entry data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_entry_ListFilter1 dummy = new Visa_entry_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_entry data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_entry_ListFilter1 dummy = new Visa_entry_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_pricesService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_pricesService.java new file mode 100644 index 0000000..9217c02 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_pricesService.java @@ -0,0 +1,182 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_pricesRepository; +import com.realnet.vpspack.Entity.Visa_prices +;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.vpspack.Entity.Visa_entry; +import com.realnet.vpspack.Services.Visa_entryService; + + + +import com.realnet.vpspack.Entity.Visa_duration; +import com.realnet.vpspack.Services.Visa_durationService; + + + +import com.realnet.vpspack.Entity.Visa_Processing; +import com.realnet.vpspack.Services.Visa_ProcessingService; + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Visa_pricesService { +@Autowired +private Visa_pricesRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +@Autowired + private Visa_entryService visa_entry_typeserv; + +@Autowired + private Visa_durationService visa_durationserv; + +@Autowired + private Visa_ProcessingService visa_processingserv; + + + + + +public Visa_prices Savedata(Visa_prices data) { + + + + + + + + +if (data.getVisa_entry_type() != null) { + Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type()); + data.setVisa_entry_typename(get.getName()); + + } + + + + + + +if (data.getVisa_duration() != null) { + Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration()); + data.setVisa_durationname(get.getName()); + + } + + + + + + +if (data.getVisa_processing() != null) { + Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing()); + data.setVisa_processingname(get.getName()); + + } + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_prices save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_prices getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_prices update(Visa_prices data,Integer id) { + Visa_prices old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setVisa_entry_type(data.getVisa_entry_type()); + +old.setVisa_duration(data.getVisa_duration()); + +old.setVisa_processing(data.getVisa_processing()); + +old.setTotal_price(data.getTotal_price()); + +old.setCost(data.getCost()); + +final Visa_prices test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processingService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processingService.java new file mode 100644 index 0000000..236a601 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processingService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_processingRepository; +import com.realnet.vpspack.Entity.Visa_processing +;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 Visa_processingService { +@Autowired +private Visa_processingRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Visa_processing Savedata(Visa_processing data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_processing save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_processing getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_processing update(Visa_processing data,Integer id) { + Visa_processing old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Visa_processing test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processing_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processing_ListFilter1Service.java new file mode 100644 index 0000000..c7bd203 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_processing_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.Visa_processingRepository; +import com.realnet.vpspack.Entity.Visa_processing; + +import com.realnet.vpspack.Entity.Visa_processing_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Visa_processing_ListFilter1Service { +@Autowired +private Visa_processingRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_processing data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_processing_ListFilter1 dummy = new Visa_processing_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_processing data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_processing_ListFilter1 dummy = new Visa_processing_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_statusService.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_statusService.java new file mode 100644 index 0000000..72ad2c1 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_statusService.java @@ -0,0 +1,93 @@ +package com.realnet.vpspack.Services; +import com.realnet.vpspack.Repository.Visa_statusRepository; +import com.realnet.vpspack.Entity.Visa_status +;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 Visa_statusService { +@Autowired +private Visa_statusRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Visa_status Savedata(Visa_status data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Visa_status save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Visa_status getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Visa_status update(Visa_status data,Integer id) { + Visa_status old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Visa_status test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_status_ListFilter1Service.java b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_status_ListFilter1Service.java new file mode 100644 index 0000000..46eb645 --- /dev/null +++ b/visaproject-back-b/authsec_springboot/backend/src/main/java/com/realnet/vpspack/Services/Visa_status_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.vpspack.Services; +import java.util.*; +import com.realnet.vpspack.Repository.Visa_statusRepository; +import com.realnet.vpspack.Entity.Visa_status; + +import com.realnet.vpspack.Entity.Visa_status_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Visa_status_ListFilter1Service { +@Autowired +private Visa_statusRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_status data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_status_ListFilter1 dummy = new Visa_status_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Visa_status data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Visa_status_ListFilter1 dummy = new Visa_status_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..fdff417 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts @@ -2,14 +2,14 @@ export const LoginEnvironment = { - "templateNo": "", - "loginHeading": "", - "loginHeading2": "", - "isSignup": "", - "loginSignup": " ", - "loginSignup2": "", - "loginForgotpass": "", - "loginImage": "", - "loginImageURL": "" + "templateNo": "Template 1", + "loginHeading": "Welcome to", + "loginHeading2": "io8.dev", + "isSignup": "true", + "loginSignup": "Use your ID to sign in OR ", + "loginSignup2": "create one now", + "loginForgotpass": "FORGOT PASSWORD?", + "loginImage": "[]", + "loginImageURL": "null" } diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.html new file mode 100644 index 0000000..69206fb --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Agent

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.ts new file mode 100644 index 0000000..7d7d8d7 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Agentservice} from './Agent.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 { Agentcardvariable } from './Agent_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Agent', + templateUrl: './Agent.component.html', + styleUrls: ['./Agent.component.scss'] +}) +export class AgentComponent implements OnInit { + cardButton = Agentcardvariable.cardButton; + cardmodeldata = Agentcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Agentcardvariable.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 = 'Agent_formCode' +tableName = 'Agent'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Agentservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Agent_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.service.ts new file mode 100644 index 0000000..9ba3a28 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Agentservice{ + private baseURL = "Agent/Agent" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent_cardvariable.ts new file mode 100644 index 0000000..d65ee94 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Agent/Agent_cardvariable.ts @@ -0,0 +1,4 @@ +export const Agentcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.html new file mode 100644 index 0000000..a158179 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.html @@ -0,0 +1,475 @@ + +
+
+
+

Cost_Sheet

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.ts new file mode 100644 index 0000000..678b0c6 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component.ts @@ -0,0 +1,366 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Cost_sheetservice} from './Cost_sheet.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 { Cost_sheetcardvariable } from './Cost_sheet_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Cost_sheet', + templateUrl: './Cost_sheet.component.html', + styleUrls: ['./Cost_sheet.component.scss'] +}) +export class Cost_sheetComponent implements OnInit { + cardButton = Cost_sheetcardvariable.cardButton; + cardmodeldata = Cost_sheetcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Cost_sheetcardvariable.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 = 'Cost_sheet_formCode' +tableName = 'Cost_sheet'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Cost_sheetservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + + + + + }); // 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 === "Cost_sheet_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.selectedcost_sheet = []; + this.mainService.uploadfilegetByIdcost_sheet(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDatacost_sheet = uploaddata; + + }) + + + 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); + + + + + + +for (let i = 0; i < this.selectedcost_sheet.length; i++){ + + this.mainService.uploadfilecost_sheet(data.id,this.tableName,this.selectedcost_sheet[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + }, (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); + + + + + +for (let i = 0; i < this.selectedcost_sheet.length; i++){ + + this.mainService.uploadfilecost_sheet(data.id,this.tableName,this.selectedcost_sheet[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + + }, (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; + + + + + +this.FileDatacost_sheet = []; +this.selectedcost_sheet =[]; + + + } + 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; } + + + +filePreviewcost_sheet: string | ArrayBuffer | null = null; +FileDatacost_sheet: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedcost_sheet: File[]=[]; +public onFileChangedcost_sheet(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDatacost_sheet[index].uploadedfile_name = files[i].name; + this.selectedcost_sheet.push(files[i]); + if (file.type.startsWith('file/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDatacost_sheet[index] = { + ...this.FileDatacost_sheet[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } +} + onAddLinescost_sheet(){ + this.FileDatacost_sheet.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowcost_sheet(index,id) { + this.FileDatacost_sheet.splice(index, 1); + + if(id){ + this.mainService.uploadfiledeletecost_sheet(id).subscribe(data =>{ + console.log(data); + }) + } + } + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.service.ts new file mode 100644 index 0000000..5e58368 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet.service.ts @@ -0,0 +1,59 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Cost_sheetservice{ + private baseURL = "Cost_sheet/Cost_sheet" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + uploadfilecost_sheet(ref:any, Cost_sheet:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Cost_sheet}`, formData); + } + + uploadfilegetByIdcost_sheet(ref:any, Cost_sheet:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Cost_sheet}`); + } + + + uploadfiledeletecost_sheet(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet_cardvariable.ts new file mode 100644 index 0000000..865ad72 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Cost_sheet/Cost_sheet_cardvariable.ts @@ -0,0 +1,4 @@ +export const Cost_sheetcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.html new file mode 100644 index 0000000..d807b71 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Gender

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.ts new file mode 100644 index 0000000..0d5ef2e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Genderservice} from './Gender.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 { Gendercardvariable } from './Gender_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Gender', + templateUrl: './Gender.component.html', + styleUrls: ['./Gender.component.scss'] +}) +export class GenderComponent implements OnInit { + cardButton = Gendercardvariable.cardButton; + cardmodeldata = Gendercardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Gendercardvariable.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 = 'Gender_formCode' +tableName = 'Gender'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Genderservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Gender_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.service.ts new file mode 100644 index 0000000..b0eb6c1 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Genderservice{ + private baseURL = "Gender/Gender" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender_cardvariable.ts new file mode 100644 index 0000000..fa7c24b --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Gender/Gender_cardvariable.ts @@ -0,0 +1,4 @@ +export const Gendercardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.html new file mode 100644 index 0000000..8b54e1f --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Nationality

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.ts new file mode 100644 index 0000000..0cd4ecf --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Nationalityservice} from './Nationality.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 { Nationalitycardvariable } from './Nationality_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Nationality', + templateUrl: './Nationality.component.html', + styleUrls: ['./Nationality.component.scss'] +}) +export class NationalityComponent implements OnInit { + cardButton = Nationalitycardvariable.cardButton; + cardmodeldata = Nationalitycardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Nationalitycardvariable.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 = 'Nationality_formCode' +tableName = 'Nationality'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Nationalityservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Nationality_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.service.ts new file mode 100644 index 0000000..8f8c9d2 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Nationalityservice{ + private baseURL = "Nationality/Nationality" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality_cardvariable.ts new file mode 100644 index 0000000..43acac2 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Nationality/Nationality_cardvariable.ts @@ -0,0 +1,4 @@ +export const Nationalitycardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.html new file mode 100644 index 0000000..006372e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Referrer

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.ts new file mode 100644 index 0000000..4435c40 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Referrerservice} from './Referrer.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 { Referrercardvariable } from './Referrer_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Referrer', + templateUrl: './Referrer.component.html', + styleUrls: ['./Referrer.component.scss'] +}) +export class ReferrerComponent implements OnInit { + cardButton = Referrercardvariable.cardButton; + cardmodeldata = Referrercardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Referrercardvariable.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 = 'Referrer_formCode' +tableName = 'Referrer'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Referrerservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Referrer_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.service.ts new file mode 100644 index 0000000..d9a30dc --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Referrerservice{ + private baseURL = "Referrer/Referrer" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer_cardvariable.ts new file mode 100644 index 0000000..6f3ded5 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Referrer/Referrer_cardvariable.ts @@ -0,0 +1,4 @@ +export const Referrercardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.html new file mode 100644 index 0000000..180a4db --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Supplier

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.ts new file mode 100644 index 0000000..affe1fd --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Supplierservice} from './Supplier.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 { Suppliercardvariable } from './Supplier_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Supplier', + templateUrl: './Supplier.component.html', + styleUrls: ['./Supplier.component.scss'] +}) +export class SupplierComponent implements OnInit { + cardButton = Suppliercardvariable.cardButton; + cardmodeldata = Suppliercardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Suppliercardvariable.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 = 'Supplier_formCode' +tableName = 'Supplier'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Supplierservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Supplier_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.service.ts new file mode 100644 index 0000000..6e00cf7 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Supplierservice{ + private baseURL = "Supplier/Supplier" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier_cardvariable.ts new file mode 100644 index 0000000..3f180d3 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Supplier/Supplier_cardvariable.ts @@ -0,0 +1,4 @@ +export const Suppliercardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.html new file mode 100644 index 0000000..6ee38c2 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.html @@ -0,0 +1,497 @@ + +
+
+
+

Visa_Administration

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + Emails + + + + Visa status + + + + Nationality + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + +{{user. emails }} + + +{{user. visa_statusname }} + + +{{user. nationalityname }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.ts new file mode 100644 index 0000000..3ec473a --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.component.ts @@ -0,0 +1,372 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_administrationservice} from './Visa_administration.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 { Visa_administrationcardvariable } from './Visa_administration_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_administration', + templateUrl: './Visa_administration.component.html', + styleUrls: ['./Visa_administration.component.scss'] +}) +export class Visa_administrationComponent implements OnInit { + cardButton = Visa_administrationcardvariable.cardButton; + cardmodeldata = Visa_administrationcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_administrationcardvariable.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 = 'Visa_administration_formCode' +tableName = 'Visa_administration'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_administrationservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + +emails : [null], + +visa_status : [null], + +nationality : [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 === "Visa_administration_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.getallvisa_status(); + +this.getallnationality(); + + + } + + + + + + + + + + + + + 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; } + + + +isValidemails(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); } + +selectvisa_status ; +getallvisa_status() { + this.mainService.getAllvisa_status().subscribe(data=>{ +this.selectvisa_status = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectnationality ; +getallnationality() { + this.mainService.getAllnationality().subscribe(data=>{ +this.selectnationality = data; +console.log(data); +},(error) => { console.log(error); }); } + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.service.ts new file mode 100644 index 0000000..923a676 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration.service.ts @@ -0,0 +1,52 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_administrationservice{ + private baseURL = "Visa_administration/Visa_administration" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + +getAllvisa_status(): Observable { +return this.apiRequest.get("Visa_Status_ListFilter1/Visa_Status_ListFilter1"); } + +getAllnationality(): Observable { +return this.apiRequest.get("Nationality_ListFilter1/Nationality_ListFilter1"); } + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration_cardvariable.ts new file mode 100644 index 0000000..1c23e26 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_administration/Visa_administration_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_administrationcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.html new file mode 100644 index 0000000..f86797d --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.html @@ -0,0 +1,1031 @@ + +
+
+
+

Visa_Application

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + Visa Entry Type + + + + Visa Duration + + + + Visa Processing + + + + Travel start date + + + + Travel end date + + + + passport Number + + + + Passport issue date + + + + Passport expiry date + + + + Email + + + + Phone Number + + + + Birth Place + + + + Date of Birth + + + + Gender + + + + Profession + + + + Visa cost + + + + Referrer + + + + Nationality + + + + Supplier + + + + Agent + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + +{{user. visa_entry_typename }} + + +{{user. visa_durationname }} + + +{{user. visa_processingname }} + + +{{user. travel_start_date }} + + +{{user. travel_end_date }} + + +{{user. passport_number }} + + +{{user. passport_issue_date }} + + +{{user. passport_expiry_date }} + + +{{user. email }} + + +{{user. phone_number }} + + +{{user. birth_place }} + + +{{user. date_of_birth }} + + +{{user. gendername }} + + +{{user. profession }} + + +{{user. visa_cost }} + + +{{user. referrername }} + + +{{user. nationalityname }} + + +{{user. suppliername }} + + +{{user. agentname }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.ts new file mode 100644 index 0000000..f8c6680 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.component.ts @@ -0,0 +1,777 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_applicationservice} from './Visa_application.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 { Visa_applicationcardvariable } from './Visa_application_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_application', + templateUrl: './Visa_application.component.html', + styleUrls: ['./Visa_application.component.scss'] +}) +export class Visa_applicationComponent implements OnInit { + cardButton = Visa_applicationcardvariable.cardButton; + cardmodeldata = Visa_applicationcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_applicationcardvariable.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 = 'Visa_application_formCode' +tableName = 'Visa_application'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_applicationservice, + 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({ +name : [null], + +description : [null], + +active : [false], + +visa_entry_type : [null], + +visa_duration : [null], + +visa_processing : [null], + +travel_start_date : [null], + +travel_end_date : [null], + +passport_number : [null,[Validators.required]], + +passport_issue_date : [null], + +passport_expiry_date : [null], + +email : [null], + +phone_number: ['+91'], + +birth_place : [null], + +date_of_birth : [null], + +gender : [null], + +profession : [null], + +visa_cost : [null, { updateOn: 'blur' }], + +referrer : [null], + +nationality : [null], + +supplier : [null], + +agent : [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 === "Visa_application_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.getallvisa_entry_type(); + +this.getallvisa_duration(); + +this.getallvisa_processing(); + + + + + + + + + + + + + + + + + + + +this.getallgender(); + + + + + +this.getallreferrer(); + +this.getallnationality(); + +this.getallsupplier(); + +this.getallagent(); + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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; } + + + +selectvisa_entry_type ; +getallvisa_entry_type() { + this.mainService.getAllvisa_entry_type().subscribe(data=>{ +this.selectvisa_entry_type = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectvisa_duration ; +getallvisa_duration() { + this.mainService.getAllvisa_duration().subscribe(data=>{ +this.selectvisa_duration = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectvisa_processing ; +getallvisa_processing() { + this.mainService.getAllvisa_processing().subscribe(data=>{ +this.selectvisa_processing = data; +console.log(data); +},(error) => { console.log(error); }); } + + + + + + + + + + + +isValidemail(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); } + +isValidPhone_number(phone: string): boolean { + const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; + return phonePattern.test(phone); +} + + + + + +selectgender ; +getallgender() { + this.mainService.getAllgender().subscribe(data=>{ +this.selectgender = data; +console.log(data); +},(error) => { console.log(error); }); } + + + +//currency field start + formatCurrencyvisa_cost () { + // Format the currency with two decimal places + this.rowSelected.visa_cost = Number(this.rowSelected.visa_cost ).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.visa_cost = this.rowSelected.visa_cost?.replace(/,/g, ''); } + //currency field end + +selectreferrer ; +getallreferrer() { + this.mainService.getAllreferrer().subscribe(data=>{ +this.selectreferrer = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectnationality ; +getallnationality() { + this.mainService.getAllnationality().subscribe(data=>{ +this.selectnationality = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectsupplier ; +getallsupplier() { + this.mainService.getAllsupplier().subscribe(data=>{ +this.selectsupplier = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectagent ; +getallagent() { + this.mainService.getAllagent().subscribe(data=>{ +this.selectagent = data; +console.log(data); +},(error) => { console.log(error); }); } + +// updateaction +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.service.ts new file mode 100644 index 0000000..9a3fb73 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application.service.ts @@ -0,0 +1,85 @@ +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 Visa_applicationservice{ + private baseURL = "Visa_application/Visa_application" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +getAllvisa_entry_type(): Observable { +return this.apiRequest.get("Visa_entry_ListFilter1/Visa_entry_ListFilter1"); } + +getAllvisa_duration(): Observable { +return this.apiRequest.get("Visa_duration_ListFilter1/Visa_duration_ListFilter1"); } + +getAllvisa_processing(): Observable { +return this.apiRequest.get("Visa_Processing_ListFilter1/Visa_Processing_ListFilter1"); } + + + + + + + + + + + + + + + + + + + +getAllgender(): Observable { +return this.apiRequest.get("Gender_ListFilter1/Gender_ListFilter1"); } + + + + + +getAllreferrer(): Observable { +return this.apiRequest.get("Referrer_ListFilter1/Referrer_ListFilter1"); } + +getAllnationality(): Observable { +return this.apiRequest.get("Nationality_ListFilter1/Nationality_ListFilter1"); } + +getAllsupplier(): Observable { +return this.apiRequest.get("Supplier_ListFilter1/Supplier_ListFilter1"); } + +getAllagent(): Observable { +return this.apiRequest.get("Agent_ListFilter1/Agent_ListFilter1"); } + +// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application_cardvariable.ts new file mode 100644 index 0000000..520d8dc --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_application/Visa_application_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_applicationcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.html new file mode 100644 index 0000000..f18b777 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.html @@ -0,0 +1,475 @@ + +
+
+
+

Visa_Bundle

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.ts new file mode 100644 index 0000000..c521f9a --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component.ts @@ -0,0 +1,366 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_bundleservice} from './Visa_bundle.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 { Visa_bundlecardvariable } from './Visa_bundle_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_bundle', + templateUrl: './Visa_bundle.component.html', + styleUrls: ['./Visa_bundle.component.scss'] +}) +export class Visa_bundleComponent implements OnInit { + cardButton = Visa_bundlecardvariable.cardButton; + cardmodeldata = Visa_bundlecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_bundlecardvariable.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 = 'Visa_bundle_formCode' +tableName = 'Visa_bundle'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_bundleservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + + + + + }); // 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 === "Visa_bundle_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.selectedvisa_bundle = []; + this.mainService.uploadfilegetByIdvisa_bundle(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDatavisa_bundle = uploaddata; + + }) + + + 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); + + + + + + +for (let i = 0; i < this.selectedvisa_bundle.length; i++){ + + this.mainService.uploadfilevisa_bundle(data.id,this.tableName,this.selectedvisa_bundle[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + }, (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); + + + + + +for (let i = 0; i < this.selectedvisa_bundle.length; i++){ + + this.mainService.uploadfilevisa_bundle(data.id,this.tableName,this.selectedvisa_bundle[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + + }, (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; + + + + + +this.FileDatavisa_bundle = []; +this.selectedvisa_bundle =[]; + + + } + 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; } + + + +filePreviewvisa_bundle: string | ArrayBuffer | null = null; +FileDatavisa_bundle: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedvisa_bundle: File[]=[]; +public onFileChangedvisa_bundle(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDatavisa_bundle[index].uploadedfile_name = files[i].name; + this.selectedvisa_bundle.push(files[i]); + if (file.type.startsWith('file/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDatavisa_bundle[index] = { + ...this.FileDatavisa_bundle[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } +} + onAddLinesvisa_bundle(){ + this.FileDatavisa_bundle.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowvisa_bundle(index,id) { + this.FileDatavisa_bundle.splice(index, 1); + + if(id){ + this.mainService.uploadfiledeletevisa_bundle(id).subscribe(data =>{ + console.log(data); + }) + } + } + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.service.ts new file mode 100644 index 0000000..9dfd853 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle.service.ts @@ -0,0 +1,59 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_bundleservice{ + private baseURL = "Visa_bundle/Visa_bundle" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + uploadfilevisa_bundle(ref:any, Visa_bundle:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Visa_bundle}`, formData); + } + + uploadfilegetByIdvisa_bundle(ref:any, Visa_bundle:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Visa_bundle}`); + } + + + uploadfiledeletevisa_bundle(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle_cardvariable.ts new file mode 100644 index 0000000..a160bc7 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_bundle/Visa_bundle_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_bundlecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.html new file mode 100644 index 0000000..34737b2 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Visa_duration

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.ts new file mode 100644 index 0000000..cf016d9 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_durationservice} from './Visa_duration.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 { Visa_durationcardvariable } from './Visa_duration_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_duration', + templateUrl: './Visa_duration.component.html', + styleUrls: ['./Visa_duration.component.scss'] +}) +export class Visa_durationComponent implements OnInit { + cardButton = Visa_durationcardvariable.cardButton; + cardmodeldata = Visa_durationcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_durationcardvariable.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 = 'Visa_duration_formCode' +tableName = 'Visa_duration'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_durationservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Visa_duration_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.service.ts new file mode 100644 index 0000000..aaead2c --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_durationservice{ + private baseURL = "Visa_duration/Visa_duration" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration_cardvariable.ts new file mode 100644 index 0000000..e3c3f89 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_duration/Visa_duration_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_durationcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.html new file mode 100644 index 0000000..4369a3e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Visa_entry

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.ts new file mode 100644 index 0000000..7d08a39 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_entryservice} from './Visa_entry.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 { Visa_entrycardvariable } from './Visa_entry_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_entry', + templateUrl: './Visa_entry.component.html', + styleUrls: ['./Visa_entry.component.scss'] +}) +export class Visa_entryComponent implements OnInit { + cardButton = Visa_entrycardvariable.cardButton; + cardmodeldata = Visa_entrycardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_entrycardvariable.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 = 'Visa_entry_formCode' +tableName = 'Visa_entry'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_entryservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Visa_entry_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.service.ts new file mode 100644 index 0000000..ab3cd79 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_entryservice{ + private baseURL = "Visa_entry/Visa_entry" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry_cardvariable.ts new file mode 100644 index 0000000..66fe8d9 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_entry/Visa_entry_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_entrycardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.html new file mode 100644 index 0000000..800f41e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.html @@ -0,0 +1,568 @@ + +
+
+
+

Visa_Prices

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + Visa Entry type + + + + Visa Duration + + + + Visa Processing + + + + Total Price + + + + Cost + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + +{{user. visa_entry_typename }} + + +{{user. visa_durationname }} + + +{{user. visa_processingname }} + + +{{user. total_price }} + + +{{user. cost }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.ts new file mode 100644 index 0000000..efd828c --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.component.ts @@ -0,0 +1,435 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_pricesservice} from './Visa_prices.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 { Visa_pricescardvariable } from './Visa_prices_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_prices', + templateUrl: './Visa_prices.component.html', + styleUrls: ['./Visa_prices.component.scss'] +}) +export class Visa_pricesComponent implements OnInit { + cardButton = Visa_pricescardvariable.cardButton; + cardmodeldata = Visa_pricescardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_pricescardvariable.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 = 'Visa_prices_formCode' +tableName = 'Visa_prices'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_pricesservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + +visa_entry_type : [null], + +visa_duration : [null], + +visa_processing : [null], + +total_price : [null, { updateOn: 'blur' }], + +cost : [null, { updateOn: 'blur' }], + + + + + + + + + + + + + + + + + + + }); // 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 === "Visa_prices_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.getallvisa_entry_type(); + +this.getallvisa_duration(); + +this.getallvisa_processing(); + + + + + + + } + + + + + + + + + + + + + + + + + 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; } + + + +selectvisa_entry_type ; +getallvisa_entry_type() { + this.mainService.getAllvisa_entry_type().subscribe(data=>{ +this.selectvisa_entry_type = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectvisa_duration ; +getallvisa_duration() { + this.mainService.getAllvisa_duration().subscribe(data=>{ +this.selectvisa_duration = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectvisa_processing ; +getallvisa_processing() { + this.mainService.getAllvisa_processing().subscribe(data=>{ +this.selectvisa_processing = data; +console.log(data); +},(error) => { console.log(error); }); } + +//currency field start + formatCurrencytotal_price () { + // Format the currency with two decimal places + this.rowSelected.total_price = Number(this.rowSelected.total_price ).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.total_price = this.rowSelected.total_price?.replace(/,/g, ''); } + //currency field end + +//currency field start + formatCurrencycost () { + // Format the currency with two decimal places + this.rowSelected.cost = Number(this.rowSelected.cost ).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.cost = this.rowSelected.cost?.replace(/,/g, ''); } + //currency field end + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.service.ts new file mode 100644 index 0000000..4ccee06 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices.service.ts @@ -0,0 +1,57 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_pricesservice{ + private baseURL = "Visa_prices/Visa_prices" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +getAllvisa_entry_type(): Observable { +return this.apiRequest.get("Visa_entry_ListFilter1/Visa_entry_ListFilter1"); } + +getAllvisa_duration(): Observable { +return this.apiRequest.get("Visa_duration_ListFilter1/Visa_duration_ListFilter1"); } + +getAllvisa_processing(): Observable { +return this.apiRequest.get("Visa_Processing_ListFilter1/Visa_Processing_ListFilter1"); } + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices_cardvariable.ts new file mode 100644 index 0000000..0ca2c5e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_prices/Visa_prices_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_pricescardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.html new file mode 100644 index 0000000..25b2af8 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.html @@ -0,0 +1,382 @@ + +
+
+
+

Visa_Processing

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.ts new file mode 100644 index 0000000..7d14ab1 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.component.ts @@ -0,0 +1,288 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_processingservice} from './Visa_processing.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 { Visa_processingcardvariable } from './Visa_processing_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_processing', + templateUrl: './Visa_processing.component.html', + styleUrls: ['./Visa_processing.component.scss'] +}) +export class Visa_processingComponent implements OnInit { + cardButton = Visa_processingcardvariable.cardButton; + cardmodeldata = Visa_processingcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_processingcardvariable.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 = 'Visa_processing_formCode' +tableName = 'Visa_processing'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_processingservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute ) { } +// 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Visa_processing_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; } + + + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.service.ts new file mode 100644 index 0000000..ed2f4d6 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing.service.ts @@ -0,0 +1,44 @@ +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'; +import baseUrl from 'src/app/services/api/helper'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_processingservice{ + private baseURL = "Visa_processing/Visa_processing" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +downloadCSV(tableName: string): Observable { + const url = `${baseUrl}/api/template/download-csv?tableName=${tableName}`; + return this.http.get(url, { responseType: 'blob' }) + +}// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing_cardvariable.ts new file mode 100644 index 0000000..8014a5e --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_processing/Visa_processing_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_processingcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.html new file mode 100644 index 0000000..1f6fe3b --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.html @@ -0,0 +1,375 @@ + +
+
+
+

Visa_Status

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user. name }} + + + + + + +{{user. active }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.ts new file mode 100644 index 0000000..cc44f35 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.component.ts @@ -0,0 +1,270 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Visa_statusservice} from './Visa_status.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 { Visa_statuscardvariable } from './Visa_status_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Visa_status', + templateUrl: './Visa_status.component.html', + styleUrls: ['./Visa_status.component.scss'] +}) +export class Visa_statusComponent implements OnInit { + cardButton = Visa_statuscardvariable.cardButton; + cardmodeldata = Visa_statuscardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Visa_statuscardvariable.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 = 'Visa_status_formCode' +tableName = 'Visa_status'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Visa_statusservice, + 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({ +name : [null], + +description : [null], + +active : [false], + + + + + + + + + }); // 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 === "Visa_status_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + } + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + +// updateaction +} + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.service.ts new file mode 100644 index 0000000..2e104b7 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Visa_statusservice{ + private baseURL = "Visa_status/Visa_status" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + +// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status_cardvariable.ts new file mode 100644 index 0000000..d5012d6 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/vpspack/Visa_status/Visa_status_cardvariable.ts @@ -0,0 +1,4 @@ +export const Visa_statuscardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index c7450e8..091e602 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,17 @@ +import { Visa_administrationComponent } from './BuilderComponents/vpspack/Visa_administration/Visa_administration.component'; +import { Visa_statusComponent } from './BuilderComponents/vpspack/Visa_status/Visa_status.component'; +import { Cost_sheetComponent } from './BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component'; +import { Visa_bundleComponent } from './BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component'; +import { AgentComponent } from './BuilderComponents/vpspack/Agent/Agent.component'; +import { SupplierComponent } from './BuilderComponents/vpspack/Supplier/Supplier.component'; +import { NationalityComponent } from './BuilderComponents/vpspack/Nationality/Nationality.component'; +import { ReferrerComponent } from './BuilderComponents/vpspack/Referrer/Referrer.component'; +import { GenderComponent } from './BuilderComponents/vpspack/Gender/Gender.component'; +import { Visa_processingComponent } from './BuilderComponents/vpspack/Visa_processing/Visa_processing.component'; +import { Visa_pricesComponent } from './BuilderComponents/vpspack/Visa_prices/Visa_prices.component'; +import { Visa_entryComponent } from './BuilderComponents/vpspack/Visa_entry/Visa_entry.component'; +import { Visa_durationComponent } from './BuilderComponents/vpspack/Visa_duration/Visa_duration.component'; +import { Visa_applicationComponent } from './BuilderComponents/vpspack/Visa_application/Visa_application.component'; @@ -258,6 +272,48 @@ const routes: Routes = [ // buildercomponents +{path:'Visa_administration',component:Visa_administrationComponent}, + + +{path:'Visa_status',component:Visa_statusComponent}, + + +{path:'Cost_sheet',component:Cost_sheetComponent}, + + +{path:'Visa_bundle',component:Visa_bundleComponent}, + + +{path:'Agent',component:AgentComponent}, + + +{path:'Supplier',component:SupplierComponent}, + + +{path:'Nationality',component:NationalityComponent}, + + +{path:'Referrer',component:ReferrerComponent}, + + +{path:'Gender',component:GenderComponent}, + + +{path:'Visa_processing',component:Visa_processingComponent}, + + +{path:'Visa_prices',component:Visa_pricesComponent}, + + +{path:'Visa_entry',component:Visa_entryComponent}, + + +{path:'Visa_duration',component:Visa_durationComponent}, + + +{path:'Visa_application',component:Visa_applicationComponent}, + + { path: '**', component: PageNotFoundComponent }, diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index dacaf40..4463c5e 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,17 @@ +import { Visa_administrationComponent } from './BuilderComponents/vpspack/Visa_administration/Visa_administration.component'; +import { Visa_statusComponent } from './BuilderComponents/vpspack/Visa_status/Visa_status.component'; +import { Cost_sheetComponent } from './BuilderComponents/vpspack/Cost_sheet/Cost_sheet.component'; +import { Visa_bundleComponent } from './BuilderComponents/vpspack/Visa_bundle/Visa_bundle.component'; +import { AgentComponent } from './BuilderComponents/vpspack/Agent/Agent.component'; +import { SupplierComponent } from './BuilderComponents/vpspack/Supplier/Supplier.component'; +import { NationalityComponent } from './BuilderComponents/vpspack/Nationality/Nationality.component'; +import { ReferrerComponent } from './BuilderComponents/vpspack/Referrer/Referrer.component'; +import { GenderComponent } from './BuilderComponents/vpspack/Gender/Gender.component'; +import { Visa_processingComponent } from './BuilderComponents/vpspack/Visa_processing/Visa_processing.component'; +import { Visa_pricesComponent } from './BuilderComponents/vpspack/Visa_prices/Visa_prices.component'; +import { Visa_entryComponent } from './BuilderComponents/vpspack/Visa_entry/Visa_entry.component'; +import { Visa_durationComponent } from './BuilderComponents/vpspack/Visa_duration/Visa_duration.component'; +import { Visa_applicationComponent } from './BuilderComponents/vpspack/Visa_application/Visa_application.component'; import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; @@ -126,6 +140,48 @@ import { QueryeditComponent } from './superadmin/queryedit/queryedit.component'; // buildercomponents +Visa_administrationComponent, + + +Visa_statusComponent, + + +Cost_sheetComponent, + + +Visa_bundleComponent, + + +AgentComponent, + + +SupplierComponent, + + +NationalityComponent, + + +ReferrerComponent, + + +GenderComponent, + + +Visa_processingComponent, + + +Visa_pricesComponent, + + +Visa_entryComponent, + + +Visa_durationComponent, + + +Visa_applicationComponent, + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index 3d60440..5a674d5 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -1,4 +1,4 @@ -{ + { "BREADCRUMB_HOME": "Home", "USER_GROUP_MAINTENANCE": "User Group Maintenance", "BREADCRUMB_ABOUT_US": "About Us", @@ -17,23 +17,25 @@ "IMPORT": "Import", "EXPORT_XLSX": "Export as XLSX", "ADD": "Add", - "MENU_ACCESS_CONTROL": "Menu Access Control", - "EDIT_MODE": "Edit Mode", - "FOR": "For", - "RELOAD": "Reload", - "SHOW_ALL": "Show All", - "ONLY_MAIN_MENU": "Only Main Menu", - "NO_DATA_AVAILABLE": "No data available", - "NO": "No", - "MENU_ITEM_NAME": "Menu Item Name", - "VIEW": "View", - "CREATE": "Create", - "EDIT": "Edit", - "DELETE": "Delete", - "QUERY": "Query", - "EXPORT": "Export", - "SYNC": "Sync", - "editMode": "Edit Mode", + + "MENU_ACCESS_CONTROL": "Menu Access Control", + "EDIT_MODE": "Edit Mode", + "FOR": "For", + "RELOAD": "Reload", + "SHOW_ALL": "Show All", + "ONLY_MAIN_MENU": "Only Main Menu", + + "NO_DATA_AVAILABLE": "No data available", + "NO": "No", + "MENU_ITEM_NAME": "Menu Item Name", + "VIEW": "View", + "CREATE": "Create", + "EDIT": "Edit", + "DELETE": "Delete", + "QUERY": "Query", + "EXPORT": "Export", + "SYNC": "Sync", + "editMode": "Edit Mode", "setupCode": "Setup Code", "value": "Value", "schedulerTimer": "Scheduler Timer", @@ -60,9 +62,11 @@ "oidAdminUserTooltip": "Admin user for OID access", "oidServerPort": "OID Server Port", "oidServerPortTooltip": "Port number for the OID server", - "companyDisplayName": "Company Display Name", + + + "companyDisplayName": "Company Display Name", "systemParameter": "System Parameter", - "userDefaultGroup": "User Default Group", + "userDefaultGroup": "User Default Group", "defaultDepartment": "Default Department", "defaultPosition": "Default Position", "singleCharge": "Single Charge", @@ -93,45 +97,49 @@ "areYouSureDelete": "Are You Sure Want to delete?", "updateAccessType": "Update Access Type", "update": "Update", - "SEQ_GENERATOR": "Sequence Generator", - "CURRENT_NO": "Current No", - "NAME": "Name", - "PREFIX": "Prefix", - "SEPARATOR": "Separator", - "SEQUENCE_SIZE": "Sequence Size", - "REPORT": "Report", - "REPORT_RUNNER": "Report Runner", - "REPORT_NAME": "Report Name", - "REPORT_DESCRIPTION": "Report Description", - "API_REGISTERY": "Api Registery", - "API_REGISTERY_DESCRIPTION": "Api Registery Description", - "ACTIVE": "Active", - "FOLDER_NAME": "Folder Name", - "ACTION": "Action", - "SET_UP": "Set Up", - "USERS_PER_PAGE": "Users per page", - "OF": "of", - "USERS": "users", - "ARE_YOU_SURE": "Are you sure you want to delete?", - "CANCEL": "Cancel", - "GO_TO": "Go To", - "ALL_REPORTS": "All Reports", - "ALL_REPORT": "All Report", - "REPORT_BUILDER_SQL": "Report Builder (SQL)", - "REPORT_BUILDER_URL": "Report Builder (URL)", - "LOADING_MESSAGE": "Dashboard could be found. Loading..", - "START_FROM_SCRATCH": "Start from scratch", - "IMPORT_TEMPLATE": "Import from a template", - "IMPORT_PUBLIC_PROJECT": "Import from public project", - "DELETE_CONFIRMATION": "Are You Sure Want to delete?", - "LAST_UPDATED_ON": "Last Updated On:", - "CREATE_NEW_REPORT": "Create New Report", - "ADD_MODE": "Add Mode", - "ENTER_NAME": "Enter name", - "DESCRIPTION": "Description", - "ENTER_DESCRIPTION": "Enter Description", - "SUBMIT": "Submit", - "home": "Home", + + "SEQ_GENERATOR": "Sequence Generator", + "CURRENT_NO": "Current No", + "NAME": "Name", + "PREFIX": "Prefix", + "SEPARATOR": "Separator", + "SEQUENCE_SIZE": "Sequence Size", + "REPORT": "Report", + "REPORT_RUNNER": "Report Runner", + + "REPORT_NAME": "Report Name", + "REPORT_DESCRIPTION": "Report Description", + "ACTIVE": "Active", + "FOLDER_NAME": "Folder Name", + "ACTION": "Action", + "SET_UP": "Set Up", + + "USERS_PER_PAGE": "Users per page", + "OF": "of", + "USERS": "users", + "ARE_YOU_SURE": "Are you sure you want to delete?", + "CANCEL": "Cancel", + "GO_TO": "Go To", + "ALL_REPORTS": "All Reports", + "ALL_REPORT": "All Report", + "REPORT_BUILDER_SQL": "Report Builder (SQL)", + "REPORT_BUILDER_URL": "Report Builder (URL)", + "LOADING_MESSAGE": "Dashboard could be found. Loading..", + "START_FROM_SCRATCH": "Start from scratch", + "IMPORT_TEMPLATE": "Import from a template", + "IMPORT_PUBLIC_PROJECT": "Import from public project", + "DELETE_CONFIRMATION": "Are You Sure Want to delete?", + + "LAST_UPDATED_ON": "Last Updated On:", + "CREATE_NEW_REPORT": "Create New Report", + "ADD_MODE": "Add Mode", + + "ENTER_NAME": "Enter name", + "DESCRIPTION": "Description", + "ENTER_DESCRIPTION": "Enter Description", + + "SUBMIT": "Submit", + "home": "Home", "dashboard": "Dashboard", "all_dashboard": "All Dashboard", "dashboard_builder": "Dashboard Builder", @@ -203,8 +211,10 @@ "GROUP_LEVEL": "Group Level", "STATUS": "Status", "UPDATED_DATE": "Updated Date", + "RECORDS_PER_PAGE": "Record per page", "IMPORT_FILE": "Import File", + "UPDATE": "Update", "ARE_YOU_SURE_DELETE": "Are You Sure Want to delete?", "THIS_FIELD_REQUIRED": "*This field is Required", @@ -216,10 +226,40 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Stt": "Stt", - "OneToManyExtension": "OneToManyExtension", - "studentname": "studentname", - "description": "description", - "Studenthigh": "Studenthigh", - "Name": "Name" + "Visa_Entry_type": "Visa_Entry_type", + "Description": "Description", + "Email": "Email", + "Phone_Number": "Phone_Number", + "Gender": "Gender", + "Cost": "Cost", + "Cost_sheet": "Cost_sheet", + "Name": "Name", + "Travel_end_date": "Travel_end_date", + "Visa_processing": "Visa_processing", + "Visa_status": "Visa_status", + "Birth_Place": "Birth_Place", + "Visa_Entry_Type": "Visa_Entry_Type", + "Visa_entry": "Visa_entry", + "Travel_start_date": "Travel_start_date", + "Visa_administration": "Visa_administration", + "Supplier": "Supplier", + "Emails": "Emails", + "Visa_cost": "Visa_cost", + "Total_Price": "Total_Price", + "Agent": "Agent", + "Visa_prices": "Visa_prices", + "Visa_Processing": "Visa_Processing", + "Date_of_Birth": "Date_of_Birth", + "Visa_application": "Visa_application", + "Visa_Duration": "Visa_Duration", + "Visa_duration": "Visa_duration", + "Nationality": "Nationality", + "passport_Number": "passport_Number", + "Active": "Active", + "Profession": "Profession", + "Visa_bundle": "Visa_bundle", + "Passport_expiry_date": "Passport_expiry_date", + "Referrer": "Referrer", + "Visa_Bundle": "Visa_Bundle", + "Passport_issue_date": "Passport_issue_date" } \ No newline at end of file diff --git a/visaproject-visaapp-d/authsec_mysql/mysql/wf_table/wf_table.sql b/visaproject-visaapp-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..03074fb --- /dev/null +++ b/visaproject-visaapp-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,28 @@ +CREATE TABLE visaapp.Visa_application(id BIGINT NOT NULL AUTO_INCREMENT, agent int, visa_processing int, description VARCHAR(400), email VARCHAR(400), date_of_birth Date, visa_duration int, phone_number VARCHAR(400), gender int, nationality int, name VARCHAR(400), travel_end_date Date, passport_number int, active VARCHAR(400), birth_place VARCHAR(400), profession VARCHAR(400), visa_entry_type int, travel_start_date Date, passport_expiry_date Date, referrer int, supplier int, passport_issue_date Date, visa_cost VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_duration(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_entry(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_prices(id BIGINT NOT NULL AUTO_INCREMENT, visa_entry_type int, active VARCHAR(400), visa_processing int, description VARCHAR(400), visa_duration int, cost VARCHAR(400), name VARCHAR(400), total_price VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_processing(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Gender(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Referrer(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Nationality(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Supplier(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Agent(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_bundle(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), visa_bundle VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Cost_sheet(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), cost_sheet VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_status(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE visaapp.Visa_administration(id BIGINT NOT NULL AUTO_INCREMENT, visa_status int, active VARCHAR(400), description VARCHAR(400), emails VARCHAR(400), nationality int, name VARCHAR(400), PRIMARY KEY (id)); +