diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index f9801fb..ab706f5 100644 --- a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,18 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Add_new_subscription","Add_new_subscription", "Transcations"); + + +addCustomMenu( "Category","Category", "Master"); + + +addCustomMenu( "Duration_type","Duration_type", "Master"); + + +addCustomMenu( "Subscription_type","Subscription_type", "Master"); + + System.out.println("dashboard and menu inserted..."); diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Add_new_subscriptionController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Add_new_subscriptionController.java new file mode 100644 index 0000000..687bdc8 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Add_new_subscriptionController.java @@ -0,0 +1,139 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Add_new_subscription; +import com.realnet.basicp1.Services.Add_new_subscriptionService ; + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Add_new_subscription") + @CrossOrigin("*") +@RestController +public class Add_new_subscriptionController { + @Autowired + private Add_new_subscriptionService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + @PostMapping("/Add_new_subscription") + public Add_new_subscription Savedata(@RequestBody Add_new_subscription data) { + Add_new_subscription save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Add_new_subscription/{id}") + public Add_new_subscription update(@RequestBody Add_new_subscription data,@PathVariable Integer id ) { + Add_new_subscription update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Add_new_subscription/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("/Add_new_subscription") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Add_new_subscription") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Add_new_subscription/{id}") + public Add_new_subscription getdetailsbyId(@PathVariable Integer id ) { + Add_new_subscription get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Add_new_subscription/{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/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/CategoryController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/CategoryController.java new file mode 100644 index 0000000..6fec3dd --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/CategoryController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Category; +import com.realnet.basicp1.Services.CategoryService ; + + +@RequestMapping(value = "/Category") + @CrossOrigin("*") +@RestController +public class CategoryController { + @Autowired + private CategoryService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Category") + public Category Savedata(@RequestBody Category data) { + Category save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Category/{id}") + public Category update(@RequestBody Category data,@PathVariable Integer id ) { + Category update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Category/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("/Category") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Category") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Category/{id}") + public Category getdetailsbyId(@PathVariable Integer id ) { + Category get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Category/{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/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Category_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Category_ListFilter1Controller.java new file mode 100644 index 0000000..143c869 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Category_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Category_ListFilter1; +import com.realnet.basicp1.Services.Category_ListFilter1Service ; +@RequestMapping(value = "/Category_ListFilter1") +@RestController +public class Category_ListFilter1Controller { + + @Autowired + private Category_ListFilter1Service Service; + + @GetMapping("/Category_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Category_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_typeController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_typeController.java new file mode 100644 index 0000000..b358284 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_typeController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Duration_type; +import com.realnet.basicp1.Services.Duration_typeService ; + + +@RequestMapping(value = "/Duration_type") + @CrossOrigin("*") +@RestController +public class Duration_typeController { + @Autowired + private Duration_typeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Duration_type") + public Duration_type Savedata(@RequestBody Duration_type data) { + Duration_type save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Duration_type/{id}") + public Duration_type update(@RequestBody Duration_type data,@PathVariable Integer id ) { + Duration_type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Duration_type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Duration_type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Duration_type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Duration_type/{id}") + public Duration_type getdetailsbyId(@PathVariable Integer id ) { + Duration_type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Duration_type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_type_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_type_ListFilter1Controller.java new file mode 100644 index 0000000..fb31abe --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Duration_type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Duration_type_ListFilter1; +import com.realnet.basicp1.Services.Duration_type_ListFilter1Service ; +@RequestMapping(value = "/Duration_type_ListFilter1") +@RestController +public class Duration_type_ListFilter1Controller { + + @Autowired + private Duration_type_ListFilter1Service Service; + + @GetMapping("/Duration_type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Duration_type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_typeController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_typeController.java new file mode 100644 index 0000000..e1fcc14 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_typeController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Subscription_type; +import com.realnet.basicp1.Services.Subscription_typeService ; + + +@RequestMapping(value = "/Subscription_type") + @CrossOrigin("*") +@RestController +public class Subscription_typeController { + @Autowired + private Subscription_typeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Subscription_type") + public Subscription_type Savedata(@RequestBody Subscription_type data) { + Subscription_type save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Subscription_type/{id}") + public Subscription_type update(@RequestBody Subscription_type data,@PathVariable Integer id ) { + Subscription_type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Subscription_type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Subscription_type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Subscription_type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Subscription_type/{id}") + public Subscription_type getdetailsbyId(@PathVariable Integer id ) { + Subscription_type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Subscription_type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_type_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_type_ListFilter1Controller.java new file mode 100644 index 0000000..9bcbba3 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Subscription_type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Subscription_type_ListFilter1; +import com.realnet.basicp1.Services.Subscription_type_ListFilter1Service ; +@RequestMapping(value = "/Subscription_type_ListFilter1") +@RestController +public class Subscription_type_ListFilter1Controller { + + @Autowired + private Subscription_type_ListFilter1Service Service; + + @GetMapping("/Subscription_type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Subscription_type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Add_new_subscriptionController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Add_new_subscriptionController.java new file mode 100644 index 0000000..bfb9a3a --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Add_new_subscriptionController.java @@ -0,0 +1,139 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Add_new_subscription; +import com.realnet.basicp1.Services.Add_new_subscriptionService ; + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Add_new_subscription") + @CrossOrigin("*") +@RestController +public class tokenFree_Add_new_subscriptionController { + @Autowired + private Add_new_subscriptionService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + @PostMapping("/Add_new_subscription") + public Add_new_subscription Savedata(@RequestBody Add_new_subscription data) { + Add_new_subscription save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Add_new_subscription/{id}") + public Add_new_subscription update(@RequestBody Add_new_subscription data,@PathVariable Integer id ) { + Add_new_subscription update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Add_new_subscription/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("/Add_new_subscription") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Add_new_subscription") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Add_new_subscription/{id}") + public Add_new_subscription getdetailsbyId(@PathVariable Integer id ) { + Add_new_subscription get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Add_new_subscription/{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/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_CategoryController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_CategoryController.java new file mode 100644 index 0000000..773b49c --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_CategoryController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Category; +import com.realnet.basicp1.Services.CategoryService ; + + +@RequestMapping(value = "/token/Category") + @CrossOrigin("*") +@RestController +public class tokenFree_CategoryController { + @Autowired + private CategoryService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Category") + public Category Savedata(@RequestBody Category data) { + Category save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Category/{id}") + public Category update(@RequestBody Category data,@PathVariable Integer id ) { + Category update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Category/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("/Category") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Category") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Category/{id}") + public Category getdetailsbyId(@PathVariable Integer id ) { + Category get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Category/{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/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Category_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Category_ListFilter1Controller.java new file mode 100644 index 0000000..adac7d1 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Category_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Category_ListFilter1; +import com.realnet.basicp1.Services.Category_ListFilter1Service ; +@RequestMapping(value = "/token/Category_ListFilter1") +@RestController +public class tokenFree_Category_ListFilter1Controller { + + @Autowired + private Category_ListFilter1Service Service; + + @GetMapping("/Category_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Category_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_typeController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_typeController.java new file mode 100644 index 0000000..f22811a --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_typeController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Duration_type; +import com.realnet.basicp1.Services.Duration_typeService ; + + +@RequestMapping(value = "/token/Duration_type") + @CrossOrigin("*") +@RestController +public class tokenFree_Duration_typeController { + @Autowired + private Duration_typeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Duration_type") + public Duration_type Savedata(@RequestBody Duration_type data) { + Duration_type save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Duration_type/{id}") + public Duration_type update(@RequestBody Duration_type data,@PathVariable Integer id ) { + Duration_type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Duration_type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Duration_type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Duration_type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Duration_type/{id}") + public Duration_type getdetailsbyId(@PathVariable Integer id ) { + Duration_type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Duration_type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_type_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_type_ListFilter1Controller.java new file mode 100644 index 0000000..9aef3ea --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Duration_type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Duration_type_ListFilter1; +import com.realnet.basicp1.Services.Duration_type_ListFilter1Service ; +@RequestMapping(value = "/token/Duration_type_ListFilter1") +@RestController +public class tokenFree_Duration_type_ListFilter1Controller { + + @Autowired + private Duration_type_ListFilter1Service Service; + + @GetMapping("/Duration_type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Duration_type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_typeController.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_typeController.java new file mode 100644 index 0000000..4ef19de --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_typeController.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Subscription_type; +import com.realnet.basicp1.Services.Subscription_typeService ; + + +@RequestMapping(value = "/token/Subscription_type") + @CrossOrigin("*") +@RestController +public class tokenFree_Subscription_typeController { + @Autowired + private Subscription_typeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Subscription_type") + public Subscription_type Savedata(@RequestBody Subscription_type data) { + Subscription_type save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Subscription_type/{id}") + public Subscription_type update(@RequestBody Subscription_type data,@PathVariable Integer id ) { + Subscription_type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Subscription_type/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Subscription_type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Subscription_type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Subscription_type/{id}") + public Subscription_type getdetailsbyId(@PathVariable Integer id ) { + Subscription_type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Subscription_type/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_type_ListFilter1Controller.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_type_ListFilter1Controller.java new file mode 100644 index 0000000..e6db826 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Subscription_type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Subscription_type_ListFilter1; +import com.realnet.basicp1.Services.Subscription_type_ListFilter1Service ; +@RequestMapping(value = "/token/Subscription_type_ListFilter1") +@RestController +public class tokenFree_Subscription_type_ListFilter1Controller { + + @Autowired + private Subscription_type_ListFilter1Service Service; + + @GetMapping("/Subscription_type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Subscription_type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Add_new_subscription.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Add_new_subscription.java new file mode 100644 index 0000000..544a166 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Add_new_subscription.java @@ -0,0 +1,60 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + @Entity + @Data + public class Add_new_subscription extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +private String price; + +private String renewal_date; + +private String duration; +private String durationname; + +private String type; +private String typename; + +private String category; +private String categoryname; + + + + +private boolean email; + + + +private String email_field; + + +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category.java new file mode 100644 index 0000000..653b524 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + @Entity + @Data + public class Category extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String category; + + +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category_ListFilter1.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category_ListFilter1.java new file mode 100644 index 0000000..2764268 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Category_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.basicp1.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Category_ListFilter1 { + + private Integer id; + + + private String category; +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type.java new file mode 100644 index 0000000..dcb9bcc --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + @Entity + @Data + public class Duration_type extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String duration; + + +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type_ListFilter1.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type_ListFilter1.java new file mode 100644 index 0000000..17e5b76 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Duration_type_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.basicp1.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Duration_type_ListFilter1 { + + private Integer id; + + + private String duration; +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type.java new file mode 100644 index 0000000..ba18671 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + @Entity + @Data + public class Subscription_type extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String type; + + +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type_ListFilter1.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type_ListFilter1.java new file mode 100644 index 0000000..01be31b --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Subscription_type_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.basicp1.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Subscription_type_ListFilter1 { + + private Integer id; + + + private String type; +} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Add_new_subscriptionRepository.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Add_new_subscriptionRepository.java new file mode 100644 index 0000000..b9d3834 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Add_new_subscriptionRepository.java @@ -0,0 +1,40 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Add_new_subscription; + +@Repository +public interface Add_new_subscriptionRepository extends JpaRepository { + +@Query(value = "select * from add_new_subscription where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from add_new_subscription where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/CategoryRepository.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/CategoryRepository.java new file mode 100644 index 0000000..8979dc0 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/CategoryRepository.java @@ -0,0 +1,26 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + +import com.realnet.basicp1.Entity.Category; + +@Repository +public interface CategoryRepository extends JpaRepository { + +@Query(value = "select * from category where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from category where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Duration_typeRepository.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Duration_typeRepository.java new file mode 100644 index 0000000..0b214b8 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Duration_typeRepository.java @@ -0,0 +1,26 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + +import com.realnet.basicp1.Entity.Duration_type; + +@Repository +public interface Duration_typeRepository extends JpaRepository { + +@Query(value = "select * from duration_type where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from duration_type where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Subscription_typeRepository.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Subscription_typeRepository.java new file mode 100644 index 0000000..8ff1086 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Subscription_typeRepository.java @@ -0,0 +1,26 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + +import com.realnet.basicp1.Entity.Subscription_type; + +@Repository +public interface Subscription_typeRepository extends JpaRepository { + +@Query(value = "select * from subscription_type where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from subscription_type where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Add_new_subscriptionService.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Add_new_subscriptionService.java new file mode 100644 index 0000000..ad6ac60 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Add_new_subscriptionService.java @@ -0,0 +1,215 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Add_new_subscriptionRepository; +import com.realnet.basicp1.Entity.Add_new_subscription +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + +import com.realnet.basicp1.Entity.Duration_type; +import com.realnet.basicp1.Services.Duration_typeService; + + + +import com.realnet.basicp1.Entity.Subscription_type; +import com.realnet.basicp1.Services.Subscription_typeService; + + + +import com.realnet.basicp1.Entity.Duration_type; +import com.realnet.basicp1.Services.Duration_typeService; + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Add_new_subscriptionService { +@Autowired +private Add_new_subscriptionRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +@Autowired + private Duration_typeService durationserv; + +@Autowired + private Subscription_typeService typeserv; + +@Autowired + private Duration_typeService categoryserv; + + + + + +public Add_new_subscription Savedata(Add_new_subscription data) { + + + + + + + + +if (data.getDuration() != null) { + try { + int durationId = Integer.valueOf(data.getDuration()); +Duration_type get = durationserv.getdetailsbyId(durationId); + if (get != null) { + + data.setDurationname(get.getDuration()); +} +} catch (NumberFormatException e) { + System.out.println(" durationId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + +if (data.getType() != null) { + try { + int typeId = Integer.valueOf(data.getType()); +Subscription_type get = typeserv.getdetailsbyId(typeId); + if (get != null) { + + data.setTypename(get.getType()); +} +} catch (NumberFormatException e) { + System.out.println(" typeId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + +if (data.getCategory() != null) { + try { + int categoryId = Integer.valueOf(data.getCategory()); +Duration_type get = categoryserv.getdetailsbyId(categoryId); + if (get != null) { + + data.setCategoryname(get.getDuration()); +} +} catch (NumberFormatException e) { + System.out.println(" categoryId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Add_new_subscription 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 Add_new_subscription getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Add_new_subscription update(Add_new_subscription data,Integer id) { + Add_new_subscription old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setPrice(data.getPrice()); + +old.setRenewal_date(data.getRenewal_date()); + +old.setDuration(data.getDuration()); + +old.setType(data.getType()); + +old.setCategory(data.getCategory()); + + + +old.setEmail(data.isEmail()); + + + + + +old.setEmail_field(data.getEmail_field()); + +final Add_new_subscription test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/CategoryService.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/CategoryService.java new file mode 100644 index 0000000..094c45a --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/CategoryService.java @@ -0,0 +1,73 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.CategoryRepository; +import com.realnet.basicp1.Entity.Category +;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 CategoryService { +@Autowired +private CategoryRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + +public Category Savedata(Category data) { + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Category 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 Category getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Category update(Category data,Integer id) { + Category old = Repository.findById(id).get(); +old.setCategory(data.getCategory()); + +final Category test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Category_ListFilter1Service.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Category_ListFilter1Service.java new file mode 100644 index 0000000..e30203a --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Category_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.CategoryRepository; +import com.realnet.basicp1.Entity.Category; + +import com.realnet.basicp1.Entity.Category_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Category_ListFilter1Service { +@Autowired +private CategoryRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Category data : list) { +{ +Category_ListFilter1 dummy = new Category_ListFilter1(); + dummy.setId(data.getId()); + dummy.setCategory(data.getCategory()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Category data : list) { +{ +Category_ListFilter1 dummy = new Category_ListFilter1(); + dummy.setId(data.getId()); + dummy.setCategory(data.getCategory()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_typeService.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_typeService.java new file mode 100644 index 0000000..0613daf --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_typeService.java @@ -0,0 +1,73 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Duration_typeRepository; +import com.realnet.basicp1.Entity.Duration_type +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + import org.springframework.stereotype.Service; + +@Service + public class Duration_typeService { +@Autowired +private Duration_typeRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + +public Duration_type Savedata(Duration_type data) { + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Duration_type save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Duration_type getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Duration_type update(Duration_type data,Integer id) { + Duration_type old = Repository.findById(id).get(); +old.setDuration(data.getDuration()); + +final Duration_type test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_type_ListFilter1Service.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_type_ListFilter1Service.java new file mode 100644 index 0000000..e555bab --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Duration_type_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.Duration_typeRepository; +import com.realnet.basicp1.Entity.Duration_type; + +import com.realnet.basicp1.Entity.Duration_type_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Duration_type_ListFilter1Service { +@Autowired +private Duration_typeRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Duration_type data : list) { +{ +Duration_type_ListFilter1 dummy = new Duration_type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setDuration(data.getDuration()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Duration_type data : list) { +{ +Duration_type_ListFilter1 dummy = new Duration_type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setDuration(data.getDuration()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_typeService.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_typeService.java new file mode 100644 index 0000000..13d35e1 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_typeService.java @@ -0,0 +1,73 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Subscription_typeRepository; +import com.realnet.basicp1.Entity.Subscription_type +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + import org.springframework.stereotype.Service; + +@Service + public class Subscription_typeService { +@Autowired +private Subscription_typeRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + +public Subscription_type Savedata(Subscription_type data) { + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Subscription_type save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Subscription_type getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Subscription_type update(Subscription_type data,Integer id) { + Subscription_type old = Repository.findById(id).get(); +old.setType(data.getType()); + +final Subscription_type test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_type_ListFilter1Service.java b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_type_ListFilter1Service.java new file mode 100644 index 0000000..7bbe484 --- /dev/null +++ b/digitalsubscriptionmanager-backdsm-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Subscription_type_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.Subscription_typeRepository; +import com.realnet.basicp1.Entity.Subscription_type; + +import com.realnet.basicp1.Entity.Subscription_type_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Subscription_type_ListFilter1Service { +@Autowired +private Subscription_typeRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Subscription_type data : list) { +{ +Subscription_type_ListFilter1 dummy = new Subscription_type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setType(data.getType()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Subscription_type data : list) { +{ +Subscription_type_ListFilter1 dummy = new Subscription_type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setType(data.getType()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-dbdsm-d/authsec_mysql/mysql/wf_table/wf_table.sql b/digitalsubscriptionmanager-dbdsm-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..71c697b --- /dev/null +++ b/digitalsubscriptionmanager-dbdsm-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,8 @@ +CREATE TABLE dbdsm.Subscription_type(id BIGINT NOT NULL AUTO_INCREMENT, type VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbdsm.Duration_type(id BIGINT NOT NULL AUTO_INCREMENT, duration VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbdsm.Category(id BIGINT NOT NULL AUTO_INCREMENT, category VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbdsm.Add_new_subscription(id BIGINT NOT NULL AUTO_INCREMENT, type int, category int, email bit(1), price VARCHAR(400), duration int, renewal_date Date, email_field VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..fdff417 100644 --- a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/digitalsubscriptionmanager-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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.html b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.html new file mode 100644 index 0000000..7109dd6 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.html @@ -0,0 +1,596 @@ + +
+
+
+

Add New Subscription

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Price + + + + Renewal Date + + + + Duration + + + + Type + + + + Category + + + + + + email + + + + + + + Email Field + + + + + + Action + + + + + +{{user.name }} + + +{{user.price }} + + +{{user.renewal_date }} + + +{{user. durationname }} + + +{{user. typename }} + + +{{user. categoryname }} + + + + +{{user.email}} + + + + + +{{user.email_field }} + + + + + + + +
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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.scss b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.ts new file mode 100644 index 0000000..10b6e58 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component.ts @@ -0,0 +1,415 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Add_new_subscriptionservice} from './Add_new_subscription.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 { Add_new_subscriptioncardvariable } from './Add_new_subscription_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Add_new_subscription', + templateUrl: './Add_new_subscription.component.html', + styleUrls: ['./Add_new_subscription.component.scss'] +}) +export class Add_new_subscriptionComponent implements OnInit { + cardButton = Add_new_subscriptioncardvariable.cardButton; + cardmodeldata = Add_new_subscriptioncardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Add_new_subscriptioncardvariable.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 = 'Add_new_subscription_formCode' +tableName = 'Add_new_subscription'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Add_new_subscriptionservice, + 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], + +price : [null, { updateOn: 'blur' }], + +renewal_date : [null], + +duration : [null], + +type : [null], + +category : [null], + + + +email:[false], + + + +email_field : [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 === "Add_new_subscription_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.getallduration(); + +this.getalltype(); + +this.getallcategory(); + + + + + + + } + + + + + + + + + + + + + + + + + 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(); + +} + + +//currency field start + formatCurrencyprice () { + // Format the currency with two decimal places + this.rowSelected.price = Number(this.rowSelected.price ).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.price = this.rowSelected.price?.replace(/,/g, ''); } + //currency field end + + + +selectduration ; +getallduration() { + this.mainService.getAllduration().subscribe(data=>{ +this.selectduration = data; +console.log(data); +},(error) => { console.log(error); }); } + +selecttype ; +getalltype() { + this.mainService.getAlltype().subscribe(data=>{ +this.selecttype = data; +console.log(data); +},(error) => { console.log(error); }); } + +selectcategory ; +getallcategory() { + this.mainService.getAllcategory().subscribe(data=>{ +this.selectcategory = data; +console.log(data); +},(error) => { console.log(error); }); } + + + +isValidemail_field(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); } + +// updateaction +} + + + + + + + + + + + + + + + diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.service.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.service.ts new file mode 100644 index 0000000..2753eeb --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.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'; +@Injectable({ + providedIn: 'root' +}) +export class Add_new_subscriptionservice{ + private baseURL = "Add_new_subscription/Add_new_subscription" ; 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); + } + + + + + + +getAllduration(): Observable { +return this.apiRequest.get("Duration_type_ListFilter1/Duration_type_ListFilter1"); } + +getAlltype(): Observable { +return this.apiRequest.get("Subscription_type_ListFilter1/Subscription_type_ListFilter1"); } + +getAllcategory(): Observable { +return this.apiRequest.get("Duration_type_ListFilter1/Duration_type_ListFilter1"); } + + + + + +// updateaction +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription_cardvariable.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription_cardvariable.ts new file mode 100644 index 0000000..7ab929a --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription_cardvariable.ts @@ -0,0 +1,4 @@ +export const Add_new_subscriptioncardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.html b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.html new file mode 100644 index 0000000..a676963 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.html @@ -0,0 +1,322 @@ + +
+
+
+

Category

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Category + + + + + + Action + + + + + +{{user.category }} + + + + + + + +
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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.scss b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.ts new file mode 100644 index 0000000..fd61697 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.component.ts @@ -0,0 +1,238 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Categoryservice} from './Category.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 { Categorycardvariable } from './Category_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Category', + templateUrl: './Category.component.html', + styleUrls: ['./Category.component.scss'] +}) +export class CategoryComponent implements OnInit { + cardButton = Categorycardvariable.cardButton; + cardmodeldata = Categorycardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Categorycardvariable.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 = 'Category_formCode' +tableName = 'Category'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Categoryservice, + 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({ +category : [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 === "Category_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(); + +} + + + 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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.service.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.service.ts new file mode 100644 index 0000000..56fc1ac --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category.service.ts @@ -0,0 +1,40 @@ +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 Categoryservice{ + private baseURL = "Category/Category" ; 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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category_cardvariable.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category_cardvariable.ts new file mode 100644 index 0000000..2a59fc4 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Category/Category_cardvariable.ts @@ -0,0 +1,4 @@ +export const Categorycardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.html b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.html new file mode 100644 index 0000000..99bab4d --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.html @@ -0,0 +1,322 @@ + +
+
+
+

Duration type

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Duration + + + + + + Action + + + + + +{{user.duration }} + + + + + + + +
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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.scss b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.ts new file mode 100644 index 0000000..f6b92c6 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.component.ts @@ -0,0 +1,238 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Duration_typeservice} from './Duration_type.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Duration_typecardvariable } from './Duration_type_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Duration_type', + templateUrl: './Duration_type.component.html', + styleUrls: ['./Duration_type.component.scss'] +}) +export class Duration_typeComponent implements OnInit { + cardButton = Duration_typecardvariable.cardButton; + cardmodeldata = Duration_typecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Duration_typecardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Duration_type_formCode' +tableName = 'Duration_type'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Duration_typeservice, + 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({ +duration : [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 === "Duration_type_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + } + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + + 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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.service.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.service.ts new file mode 100644 index 0000000..2efc1e2 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type.service.ts @@ -0,0 +1,40 @@ +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 Duration_typeservice{ + private baseURL = "Duration_type/Duration_type" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + +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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type_cardvariable.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type_cardvariable.ts new file mode 100644 index 0000000..975f518 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Duration_type/Duration_type_cardvariable.ts @@ -0,0 +1,4 @@ +export const Duration_typecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.html b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.html new file mode 100644 index 0000000..697aecf --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.html @@ -0,0 +1,322 @@ + +
+
+
+

Subscription type

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Type + + + + + + Action + + + + + +{{user.type }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
File Preview
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.scss b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.ts new file mode 100644 index 0000000..9b47515 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.component.ts @@ -0,0 +1,238 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Subscription_typeservice} from './Subscription_type.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Subscription_typecardvariable } from './Subscription_type_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Subscription_type', + templateUrl: './Subscription_type.component.html', + styleUrls: ['./Subscription_type.component.scss'] +}) +export class Subscription_typeComponent implements OnInit { + cardButton = Subscription_typecardvariable.cardButton; + cardmodeldata = Subscription_typecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Subscription_typecardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Subscription_type_formCode' +tableName = 'Subscription_type'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Subscription_typeservice, + 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({ +type : [null], + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Subscription_type_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + } + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + + 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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.service.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.service.ts new file mode 100644 index 0000000..1814320 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type.service.ts @@ -0,0 +1,40 @@ +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 Subscription_typeservice{ + private baseURL = "Subscription_type/Subscription_type" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + +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/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type_cardvariable.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type_cardvariable.ts new file mode 100644 index 0000000..29c0d69 --- /dev/null +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Subscription_type/Subscription_type_cardvariable.ts @@ -0,0 +1,4 @@ +export const Subscription_typecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 7377c69..8ec3420 100644 --- a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,7 @@ +import { Add_new_subscriptionComponent } from './BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component'; +import { CategoryComponent } from './BuilderComponents/basicp1/Category/Category.component'; +import { Duration_typeComponent } from './BuilderComponents/basicp1/Duration_type/Duration_type.component'; +import { Subscription_typeComponent } from './BuilderComponents/basicp1/Subscription_type/Subscription_type.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; @@ -256,6 +260,18 @@ const routes: Routes = [ // buildercomponents +{path:'Add_new_subscription',component:Add_new_subscriptionComponent}, + + +{path:'Category',component:CategoryComponent}, + + +{path:'Duration_type',component:Duration_typeComponent}, + + +{path:'Subscription_type',component:Subscription_typeComponent}, + + diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index ecbab3d..fe6cb5e 100644 --- a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,7 @@ +import { Add_new_subscriptionComponent } from './BuilderComponents/basicp1/Add_new_subscription/Add_new_subscription.component'; +import { CategoryComponent } from './BuilderComponents/basicp1/Category/Category.component'; +import { Duration_typeComponent } from './BuilderComponents/basicp1/Duration_type/Duration_type.component'; +import { Subscription_typeComponent } from './BuilderComponents/basicp1/Subscription_type/Subscription_type.component'; import { CommonModule } from '@angular/common'; @@ -129,6 +133,18 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S // buildercomponents +Add_new_subscriptionComponent, + + +CategoryComponent, + + +Duration_typeComponent, + + +Subscription_typeComponent, + + diff --git a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index ee15955..0aa2a59 100644 --- a/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/digitalsubscriptionmanager-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,10 +226,15 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Active": "Active", - "Description": "Description", - "Fileupload_Field": "Fileupload_Field", - "Test22": "Test22", - "Test11": "Test11", + "Type": "Type", + "Add_new_subscription": "Add_new_subscription", + "Category": "Category", + "Email": "Email", + "Duration_type": "Duration_type", + "Price": "Price", + "Subscription_type": "Subscription_type", + "Duration": "Duration", + "Renewal_Date": "Renewal_Date", + "Email_Field": "Email_Field", "Name": "Name" } \ No newline at end of file