From 63d374244a314f51ccfe79f92f092063e9624d29 Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Fri, 18 Jul 2025 11:05:24 +0000 Subject: [PATCH] build_app --- .../Builders/Services/BuilderService.java | 12 + .../basic/Controllers/ClientsController.java | 91 ++++ .../Clients_ListFilter1Controller.java | 24 + .../Dashboard_overviewController.java | 115 +++++ .../basic/Controllers/InvoicesController.java | 83 ++++ .../basic/Controllers/ProjectsController.java | 115 +++++ .../tokenFree_ClientsController.java | 91 ++++ ...kenFree_Clients_ListFilter1Controller.java | 24 + ...okenFree_Dashboard_overviewController.java | 115 +++++ .../tokenFree_InvoicesController.java | 83 ++++ .../tokenFree_ProjectsController.java | 115 +++++ .../com/realnet/basic/Entity/Clients.java | 29 ++ .../basic/Entity/Clients_ListFilter1.java | 14 + .../basic/Entity/Dashboard_overview.java | 40 ++ .../com/realnet/basic/Entity/Invoices.java | 24 + .../com/realnet/basic/Entity/Projects.java | 42 ++ .../basic/Repository/ClientsRepository.java | 28 ++ .../Dashboard_overviewRepository.java | 34 ++ .../basic/Repository/InvoicesRepository.java | 26 + .../basic/Repository/ProjectsRepository.java | 34 ++ .../basic/Services/ClientsService.java | 83 ++++ .../Services/Clients_ListFilter1Service.java | 47 ++ .../Services/Dashboard_overviewService.java | 113 +++++ .../basic/Services/InvoicesService.java | 73 +++ .../basic/Services/ProjectsService.java | 135 ++++++ .../authsec_mysql/mysql/wf_table/wf_table.sql | 8 + .../login/login-page/login_environment.ts | 18 +- .../basic/Clients/Clients.component.html | 356 ++++++++++++++ .../basic/Clients/Clients.component.scss | 78 +++ .../basic/Clients/Clients.component.ts | 264 ++++++++++ .../basic/Clients/Clients.service.ts | 42 ++ .../basic/Clients/Clients_cardvariable.ts | 4 + .../Dashboard_overview.component.html | 440 +++++++++++++++++ .../Dashboard_overview.component.scss | 78 +++ .../Dashboard_overview.component.ts | 316 ++++++++++++ .../Dashboard_overview.service.ts | 43 ++ .../Dashboard_overview_cardvariable.ts | 4 + .../basic/Invoices/Invoices.component.html | 315 ++++++++++++ .../basic/Invoices/Invoices.component.scss | 78 +++ .../basic/Invoices/Invoices.component.ts | 220 +++++++++ .../basic/Invoices/Invoices.service.ts | 35 ++ .../basic/Invoices/Invoices_cardvariable.ts | 4 + .../basic/Projects/Projects.component.html | 454 ++++++++++++++++++ .../basic/Projects/Projects.component.scss | 78 +++ .../basic/Projects/Projects.component.ts | 329 +++++++++++++ .../basic/Projects/Projects.service.ts | 44 ++ .../basic/Projects/Projects_cardvariable.ts | 4 + .../app/modules/main/main-routing.module.ts | 16 + .../src/app/modules/main/main.module.ts | 16 + .../src/assets/i18n/en.json | 23 +- 50 files changed, 4842 insertions(+), 15 deletions(-) create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ClientsController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Clients_ListFilter1Controller.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Dashboard_overviewController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/InvoicesController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ProjectsController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ClientsController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Clients_ListFilter1Controller.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Dashboard_overviewController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_InvoicesController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ProjectsController.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients_ListFilter1.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Dashboard_overview.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Invoices.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Projects.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ClientsRepository.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/Dashboard_overviewRepository.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/InvoicesRepository.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ProjectsRepository.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ClientsService.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Clients_ListFilter1Service.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Dashboard_overviewService.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/InvoicesService.java create mode 100644 freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ProjectsService.java create mode 100755 freelancerpm-dbf-d/authsec_mysql/mysql/wf_table/wf_table.sql create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.html create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.scss create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.service.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients_cardvariable.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.html create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.scss create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.service.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview_cardvariable.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.html create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.scss create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.service.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices_cardvariable.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.html create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.scss create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.service.ts create mode 100644 freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects_cardvariable.ts diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index f9801fb..e6656af 100644 --- a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/freelancerpm-backf-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( "Invoices","Invoices", "Transcations"); + + +addCustomMenu( "Projects","Projects", "Transcations"); + + +addCustomMenu( "Clients","Clients", "Master"); + + +addCustomMenu( "Dashboard_overview","Dashboard_overview", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ClientsController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ClientsController.java new file mode 100644 index 0000000..e291efc --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ClientsController.java @@ -0,0 +1,91 @@ +package com.realnet.basic.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.basic.Entity.Clients; +import com.realnet.basic.Services.ClientsService ; + + + + +@RequestMapping(value = "/Clients") + @CrossOrigin("*") +@RestController +public class ClientsController { + @Autowired + private ClientsService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + @PostMapping("/Clients") + public Clients Savedata(@RequestBody Clients data) { + Clients save = Service.Savedata(data) ; + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Clients/{id}") + public Clients update(@RequestBody Clients data,@PathVariable Integer id ) { + Clients update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Clients/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("/Clients") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Clients") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Clients/{id}") + public Clients getdetailsbyId(@PathVariable Integer id ) { + Clients get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Clients/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Clients_ListFilter1Controller.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Clients_ListFilter1Controller.java new file mode 100644 index 0000000..3ec835d --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Clients_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basic.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basic.Entity.Clients_ListFilter1; +import com.realnet.basic.Services.Clients_ListFilter1Service ; +@RequestMapping(value = "/Clients_ListFilter1") +@RestController +public class Clients_ListFilter1Controller { + + @Autowired + private Clients_ListFilter1Service Service; + + @GetMapping("/Clients_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Clients_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Dashboard_overviewController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Dashboard_overviewController.java new file mode 100644 index 0000000..bed40df --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/Dashboard_overviewController.java @@ -0,0 +1,115 @@ +package com.realnet.basic.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.basic.Entity.Dashboard_overview; +import com.realnet.basic.Services.Dashboard_overviewService ; + + + + + + + + + + +@RequestMapping(value = "/Dashboard_overview") + @CrossOrigin("*") +@RestController +public class Dashboard_overviewController { + @Autowired + private Dashboard_overviewService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Dashboard_overview") + public Dashboard_overview Savedata(@RequestBody Dashboard_overview data) { + Dashboard_overview save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Dashboard_overview/{id}") + public Dashboard_overview update(@RequestBody Dashboard_overview data,@PathVariable Integer id ) { + Dashboard_overview update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Dashboard_overview/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("/Dashboard_overview") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Dashboard_overview") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Dashboard_overview/{id}") + public Dashboard_overview getdetailsbyId(@PathVariable Integer id ) { + Dashboard_overview get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Dashboard_overview/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/InvoicesController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/InvoicesController.java new file mode 100644 index 0000000..5b96e0d --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/InvoicesController.java @@ -0,0 +1,83 @@ +package com.realnet.basic.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.basic.Entity.Invoices; +import com.realnet.basic.Services.InvoicesService ; + + +@RequestMapping(value = "/Invoices") + @CrossOrigin("*") +@RestController +public class InvoicesController { + @Autowired + private InvoicesService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Invoices") + public Invoices Savedata(@RequestBody Invoices data) { + Invoices save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Invoices/{id}") + public Invoices update(@RequestBody Invoices data,@PathVariable Integer id ) { + Invoices update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Invoices/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("/Invoices") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Invoices") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Invoices/{id}") + public Invoices getdetailsbyId(@PathVariable Integer id ) { + Invoices get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Invoices/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ProjectsController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ProjectsController.java new file mode 100644 index 0000000..483d770 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/ProjectsController.java @@ -0,0 +1,115 @@ +package com.realnet.basic.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.basic.Entity.Projects; +import com.realnet.basic.Services.ProjectsService ; + + + + + + + + + + +@RequestMapping(value = "/Projects") + @CrossOrigin("*") +@RestController +public class ProjectsController { + @Autowired + private ProjectsService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Projects") + public Projects Savedata(@RequestBody Projects data) { + Projects save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Projects/{id}") + public Projects update(@RequestBody Projects data,@PathVariable Integer id ) { + Projects update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Projects/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("/Projects") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Projects") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Projects/{id}") + public Projects getdetailsbyId(@PathVariable Integer id ) { + Projects get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Projects/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ClientsController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ClientsController.java new file mode 100644 index 0000000..2c467b7 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ClientsController.java @@ -0,0 +1,91 @@ +package com.realnet.basic.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.basic.Entity.Clients; +import com.realnet.basic.Services.ClientsService ; + + + + +@RequestMapping(value = "/token/Clients") + @CrossOrigin("*") +@RestController +public class tokenFree_ClientsController { + @Autowired + private ClientsService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + @PostMapping("/Clients") + public Clients Savedata(@RequestBody Clients data) { + Clients save = Service.Savedata(data) ; + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Clients/{id}") + public Clients update(@RequestBody Clients data,@PathVariable Integer id ) { + Clients update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Clients/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("/Clients") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Clients") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Clients/{id}") + public Clients getdetailsbyId(@PathVariable Integer id ) { + Clients get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Clients/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Clients_ListFilter1Controller.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Clients_ListFilter1Controller.java new file mode 100644 index 0000000..08a1f90 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Clients_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basic.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basic.Entity.Clients_ListFilter1; +import com.realnet.basic.Services.Clients_ListFilter1Service ; +@RequestMapping(value = "/token/Clients_ListFilter1") +@RestController +public class tokenFree_Clients_ListFilter1Controller { + + @Autowired + private Clients_ListFilter1Service Service; + + @GetMapping("/Clients_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Clients_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Dashboard_overviewController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Dashboard_overviewController.java new file mode 100644 index 0000000..7c26fa5 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_Dashboard_overviewController.java @@ -0,0 +1,115 @@ +package com.realnet.basic.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.basic.Entity.Dashboard_overview; +import com.realnet.basic.Services.Dashboard_overviewService ; + + + + + + + + + + +@RequestMapping(value = "/token/Dashboard_overview") + @CrossOrigin("*") +@RestController +public class tokenFree_Dashboard_overviewController { + @Autowired + private Dashboard_overviewService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Dashboard_overview") + public Dashboard_overview Savedata(@RequestBody Dashboard_overview data) { + Dashboard_overview save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Dashboard_overview/{id}") + public Dashboard_overview update(@RequestBody Dashboard_overview data,@PathVariable Integer id ) { + Dashboard_overview update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Dashboard_overview/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("/Dashboard_overview") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Dashboard_overview") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Dashboard_overview/{id}") + public Dashboard_overview getdetailsbyId(@PathVariable Integer id ) { + Dashboard_overview get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Dashboard_overview/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_InvoicesController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_InvoicesController.java new file mode 100644 index 0000000..3adfc98 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_InvoicesController.java @@ -0,0 +1,83 @@ +package com.realnet.basic.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.basic.Entity.Invoices; +import com.realnet.basic.Services.InvoicesService ; + + +@RequestMapping(value = "/token/Invoices") + @CrossOrigin("*") +@RestController +public class tokenFree_InvoicesController { + @Autowired + private InvoicesService Service; + +@Value("${projectPath}") + private String projectPath; + + + + @PostMapping("/Invoices") + public Invoices Savedata(@RequestBody Invoices data) { + Invoices save = Service.Savedata(data) ; + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Invoices/{id}") + public Invoices update(@RequestBody Invoices data,@PathVariable Integer id ) { + Invoices update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Invoices/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("/Invoices") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Invoices") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Invoices/{id}") + public Invoices getdetailsbyId(@PathVariable Integer id ) { + Invoices get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Invoices/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ProjectsController.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ProjectsController.java new file mode 100644 index 0000000..501e2a4 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Controllers/tokenFree_ProjectsController.java @@ -0,0 +1,115 @@ +package com.realnet.basic.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.basic.Entity.Projects; +import com.realnet.basic.Services.ProjectsService ; + + + + + + + + + + +@RequestMapping(value = "/token/Projects") + @CrossOrigin("*") +@RestController +public class tokenFree_ProjectsController { + @Autowired + private ProjectsService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Projects") + public Projects Savedata(@RequestBody Projects data) { + Projects save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Projects/{id}") + public Projects update(@RequestBody Projects data,@PathVariable Integer id ) { + Projects update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Projects/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("/Projects") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Projects") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Projects/{id}") + public Projects getdetailsbyId(@PathVariable Integer id ) { + Projects get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Projects/{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/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients.java new file mode 100644 index 0000000..9793741 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients.java @@ -0,0 +1,29 @@ +package com.realnet.basic.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + @Entity + @Data + public class Clients extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String client_name; + +@Column(length = 2000) +private String client_email; + + +} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients_ListFilter1.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients_ListFilter1.java new file mode 100644 index 0000000..97334b6 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Clients_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.basic.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Clients_ListFilter1 { + + private Integer id; + + + private String client_name; +} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Dashboard_overview.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Dashboard_overview.java new file mode 100644 index 0000000..a575f18 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Dashboard_overview.java @@ -0,0 +1,40 @@ +package com.realnet.basic.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + @Entity + @Data + public class Dashboard_overview extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private int total_clients; + +private int active_projects; + +private int total_revenue; + +private String recent_clients; + +private String recent_projects; + + +} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Invoices.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Invoices.java new file mode 100644 index 0000000..dc9a28b --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Invoices.java @@ -0,0 +1,24 @@ +package com.realnet.basic.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + @Entity + @Data + public class Invoices extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String generate_invoices; + + +} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Projects.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Projects.java new file mode 100644 index 0000000..90ba58f --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Entity/Projects.java @@ -0,0 +1,42 @@ +package com.realnet.basic.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + @Entity + @Data + public class Projects extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String project_name; + +private String select_client; +private String select_clientname; + +@Column(length = 2000) +private String project_description; + +private String hourly_rate; + +private int estimated_hours; + + +} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ClientsRepository.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ClientsRepository.java new file mode 100644 index 0000000..18f7e29 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ClientsRepository.java @@ -0,0 +1,28 @@ +package com.realnet.basic.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.basic.Entity.Clients; + +@Repository +public interface ClientsRepository extends JpaRepository { + +@Query(value = "select * from clients where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from clients where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/Dashboard_overviewRepository.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/Dashboard_overviewRepository.java new file mode 100644 index 0000000..c625f69 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/Dashboard_overviewRepository.java @@ -0,0 +1,34 @@ +package com.realnet.basic.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.basic.Entity.Dashboard_overview; + +@Repository +public interface Dashboard_overviewRepository extends JpaRepository { + +@Query(value = "select * from dashboard_overview where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from dashboard_overview where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/InvoicesRepository.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/InvoicesRepository.java new file mode 100644 index 0000000..141c484 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/InvoicesRepository.java @@ -0,0 +1,26 @@ +package com.realnet.basic.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.basic.Entity.Invoices; + +@Repository +public interface InvoicesRepository extends JpaRepository { + +@Query(value = "select * from invoices where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from invoices where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ProjectsRepository.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ProjectsRepository.java new file mode 100644 index 0000000..27233a9 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Repository/ProjectsRepository.java @@ -0,0 +1,34 @@ +package com.realnet.basic.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.basic.Entity.Projects; + +@Repository +public interface ProjectsRepository extends JpaRepository { + +@Query(value = "select * from projects where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from projects where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ClientsService.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ClientsService.java new file mode 100644 index 0000000..cc57d9d --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ClientsService.java @@ -0,0 +1,83 @@ +package com.realnet.basic.Services; +import com.realnet.basic.Repository.ClientsRepository; +import com.realnet.basic.Entity.Clients +;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 ClientsService { +@Autowired +private ClientsRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + +public Clients Savedata(Clients data) { + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Clients 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 Clients getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Clients update(Clients data,Integer id) { + Clients old = Repository.findById(id).get(); +old.setClient_name(data.getClient_name()); + +old.setClient_email(data.getClient_email()); + +final Clients test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Clients_ListFilter1Service.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Clients_ListFilter1Service.java new file mode 100644 index 0000000..0cfccba --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Clients_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.basic.Services; +import java.util.*; +import com.realnet.basic.Repository.ClientsRepository; +import com.realnet.basic.Entity.Clients; + +import com.realnet.basic.Entity.Clients_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Clients_ListFilter1Service { +@Autowired +private ClientsRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Clients data : list) { +{ +Clients_ListFilter1 dummy = new Clients_ListFilter1(); + dummy.setId(data.getId()); + dummy.setClient_name(data.getClient_name()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Clients data : list) { +{ +Clients_ListFilter1 dummy = new Clients_ListFilter1(); + dummy.setId(data.getId()); + dummy.setClient_name(data.getClient_name()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Dashboard_overviewService.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Dashboard_overviewService.java new file mode 100644 index 0000000..9ba939c --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/Dashboard_overviewService.java @@ -0,0 +1,113 @@ +package com.realnet.basic.Services; +import com.realnet.basic.Repository.Dashboard_overviewRepository; +import com.realnet.basic.Entity.Dashboard_overview +;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 Dashboard_overviewService { +@Autowired +private Dashboard_overviewRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + +public Dashboard_overview Savedata(Dashboard_overview data) { + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Dashboard_overview 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 Dashboard_overview getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Dashboard_overview update(Dashboard_overview data,Integer id) { + Dashboard_overview old = Repository.findById(id).get(); +old.setTotal_clients(data.getTotal_clients()); + +old.setActive_projects(data.getActive_projects()); + +old.setTotal_revenue(data.getTotal_revenue()); + +old.setRecent_clients(data.getRecent_clients()); + +old.setRecent_projects(data.getRecent_projects()); + +final Dashboard_overview test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/InvoicesService.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/InvoicesService.java new file mode 100644 index 0000000..ca6691c --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/InvoicesService.java @@ -0,0 +1,73 @@ +package com.realnet.basic.Services; +import com.realnet.basic.Repository.InvoicesRepository; +import com.realnet.basic.Entity.Invoices +;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 InvoicesService { +@Autowired +private InvoicesRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + +public Invoices Savedata(Invoices data) { + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Invoices 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 Invoices getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Invoices update(Invoices data,Integer id) { + Invoices old = Repository.findById(id).get(); +old.setGenerate_invoices(data.getGenerate_invoices()); + +final Invoices test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ProjectsService.java b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ProjectsService.java new file mode 100644 index 0000000..99a28e1 --- /dev/null +++ b/freelancerpm-backf-b/authsec_springboot/backend/src/main/java/com/realnet/basic/Services/ProjectsService.java @@ -0,0 +1,135 @@ +package com.realnet.basic.Services; +import com.realnet.basic.Repository.ProjectsRepository; +import com.realnet.basic.Entity.Projects +;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.basic.Entity.Clients; +import com.realnet.basic.Services.ClientsService; + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class ProjectsService { +@Autowired +private ProjectsRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + +@Autowired + private ClientsService select_clientserv; + + + + + + + +public Projects Savedata(Projects data) { + + + + +if (data.getSelect_client() != null) { + try { + int select_clientId = Integer.valueOf(data.getSelect_client()); +Clients get = select_clientserv.getdetailsbyId(select_clientId); + if (get != null) { + + data.setSelect_clientname(get.getClient_name()); +} +} catch (NumberFormatException e) { + System.out.println(" select_clientId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Projects 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 Projects getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Projects update(Projects data,Integer id) { + Projects old = Repository.findById(id).get(); +old.setProject_name(data.getProject_name()); + +old.setSelect_client(data.getSelect_client()); + +old.setProject_description(data.getProject_description()); + +old.setHourly_rate(data.getHourly_rate()); + +old.setEstimated_hours(data.getEstimated_hours()); + +final Projects test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/freelancerpm-dbf-d/authsec_mysql/mysql/wf_table/wf_table.sql b/freelancerpm-dbf-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..d8cd5fe --- /dev/null +++ b/freelancerpm-dbf-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,8 @@ +CREATE TABLE dbf.Dashboard_overview(id BIGINT NOT NULL AUTO_INCREMENT, active_projects int, total_clients int, recent_projects VARCHAR(400), recent_clients VARCHAR(400), total_revenue int, PRIMARY KEY (id)); + +CREATE TABLE dbf.Clients(id BIGINT NOT NULL AUTO_INCREMENT, client_email VARCHAR(400), client_name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbf.Projects(id BIGINT NOT NULL AUTO_INCREMENT, select_client int, project_description VARCHAR(400), estimated_hours int, project_name VARCHAR(400), hourly_rate VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbf.Invoices(id BIGINT NOT NULL AUTO_INCREMENT, generate_invoices VARCHAR(400), PRIMARY KEY (id)); + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..fdff417 100644 --- a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/freelancerpm-frontf-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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.html b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.html new file mode 100644 index 0000000..44b46fd --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.html @@ -0,0 +1,356 @@ + +
+
+
+

Clients

+
+
+ + + + + + +
+ + + + Loading ... + +
{{error}}
+
+ + Client Name + + + + Client Email + + + + + + Action + + + + + +{{user.client_name }} + + + + + + + + + + + +
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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.scss b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.ts new file mode 100644 index 0000000..68845ba --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.component.ts @@ -0,0 +1,264 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Clientsservice} from './Clients.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 { Clientscardvariable } from './Clients_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +import { ActivatedRoute, Router } from '@angular/router'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Clients', + templateUrl: './Clients.component.html', + styleUrls: ['./Clients.component.scss'] +}) +export class ClientsComponent implements OnInit { + cardButton = Clientscardvariable.cardButton; + cardmodeldata = Clientscardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Clientscardvariable.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 = 'Clients_formCode' +tableName = 'Clients'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Clientsservice, + 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({ +client_name : [null], + +client_email : [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 === "Clients_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(); + +} + + +rsModalclient_email = false; +goToReplaceStringclient_email(row){ +this.rowSelected = row; this.rsModalclient_email =true; } + + goToDataM(){ + this.router.navigate(['/cns-portal/datamanagement'],{ relativeTo: this.route }); + } + + +downloadCSV(tableName): void { + this.mainService.downloadCSV(tableName).subscribe(response => { + const blob = new Blob([response], { type: 'application/octet-stream' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${tableName}.csv`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); +}// updateaction +} + + + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.service.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.service.ts new file mode 100644 index 0000000..e1679d8 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients.service.ts @@ -0,0 +1,42 @@ +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 Clientsservice{ + private baseURL = "Clients/Clients" ; 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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients_cardvariable.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients_cardvariable.ts new file mode 100644 index 0000000..0c416dc --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Clients/Clients_cardvariable.ts @@ -0,0 +1,4 @@ +export const Clientscardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.html b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.html new file mode 100644 index 0000000..bbaf0f3 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.html @@ -0,0 +1,440 @@ + +
+
+
+

Dashboard Overview

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Total Clients + + + + Active Projects + + + + Total Revenue + + + + Recent Clients + + + + Recent Projects + + + + + + Action + + + + + +{{user.total_clients }} + + +{{user.active_projects }} + + +{{user.total_revenue }} + + +{{user.recent_clients }} + + +{{user.recent_projects }} + + + + + + + +
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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.scss b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.ts new file mode 100644 index 0000000..997d2db --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component.ts @@ -0,0 +1,316 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Dashboard_overviewservice} from './Dashboard_overview.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 { Dashboard_overviewcardvariable } from './Dashboard_overview_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Dashboard_overview', + templateUrl: './Dashboard_overview.component.html', + styleUrls: ['./Dashboard_overview.component.scss'] +}) +export class Dashboard_overviewComponent implements OnInit { + cardButton = Dashboard_overviewcardvariable.cardButton; + cardmodeldata = Dashboard_overviewcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Dashboard_overviewcardvariable.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 = 'Dashboard_overview_formCode' +tableName = 'Dashboard_overview'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Dashboard_overviewservice, + 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({ +total_clients : [null,[Validators.required]], + +active_projects : [null,[Validators.required]], + +total_revenue : [null,[Validators.required]], + +recent_clients : [null], + +recent_projects : [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 === "Dashboard_overview_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(); + +} + + + + + + + + + + +// updateaction +} + + + + + + + + + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.service.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.service.ts new file mode 100644 index 0000000..53c2494 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview.service.ts @@ -0,0 +1,43 @@ +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 Dashboard_overviewservice{ + private baseURL = "Dashboard_overview/Dashboard_overview" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview_cardvariable.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview_cardvariable.ts new file mode 100644 index 0000000..dc7158d --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Dashboard_overview/Dashboard_overview_cardvariable.ts @@ -0,0 +1,4 @@ +export const Dashboard_overviewcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.html b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.html new file mode 100644 index 0000000..de47146 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.html @@ -0,0 +1,315 @@ + +
+
+
+

Invoices

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Generate Invoices + + + + + + Action + + + + + +{{user.generate_invoices }} + + + + + + + +
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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.scss b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.ts new file mode 100644 index 0000000..7a64f50 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.component.ts @@ -0,0 +1,220 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Invoicesservice} from './Invoices.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 { Invoicescardvariable } from './Invoices_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Invoices', + templateUrl: './Invoices.component.html', + styleUrls: ['./Invoices.component.scss'] +}) +export class InvoicesComponent implements OnInit { + cardButton = Invoicescardvariable.cardButton; + cardmodeldata = Invoicescardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Invoicescardvariable.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 = 'Invoices_formCode' +tableName = 'Invoices'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Invoicesservice, + 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({ +generate_invoices : [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 === "Invoices_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(); + +} + + +// updateaction +} + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.service.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.service.ts new file mode 100644 index 0000000..18e4901 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices.service.ts @@ -0,0 +1,35 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Invoicesservice{ + private baseURL = "Invoices/Invoices" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + +// updateaction +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices_cardvariable.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices_cardvariable.ts new file mode 100644 index 0000000..264159e --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Invoices/Invoices_cardvariable.ts @@ -0,0 +1,4 @@ +export const Invoicescardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.html b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.html new file mode 100644 index 0000000..6405e91 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.html @@ -0,0 +1,454 @@ + +
+
+
+

Projects

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Project Name + + + + select Client + + + + Project Description + + + + Hourly Rate + + + + Estimated Hours + + + + + + Action + + + + + +{{user.project_name }} + + +{{user. select_clientname }} + + + + + + +{{user.hourly_rate }} + + +{{user.estimated_hours }} + + + + + + + +
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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.scss b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.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/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.ts new file mode 100644 index 0000000..b615cac --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.component.ts @@ -0,0 +1,329 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Projectsservice} from './Projects.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 { Projectscardvariable } from './Projects_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Projects', + templateUrl: './Projects.component.html', + styleUrls: ['./Projects.component.scss'] +}) +export class ProjectsComponent implements OnInit { + cardButton = Projectscardvariable.cardButton; + cardmodeldata = Projectscardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Projectscardvariable.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 = 'Projects_formCode' +tableName = 'Projects'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Projectsservice, + 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({ +project_name : [null], + +select_client : [null], + +project_description : [null], + +hourly_rate : [null, { updateOn: 'blur' }], + +estimated_hours : [null,[Validators.required]], + + + + + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Projects_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.getallselect_client(); + + + + + + + + + } + + + + + + + + + + + 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(); + +} + + +selectselect_client ; +getallselect_client() { + this.mainService.getAllselect_client().subscribe(data=>{ +this.selectselect_client = data; +console.log(data); +},(error) => { console.log(error); }); } + +rsModalproject_description = false; +goToReplaceStringproject_description(row){ +this.rowSelected = row; this.rsModalproject_description =true; } + +//currency field start + formatCurrencyhourly_rate () { + // Format the currency with two decimal places + this.rowSelected.hourly_rate = Number(this.rowSelected.hourly_rate ).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.hourly_rate = this.rowSelected.hourly_rate?.replace(/,/g, ''); } + //currency field end + + + +// updateaction +} + + + + + + + + + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.service.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.service.ts new file mode 100644 index 0000000..cf24595 --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects.service.ts @@ -0,0 +1,44 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Projectsservice{ + private baseURL = "Projects/Projects" ; 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); + } + + +getAllselect_client(): Observable { +return this.apiRequest.get("Clients_ListFilter1/Clients_ListFilter1"); } + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects_cardvariable.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects_cardvariable.ts new file mode 100644 index 0000000..4eb898c --- /dev/null +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basic/Projects/Projects_cardvariable.ts @@ -0,0 +1,4 @@ +export const Projectscardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 7377c69..e18eadf 100644 --- a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,7 @@ +import { InvoicesComponent } from './BuilderComponents/basic/Invoices/Invoices.component'; +import { ProjectsComponent } from './BuilderComponents/basic/Projects/Projects.component'; +import { ClientsComponent } from './BuilderComponents/basic/Clients/Clients.component'; +import { Dashboard_overviewComponent } from './BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; @@ -256,6 +260,18 @@ const routes: Routes = [ // buildercomponents +{path:'Invoices',component:InvoicesComponent}, + + +{path:'Projects',component:ProjectsComponent}, + + +{path:'Clients',component:ClientsComponent}, + + +{path:'Dashboard_overview',component:Dashboard_overviewComponent}, + + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index ecbab3d..a433075 100644 --- a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,7 @@ +import { InvoicesComponent } from './BuilderComponents/basic/Invoices/Invoices.component'; +import { ProjectsComponent } from './BuilderComponents/basic/Projects/Projects.component'; +import { ClientsComponent } from './BuilderComponents/basic/Clients/Clients.component'; +import { Dashboard_overviewComponent } from './BuilderComponents/basic/Dashboard_overview/Dashboard_overview.component'; import { CommonModule } from '@angular/common'; @@ -129,6 +133,18 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S // buildercomponents +InvoicesComponent, + + +ProjectsComponent, + + +ClientsComponent, + + +Dashboard_overviewComponent, + + diff --git a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index ee15955..94aca5b 100644 --- a/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/freelancerpm-frontf-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,10 +226,21 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Active": "Active", - "Description": "Description", - "Fileupload_Field": "Fileupload_Field", - "Test22": "Test22", - "Test11": "Test11", - "Name": "Name" + "Active_Projects": "Active_Projects", + "Client_Email": "Client_Email", + "select_Client": "select_Client", + "Total_Clients": "Total_Clients", + "Client_Name": "Client_Name", + "Estimated_Hours": "Estimated_Hours", + "Projects": "Projects", + "Recent_Clients": "Recent_Clients", + "Invoices": "Invoices", + "Project_Name": "Project_Name", + "Clients": "Clients", + "Total_Revenue": "Total_Revenue", + "Recent_Projects": "Recent_Projects", + "Project_Description": "Project_Description", + "Generate_Invoices": "Generate_Invoices", + "Dashboard_overview": "Dashboard_overview", + "Hourly_Rate": "Hourly_Rate" } \ No newline at end of file